Repository navigation
sec(deps): record dated Trivy ignores for the unfixable docker and openpgp advisories - #1193
Conversation
…enpgp advisories The Trivy fs scan reports five Go advisories on main. None has a version that clears it for the module path this repo resolves: - CVE-2026-41567, CVE-2026-42306 (HIGH), CVE-2026-41568, CVE-2026-33997 (MEDIUM) in github.com/docker/docker v28.5.1+incompatible. OSV has no fixed event for that module path; the fixes ship only in github.com/moby/moby/v2. The newest docker/docker Go version is v28.5.2+incompatible (still last_affected), and golang-migrate v4.20.1 still requires it. - GO-2026-5932 in golang.org/x/crypto/openpgp: frozen, no fixed event. None is reachable: no github.com/docker/docker or x/crypto/openpgp package appears in go list -deps or go list -test -deps (with and without -tags integration) for either module. docker/docker is in the graph only via golang-migrate's own pgx/v5 test (dhui/dktest). Each entry is an exact ID with its reason and an exp: review date, so the finding reappears on 2027-04-20 unless re-reviewed. The otel/sdk alert from the issue is already cleared on main (go.mod has v1.45.0). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Warning Review limit reached
This review includes 3 billable files and costs up to $0.75. Or wait 9 minutes for your next included review. View limit details
Comment |
|
Independent review 2 (claude-fleet, cold): APPROVE 7bf37f4 Findings (none blocking):
Root cause:
Attacked:
Verified locally, with no cloud credentials, under the heavy lock, using
Reviewed by an independent agent with no author context (second reviewer). Review only: nothing was pushed, and the GitHub review state is unchanged. |
|
VERDICT: REQUEST_CHANGES 7bf37f4 PR #1193 (closes #3), reviewed at head 7bf37f4. Base origin/main 7eac792; Findings
Confirmed correct
Attacked
|
Move the five docker/docker and x/crypto openpgp advisory ignores from the plain .trivyignore, where they matched on ID for every package, to a new .trivyignore.yaml that scopes each one by purl. The CI Trivy fs step now reads that file through trivy-action's trivyignores input. So the same IDs are still reported for github.com/moby/moby/v2, which has fixed versions. Also correct the expiry wording: an expired entry brings the finding back in the Security tab but does not fail CI, because the fs step uses exit code 0. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Thanks for both reviews. Addressed at head 77deed6. main is merged in (aabe2c0, no conflicts). It's a merge, not a rebase. VERDICT review (REQUEST_CHANGES at 7bf37f4)
Independent review 2 (APPROVE at 7bf37f4)
Other checks on 77deed6: actionlint on ci.yml is clean. zizmor 1.29.0 with the pre-commit flags finds nothing. |
|
Independent review (IAmJSD's agent, fresh context, given only the diff, the issue and the PR text): VERDICT: APPROVE Blocking:
Non-blocking:
Attacked:
Body-stale:
Reviewer: rA2. Bar while the maintainers are away (set by IAmJSD as acting owner): one approving independent review on the head, two for money, auth and security paths. |
Brings in main's CI fixes (LeanerCloud#1236, LeanerCloud#1252) and CI changes since, so this PR gets a fresh CI run. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
VERDICT: APPROVE e6c1964 Findings: no blocking findings.
Issue #3 check: all six alerts are handled. otel/sdk is already v1.45.0 on main (go.mod:171), so CVE-2026-81870 needs nothing. The four docker/docker CVEs and GO-2026-5932 get purl-scoped, dated (2027-04-20) entries with written reasons, which meets the issue's acceptance ("every remaining alert has a justified, dated ignore entry"). The issue text said docker comes in through testcontainers; the PR's correction (golang-migrate pgx/v5 test -> dhui/dktest) is right: Attacked:
|
|
Local verification at |
|
Merged by IAmJSD's agent at IAmJSD's request (IAmJSD is acting owner while the maintainers are away), under the bar IAmJSD set: 2 approving independent review(s) on |
Root cause
Trivy's fs scan (gomod analyzer) reports five Go advisories on current main. None of them has a version that clears it for the module path this repo resolves, so a bump can't clear them:
last_affected=28.5.2; fixed only ingithub.com/moby/moby/v22.0.0-beta.14introduced=0, no fixed eventThe sixth alert in the issue, CVE-2026-81870 in
go.opentelemetry.io/otel/sdk, is already cleared on main: go.mod pins v1.45.0 (5b30fbc), and Trivy no longer reports it.None of these is reachable:
go list -deps ./...andgo list -test -deps ./...(with and without-tags integration, in both the root andtests/e2emodules) return nogithub.com/docker/docker/...package. The module is only in the graph because golang-migrate's owndatabase/pgx/v5test importsgithub.com/dhui/dktest, which imports it. This repo's testcontainers usage goes throughgithub.com/moby/moby/client. All four advisories are daemon-side (docker/docker/daemon, the plugin privilege check).golang.org/x/crypto/openpgp*package in either deps listing. The x/crypto packages that are actually built are bcrypt, ssh, pkcs12 and hkdf, plus their internal deps.scripts/scan-shipped-image.shalready tolerates this advisory in/app/cudlyfor the same reason.Fix
Add a new
.trivyignore.yamlwith one entry per exact advisory ID. Each entry is scoped by purl to the module it was triaged for (pkg:golang/github.com/docker/dockerorpkg:golang/golang.org/x/crypto), and has astatementandexpired_at: 2027-04-20. A plain.trivyignoreline matches on ID for every package. A purl-scoped entry does not, so the same CVEs are still reported forgithub.com/moby/moby/v2, which does have fixed versions. The file comments give the reason each advisory is unreachable, the reason there is no fix, and the review date.The CI step "Run Trivy vulnerability scanner (filesystem)" in
.github/workflows/ci.ymlnow reads that file through trivy-action'strivyignores:input. With a single YAML file the action exportsTRIVY_IGNOREFILEpointing at it, so this step stops reading.trivyignore. That file only holds config-scan IDs, which the step's default scanners (vuln, secret) never report..trivyignorekeeps those IDs for the IaC step and the pre-commit hook, and gains a one-line pointer to the new file.What
expired_atdoes: after the date, Trivy stops honoring the entry and the finding comes back in the Security tab. It does not fail CI, because the fs step uses the default exit-code 0. The SARIF that step uploads carries every severity, because trivy-action unsetsseverity:for SARIF unlesslimit-severities-for-sarifis set (entrypoint.sh at the pinned v0.36.0 SHA). So the MEDIUM and UNKNOWN entries also reach the Security tab. Localmake security-scanandscripts/security-scan.shruns read the default.trivyignore, so they still list these advisories, as they do on main. Pass--ignorefile .trivyignore.yamlto get CI's vuln view locally.CI's govulncheck source-mode step (
scripts/govulncheck-retry.sh, exit 3) still fails the job if any of these vulnerable symbols becomes called. These ignores silence only the go.mod-level Trivy report.No go.mod or go.sum change.
Verification
All of this is local scanner evidence against the trivy DB updated 2026-10-20 01:16 UTC (
--skip-db-update). It is not a CI run. It was run on the tree with origin/main merged in (head 77deed6).Trivy v0.72.0, the version CI pins: the macOS-ARM64 release tarball, checked against
trivy_0.72.0_checksums.txt(OK). Commands weretrivy fs -q --scanners vuln --ignorefile <file> --format json .unless noted:Scope probe: a scratch go.mod requiring
docker/docker v28.5.1+incompatible,moby/moby/v2 v2.0.0-beta.7andx/crypto v0.43.0:Trivy 0.76.0 with
.trivyignore.yamlon the repo: 0 findings.Reachability:
OSV lookups:
POST https://api.osv.dev/v1/queryforgithub.com/docker/docker@v28.5.1+incompatible, plusGET /v1/vulns/{GO-2026-4883,5617,5668,5746,5932}. The docker/dockeraffectedentries have nofixedevent; onlygithub.com/moby/moby/v2does. golang-migrate v4.20.0 and v4.20.1 go.mod still requiregithub.com/docker/docker v28.5.2+incompatible.Other checks:
actionlint .github/workflows/ci.yml: clean.zizmor==1.29.0 --offline --persona=pedantic --min-severity=medium(the pre-commit flags): no findings..trivyignore.yamlparses as YAML (5 vulnerability entries).trivy config --severity HIGH,CRITICAL --exit-code 1 ...(same args as the hook): exit 0.go build ./...andgo vet ./...on the merged tree: ok..gitallowed) on the three changed files in a throwaway repo with isolated HOME: clean.go test ./internal/mocks/don't apply.Considered and not done
github.com/docker/docker v28.5.1requirement.go mod edit -droprequirefollowed bygo mod tidyleaves go.mod without it, and Trivy would stop reporting. But the graph would then silently select the older v28.3.3 from golang-migrate, and the module would still be present. That hides the finding from the scanner without changing exposure, so I kept the explicit, dated ignore.last_affected=28.5.2), so this is churn with no effect on these alerts.Closes #3
Maintainer: please mirror the issue's triage labels onto this PR:
priority/p2,severity/medium,impact/internal,triaged,urgency/this-quarter,effort/s,type/security.🤖 Generated with Claude Code