CveEnricher
API reference › Foxy › Audit › CveEnricher
Adds CVE identifiers to audit findings, resolving every unique GHSA advisory in a single batch.
Methods
Section titled “Methods”| Method | Description | Defined by |
|---|---|---|
__construct() | Creates an enricher backed by the supplied CVE resolver. | CveEnricher |
enrich() | Returns the report with a CVE resolution on every finding, in the original order. | CveEnricher |
Method details
Section titled “Method details”__construct()
Section titled “__construct() ”public function __construct(Foxy\Audit\CveResolverInterface $resolver)Creates an enricher backed by the supplied CVE resolver.
Parameters
| Parameter | Type | Description |
|---|---|---|
$resolver | CveResolverInterface |
enrich()
Section titled “enrich() ”public function enrich(Foxy\Audit\AuditReport $report, callable(string): void $warningHandler): Foxy\Audit\AuditReportReturns the report with a CVE resolution on every finding, in the original order.
A failed lookup never fails the audit: its advisory is marked unavailable and reported once to the handler.
Parameters
| Parameter | Type | Description |
|---|---|---|
$report | AuditReport | Report whose findings are enriched. |
$warningHandler | callable(string): void | Receives one warning per GHSA identifier whose lookup failed. |
Returns