Skip to content

feat: native baseline files, Coverage report line, scanner-error diagnostics - #14

Merged
segraef merged 1 commit into
mainfrom
feat/scan-baselines-coverage
Sep 5, 2026
Merged

segraef merged 1 commit into
mainfrom
feat/scan-baselines-coverage

Conversation

@segraef

@segraef segraef commented Sep 5, 2026

Copy link
Copy Markdown
Owner

What

Third slice of the deployment-gate plan: accepted findings stop re-blocking, and the report says what was actually parsed.

  • Native baseline files, no SecKit format. gitleaks ignore files now load from the scanned repo (--gitleaks-ignore-path), .trufflehog-exclude and .checkov.baseline are passed automatically when present at the repo root. Reasons/expiry live in each tool's own format, reviewed in the PR that edits the file.
  • Coverage: line (terminal + report) per repo, lifted from osv's Scanned <file> ... found N package(s) output. Handles the singular 1 package form, paths with spaces, and prints no package manifests parsed when osv found nothing - silence never masquerades as coverage.
  • Scanner-error diagnostics. trufflehog --fail exits 183 on findings; any other non-zero is a tool error (e.g. a bad regex in .trufflehog-exclude) and now surfaces the stderr tail instead of an unexplained red.
  • Docs: coverage matrix, blind-spot list, and two tool caveats verified against the shipped binaries: osv-scanner.toml only loads beside each manifest (a root-level file does nothing for nested lockfiles), and checkov baselines match resource name + check id across files, so same-named resources inherit suppressions.

Verified

  • bash check.sh green (shellcheck, PSScriptAnalyzer, YAML).
  • checkov baseline end-to-end: failing Dockerfile repo -> exit 1; after --create-baseline -> exit 0 (both shells).
  • trufflehog: valid exclude -> clean; invalid regex -> red with trufflehog error (exit 1): + reason.
  • Coverage regex units: singular/plural, space paths, empty-log fallback (both shells).
  • gitleaks ignore-path flag on a real monorepo: clean, both shells.
  • Adversarial review workflow (3 lenses, every finding re-verified by offline reproduction); 9 confirmed findings fixed before commit.

🤖 Generated with Claude Code

https://claude.ai/code/session_01B9sELo4AqzS2NcvToDhdNy

…nostics

- gitleaks: --gitleaks-ignore-path pinned to the scanned repo so ignore
  files load from the repo, not the caller's cwd
- trufflehog: pass -x REPO/.trufflehog-exclude when present; a non-zero
  exit other than 183 (findings) now surfaces the tool's stderr tail
  instead of a silent red (e.g. a bad regex in the exclude file)
- checkov: pass --baseline REPO/.checkov.baseline when present
- Coverage line (terminal + report): lifts osv's "Scanned <file> ... found
  N package(s)" lines per repo; handles singular "1 package" and paths
  with spaces; prints "no package manifests parsed" instead of silence
- docs: coverage matrix, blind-spot list, baselines section with two
  verified caveats (osv-scanner.toml loads beside each manifest, not from
  the repo root; checkov baselines match resource name + check id across
  files)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B9sELo4AqzS2NcvToDhdNy
@segraef
segraef merged commit 1865517 into main Sep 5, 2026
6 checks passed
@segraef
segraef deleted the feat/scan-baselines-coverage branch September 5, 2026 00:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant