Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions .trivyignore.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Trivy ignore rules (.trivyignore.yaml)
#
# Loaded via trivy.yaml (`ignorefile: .trivyignore.yaml`) so it applies to a
# bare `trivy fs .`. Trivy 0.71.x only auto-detects a plain `.trivyignore`
# (line-based, NO path scoping); the YAML form used here is what lets us scope
# the suppression to a single path instead of disabling a rule globally.
#
# Scope: ONE path-scoped secret suppression. This does NOT globally disable
# private-key detection — a real private key committed anywhere else in the
# repo will still fail the scan.
#
# Why this single entry is safe (verified false positive):
# The R "openssl" package is vendored under packrat/ for reproducible builds.
# Its bundled upstream HTML docs (openssl/doc/keys.html) print an EXAMPLE PEM
# key from the doc's own `write_pem()` demonstration. It is published upstream
# example material, not a live credential, so Trivy's Secret rule "private-key"
# (AsymmetricPrivateKey, HIGH) is a false positive here. We scope the ignore to
# exactly this vendored doc path.
secrets:
- id: private-key
paths:
- "packrat/lib/**/openssl/doc/keys.html"
8 changes: 8 additions & 0 deletions trivy.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Trivy configuration (auto-loaded from the repo root by `trivy fs .`).
#
# Its only job is to activate the path-scoped secret suppression in
# .trivyignore.yaml. Trivy 0.71.x auto-detects only a plain `.trivyignore`
# (which cannot scope a rule to a path); pointing `ignorefile` at the YAML file
# lets us suppress the vendored-doc false positive WITHOUT globally disabling
# private-key detection. See .trivyignore.yaml for the full justification.
ignorefile: .trivyignore.yaml
Loading