Skip to content
PHP Ecosystem
Explore

AuditCommand

API reference › Foxy › Command › AuditCommand

final classFoxy\Command\AuditCommand
ExtendsComposer\Command\BaseCommand
Sourcesrc/Command/AuditCommand.php

Audits frontend dependencies and renders normalized vulnerability findings.

MethodDescriptionDefined by
__construct()Creates the audit command and its optional CVE resolver.AuditCommand
configure() protectedConfigures the audit command options and help text.AuditCommand
execute() protectedRuns the audit and returns its stable command status.AuditCommand
ConstantValueDescriptionDefined by
STATUS_FAILED2AuditCommand
STATUS_OK0AuditCommand
STATUS_VULNERABLE1AuditCommand
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

ParameterTypeDescription
$runnerFoxy\Audit\AuditRunnerInterfaceRuns the selected package manager audit.
$formatterFoxy\Audit\AuditFormatterRenders the normalized report.
$cveResolverFoxy\Audit\CveResolverInterface|nullResolves GHSA advisories to CVE identifiers.
protected function configure(): void

Configures the audit command options and help text.

protected function execute(Symfony\Component\Console\Input\InputInterface $input, Symfony\Component\Console\Output\OutputInterface $output): int

Runs the audit and returns its stable command status.

Parameters

ParameterTypeDescription
$inputSymfony\Component\Console\Input\InputInterface
$outputSymfony\Component\Console\Output\OutputInterface

Returns

int