AuditCommand
API reference › Foxy › Command › AuditCommand
Audits frontend dependencies and renders normalized vulnerability findings.
Methods
Section titled “Methods”| Method | Description | Defined by |
|---|---|---|
__construct() | Creates the audit command and its optional CVE resolver. | AuditCommand |
configure() protected | Configures the audit command options and help text. | AuditCommand |
execute() protected | Runs the audit and returns its stable command status. | AuditCommand |
Constants
Section titled “Constants”| Constant | Value | Description | Defined by |
|---|---|---|---|
STATUS_FAILED | 2 | AuditCommand | |
STATUS_OK | 0 | AuditCommand | |
STATUS_VULNERABLE | 1 | AuditCommand |
Method details
Section titled “Method details”__construct()
Section titled “__construct() ”public function __construct(Foxy\Audit\AuditRunnerInterface $runner, Foxy\Audit\AuditFormatter $formatter = new \Foxy\Audit\AuditFormatter(), Foxy\Audit\CveResolverInterface|null $cveResolver = null)Creates the audit command and its optional CVE resolver.
Parameters
| Parameter | Type | Description |
|---|---|---|
$runner | Foxy\ | Runs the selected package manager audit. |
$formatter | Foxy\ | Renders the normalized report. |
$cveResolver | Foxy\| | Resolves GHSA advisories to CVE identifiers. |
configure()
Section titled “configure() ”protected function configure(): voidConfigures the audit command options and help text.
execute()
Section titled “execute() ”protected function execute(Symfony\Component\Console\Input\InputInterface $input, Symfony\Component\Console\Output\OutputInterface $output): intRuns the audit and returns its stable command status.
Parameters
| Parameter | Type | Description |
|---|---|---|
$input | Symfony\ | |
$output | Symfony\ |
Returns
int