ywh/cvss
ywh/cvss calculates CVSS base, temporal, and environmental scores for security vulnerabilities in PHP. Parse vector strings, compute severity ratings, and build vectors programmatically for vulnerability management, security scanners, and CVE tooling.
Architecture fit. ywh/cvss is a narrow-domain, framework-agnostic PHP library: it parses CVSS vector strings (e.g., CVSS:3.1/AV:N/AC:L/...) and computes base, temporal, and environmental scores. It carries no Laravel coupling, no service provider, and no facade — which is actually the right shape for a Laravel integration. It slots into the domain layer of a vulnerability-management or bug-bounty triage workflow cleanly: bind a thin wrapper in the service container, inject it into finding-intake services, and keep the vendor library behind an internal interface. The architectural "fit" question is not whether it composes with Laravel (it does, trivially) but whether CVSS scoring is a first-class concern in your product — if findings carry severity, it is.
Integration feasibility. High and low-effort. Composer install, PSR-4 autoload, a wrapper class of ~50–100 LOC, and you are done. The realistic work is not integration mechanics but verification: confirming which CVSS versions are supported (3.0 vs 3.1 vs 4.0), whether the scoring math is correct against the FIRST specification, and whether malformed vectors fail loudly or silently. Expect roughly a one-to-two-day spike for a competent PHP developer, most of it spent on conformance testing rather than wiring.
Technical risk. The technical risk is low; the supply-chain and correctness risk is the story. The package shows zero stars and zero dependents — an unvetted, effectively unadopted artifact from a single vendor (YesWeHack). For a security-scoring component, a wrong score is worse than no score: it drives triage priority, SLA clocks, and customer-facing severity labels. Three risks dominate:
Key questions. Which CVSS versions are implemented, and is v4.0 on the roadmap? Is the scoring validated against the FIRST reference vectors, and is there a test suite to prove it? What is the license, and does it permit forking? What are the PHP version constraints relative to your runtime? How does it behave on malformed or partial vectors — typed exceptions, or null/false? Is there any global state or function/constant pollution that could collide in a Laravel app?
Stack fit. Composer-native, PSR-4, no framework assumptions — compatible with Laravel 9/10/11 on PHP 8.x provided the version constraint permits. There is no config to publish and no migrations; it is a library, not a package in the Laravel sense. Bind it as a singleton in a service provider, expose it through an internal CvssScorer interface, and never let the vendor namespace leak into controllers or models.
Migration path. Two viable routes. (a) Direct dependency — fastest, but you inherit upstream's release cadence and behavior. (b) Vendor-and-wrap (recommended) — take the source into app/Support/Cvss or a private fork, wrap it behind your interface, and own the patches. Given zero dependents and no implied maintenance, route (b) trades a small amount of ceremony for control over a security-critical calculation. Either way, the internal interface is the real migration asset: it lets you swap to a maintained alternative or a first-party implementation later without touching call sites.
Compatibility. Confirm the PHP constraint against your minimum supported runtime before committing; a package pinned to an older PHP minor can block a framework upgrade later. Check for global function or constant declarations that could collide. Verify it does not depend on ext-* extensions absent from your deployment images.
Sequencing.
Maintenance. The dominant operational reality: you will likely own this code, not consume it. A single-vendor, zero-dependent project offers no maintenance guarantee. Budget for a private fork with an internal owner, a documented patch policy, and a "last reviewed" date. Maintenance cost is small in absolute terms — the domain is stable and the code surface is tiny — but it must be assigned, not assumed.
Support. Community issue tracker only; no SLA, no vendor escalation. For a security-scoring component that feeds customer-visible severity, that is a real gap. Mitigate with the golden-vector suite: it converts an external dependency into an internally-verified one, which is the only credible substitute for upstream support.
Scaling. Effectively free. Scoring is CPU-only string parsing measured in microseconds; it will never be a throughput bottleneck. Cache computed scores on write — CVSS vectors are immutable, so persist score and severity band rather than recomputing on read. If you re-score historically (e.g., adding environmental scores per tenant), do it in a queued backfill job, not in the request path.
Failure modes. Rank-ordered by severity:
Ramp-up. Developer ramp-up is trivial — the API is small and a competent PHP engineer is productive in under an hour. The real ramp-up is domain: CVSS semantics (base vs. temporal vs. environmental, vector grammar, severity bands) are where teams get it wrong, not the integration. Pair the implementation with a short internal write-up on how your product interprets CVSS so severity labeling stays consistent across services.
How can I help you explore Laravel packages today?