[Security] Make security-audit tool coverage enforceable in CI #18

Open
opened 2026-07-29 13:25:49 +02:00 by zemion · 0 comments
Owner

Problem

A host-only audit can currently finish while Semgrep, Gitleaks, Trivy, OSV Scanner, or jscpd are unavailable. The report records those skips, but a green/report-only run is not sufficient evidence that every intended scanner executed.

The July 2026 audit also produced overwhelming test-only assertion/fake-secret noise. The wrapper now excludes only B101/B105/B106/B107 and S101/S105/S106/S107 under test roots; production scans remain unchanged.

Scope

  • Make the pinned audit container the canonical CI execution environment.
  • Fail the CI audit when a required scanner is missing or skipped.
  • Keep report-only local mode available, but make incomplete coverage prominent and machine-readable.
  • Pin and periodically update scanner versions and retain/cache the built image.
  • Scan all module requirement and lock files, not only the current repository.
  • Preserve narrow test-root exclusions; do not introduce broad suppressions.

Acceptance criteria

  • CI proves that Semgrep, Bandit, Ruff security rules, Gitleaks, Trivy, OSV Scanner, pip-audit, npm audit, Xenon/Radon, and jscpd ran.
  • Missing tools make strict/CI mode fail.
  • The report manifest distinguishes no findings, findings, scanner failure, and skipped scanner.
  • Wrapper tests cover required-tool and incomplete-report behavior.
## Problem A host-only audit can currently finish while Semgrep, Gitleaks, Trivy, OSV Scanner, or jscpd are unavailable. The report records those skips, but a green/report-only run is not sufficient evidence that every intended scanner executed. The July 2026 audit also produced overwhelming test-only assertion/fake-secret noise. The wrapper now excludes only B101/B105/B106/B107 and S101/S105/S106/S107 under test roots; production scans remain unchanged. ## Scope - Make the pinned audit container the canonical CI execution environment. - Fail the CI audit when a required scanner is missing or skipped. - Keep report-only local mode available, but make incomplete coverage prominent and machine-readable. - Pin and periodically update scanner versions and retain/cache the built image. - Scan all module requirement and lock files, not only the current repository. - Preserve narrow test-root exclusions; do not introduce broad suppressions. ## Acceptance criteria - CI proves that Semgrep, Bandit, Ruff security rules, Gitleaks, Trivy, OSV Scanner, pip-audit, npm audit, Xenon/Radon, and jscpd ran. - Missing tools make strict/CI mode fail. - The report manifest distinguishes no findings, findings, scanner failure, and skipped scanner. - Wrapper tests cover required-tool and incomplete-report behavior. <!-- audit-tool-coverage-20260729 -->
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: GovOPlaN/govoplan#18
No description provided.