ywh/cvss-bundle
A Symfony bundle for working with CVSS (Common Vulnerability Scoring System) vectors and scores, providing services, Twig extensions, and helpers to parse, validate, and calculate vulnerability severity ratings in your applications.
Architecture fit: ywh/cvss-bundle is a Symfony2 bundle, not a framework-agnostic library and not a Laravel package. Its value is wrapped in Symfony's DI container, bundle registration (AppKernel), and likely Symfony 2.x-era service definitions (YAML/XML) plus a DependencyInjection/*Extension class. For a Laravel codebase this is an architectural mismatch on two axes: (1) framework — there is no bundle loader in Laravel, and (2) era — Symfony2 has been EOL since November 2019 (2.8), so the package targets PHP 5.x/7.0-era idioms. The reusable core, if any, is the CVSS vector parser/calculator service; everything around it is Symfony scaffolding we would discard.
Integration feasibility: Feasible but only via extraction, not installation. The realistic path is to vendor the CVSS scoring service class(es), strip the container wiring, and expose them behind our own interface. Before committing, we must confirm the bundle actually implements scoring versus delegating to a dependency (e.g., symfony/… or a separate CVSS library) — the answer materially changes effort. With zero stars, zero dependents, and a zero score, there is no community signal that this code is exercised or correct, and CVSS scoring is numerically exacting: rounding rules, metric weight tables, and scope-changed handling are easy to get subtly wrong.
Technical risk: High.
composer.json, which can block PHP 8.x upgrades or force --ignore-platform-reqs.Key questions:
composer.json, and do any conflict with our runtime?Stack fit: Poor as-shipped, acceptable as a extracted service. Laravel's container auto-resolution and simple service-provider model make wrapping a plain PHP calculator trivial — the friction is entirely the Symfony2 bundle layer, which we drop. If the calculation core is not cleanly separable, that itself is a disqualifier and we default to a maintained alternative or a first-party implementation.
Migration path:
App\Support\Cvss) with attribution per license, or composer-vendor it via a VCS repository entry. Remove the bundle/DI classes rather than carrying dead weight.CvssCalculator interface (score(string $vector): CvssScore, plus typed metric accessors for UI/reporting). Bind it in a Laravel service provider. This isolates us from the upstream shape and makes swapping implementations a one-line change.Compatibility: Assume the bundle's composer constraints are stale. Plan to fork rather than require directly if PHP 8.x or modern Symfony/Illuminate components conflict. Confirm the return types (array vs value object, float vs string) so the adapter normalizes rounding and precision at the boundary.
Sequencing: Confirm version support first (it can kill the effort). Then extraction spike → conformance tests → Laravel provider + adapter → deprecate any ad-hoc CVSS logic currently in the codebase → document ownership. Do not sequence this as "install, then figure out."
Maintenance: We become the maintainers on day one. There is no upstream to lean on. That means: internal ownership assigned by name, a documented fork point (upstream commit SHA), and a standing decision on whether to track upstream (unlikely, given dormancy) or diverge permanently. Budget a periodic review of FIRST spec changes — CVSS v4.0 is current and the spec will continue to evolve.
Support: No vendor, no community, no issue triage. Internal support load concentrates on two questions: "why did this score change?" and "why doesn't this match the FIRST calculator?" Both require the conformance suite and a stored vector-plus-version alongside every score so results are reproducible.
Scaling: Computation is pure and cheap — parsing and scoring a vector is microseconds and horizontally scales with the app. Any scaling concern is storage, not compute: persisting vectors and scores per finding is what grows. No external service calls, no rate limits, no cold-start issues. This is a favorable profile.
Failure modes:
round() produces known-wrong values.Ramp-up: Low for engineers, given it is a small, self-contained domain — a competent PHP developer can own this in days, provided the conformance tests exist. The real ramp-up cost is domain literacy: the team must understand base vs. temporal vs. environmental metrics and scope-changed semantics to use the output responsibly. That is a training concern, not a code concern, and it applies regardless of which package we pick.
How can I help you explore Laravel packages today?