From 7c083271a6f93b318aeb1c2430fddc2684aaa240 Mon Sep 17 00:00:00 2001 From: jurgenhaas <juergen.haas@lakedrops.com> Date: Tue, 30 Jul 2024 11:13:24 +0200 Subject: [PATCH] composer/plugin/drupal-environment#18 Implement lakedrops:audit-ignore-report --- src/AuditIgnoreReportCommand.php | 2 +- src/Handler.php | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/AuditIgnoreReportCommand.php b/src/AuditIgnoreReportCommand.php index 1883305..ac131e5 100644 --- a/src/AuditIgnoreReportCommand.php +++ b/src/AuditIgnoreReportCommand.php @@ -19,7 +19,7 @@ class AuditIgnoreReportCommand extends BaseCommand { protected function configure(): void { parent::configure(); $this - ->setName('lakedrops:auditignorereport') + ->setName('lakedrops:audit-ignore-report') ->setDescription('Report about status of all ignored CVEs during audit.'); } diff --git a/src/Handler.php b/src/Handler.php index 7c8a643..bc858d4 100644 --- a/src/Handler.php +++ b/src/Handler.php @@ -188,13 +188,17 @@ class Handler extends BaseHandler { } } + /** + * Generates a report for ignored projects during audit. + * + * @throws \GuzzleHttp\Exception\GuzzleException + */ public function auditIgnoreReport(): void { $audit = $this->composer->getConfig()->get('audit'); if (empty($audit['ignore'])) { $this->io->info('There are no ignored CVEs in the configuration.'); return; } - /** @var \GuzzleHttp\Client $client */ $client = new Client(); $ignore = $audit['ignore']; $report = []; -- GitLab