Skip to content
PHP Ecosystem
Explore

CveEnricher

API reference › Foxy › Audit › CveEnricher

final readonly classFoxy\Audit\CveEnricher
Sourcesrc/Audit/CveEnricher.php

Adds CVE identifiers to audit findings, resolving every unique GHSA advisory in a single batch.

MethodDescriptionDefined 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
public function __construct(Foxy\Audit\CveResolverInterface $resolver)

Creates an enricher backed by the supplied CVE resolver.

Parameters

ParameterTypeDescription
$resolverCveResolverInterface
public function enrich(Foxy\Audit\AuditReport $report, callable(string): void $warningHandler): Foxy\Audit\AuditReport

Returns 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

ParameterTypeDescription
$reportAuditReportReport whose findings are enriched.
$warningHandlercallable(string): voidReceives one warning per GHSA identifier whose lookup failed.

Returns

AuditReport