Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. AuditCommand.php

function AuditCommand::configure

Overrides Command::configure

File

vendor/composer/composer/src/Composer/Command/AuditCommand.php, line 27

Class

AuditCommand

Namespace

Composer\Command

Code

protected function configure() : void {
    $this->setName('audit')
        ->setDescription('Checks for security vulnerability advisories for installed packages')
        ->setDefinition([
        new InputOption('no-dev', null, InputOption::VALUE_NONE, 'Disables auditing of require-dev packages.'),
        new InputOption('format', 'f', InputOption::VALUE_REQUIRED, 'Output format. Must be "table", "plain", "json", or "summary".', Auditor::FORMAT_TABLE, Auditor::FORMATS),
        new InputOption('locked', null, InputOption::VALUE_NONE, 'Audit based on the lock file instead of the installed packages.'),
        new InputOption('abandoned', null, InputOption::VALUE_REQUIRED, 'Behavior on abandoned packages. Must be "ignore", "report", or "fail".', null, Auditor::ABANDONEDS),
        new InputOption('ignore-severity', null, InputOption::VALUE_IS_ARRAY | InputOption::VALUE_REQUIRED, 'Ignore advisories of a certain severity level.', [], [
            'low',
            'medium',
            'high',
            'critical',
        ]),
    ])
        ->setHelp(<<<EOT
The <info>audit</info> command checks for security vulnerability advisories for installed packages.

If you do not want to include dev dependencies in the audit you can omit them with --no-dev

Read more at https://getcomposer.org/doc/03-cli.md#audit
EOT
);
}
RSS feed
Powered by Drupal