Repository navigation
feat(security): gate on CISA KEV and keep previous majors patched - #66
Conversation
There was a problem hiding this comment.
Talking to Cbox
- Reply under a finding to ask Cbox about it.
/cbox fixin reply to a finding: Cbox fixes it on this pull request's branch, or, when it can't push there, on a new branch whose push waits for a confirm in Cbox./cbox reviewreviews this pull request again now./cbox <question>asks Cbox about this pull request./cbox remember <rule>proposes a rule for Cbox's reviews; an owner or admin approves it in Cbox./cbox configshows the review settings this pull request uses and where each comes from./cbox helpshows this list.
Only people who can push to this repository and have linked their GitHub account in Cbox can use /cbox.
|
|
||
| - name: Fail on fixable known-exploited vulnerabilities (amd64, pre-promotion) | ||
| if: inputs.enable-trivy | ||
| run: python3 scripts/security-watch.py kev-gate --report trivy-kev-amd64.json --kev /tmp/kev.json |
There was a problem hiding this comment.
kev-gate runs scripts/security-watch.py, but the job's sparse checkout (line 854) does not fetch that file. This blocks the merge.
Add scripts/security-watch.py to the sparse-checkout list in the 'Checkout versions.json, CVE baseline and smoke-test scenario' step.
|
|
||
| permissions: | ||
| contents: read | ||
| actions: write |
There was a problem hiding this comment.
The new workflow grants actions: write workflow-wide so it can dispatch builds on release branches. Not blocking, but the scope should be narrowed.
Move permissions (contents: read, actions: write) to the dispatch job, set the workflow level to permissions: {}, and add a comment saying the write scope exists only for gh workflow run.
| if not path.exists(): | ||
| return set() | ||
| return {line.split()[0] for line in path.read_text().splitlines() if line.strip() and not line.startswith('#')} | ||
|
|
There was a problem hiding this comment.
ignored_ids() drops Trivy's exp:YYYY-MM-DD suffix on .trivyignore lines. Before this change, --ignorefile honoured it.
Parse the optional exp: token in ignored_ids() and skip entries whose date is before today.
A CVE in CISA's Known Exploited Vulnerabilities catalog is now actionable at any severity, fixed or not. The pre-promotion gate blocks a fixable KEV entry at any severity; the hourly watch fails on an unfixed one until it has a reviewed, expiring exception in security/kev-exceptions.json. .trivyignore cannot silence a KEV. The watch also scans every previous major still inside its maintenance window (versions.json release.maintenance) and dispatches rebuilds on its release branch. maintain-previous-majors.yml starts that chain weekly, because schedules never fire on a non-default branch: v1 had no rebuild path at all once v2 took over main. Found by the first run: nginx:bookworm-v1 carried libbrotli1 1.0.9-2+b6 (CVE-2026-111497, KEV due 2026-11-10). Claude-Session: https://claude.ai/code/session_01VnY3qneHHtCCBAr7izcfjC
6bc9bf3 to
0a14819
Compare
There was a problem hiding this comment.
0 of 3 addressed.
Talking to Cbox
- Reply under a finding to ask Cbox about it.
/cbox fixin reply to a finding: Cbox fixes it on this pull request's branch, or, when it can't push there, on a new branch whose push waits for a confirm in Cbox./cbox reviewreviews this pull request again now./cbox <question>asks Cbox about this pull request./cbox remember <rule>proposes a rule for Cbox's reviews; an owner or admin approves it in Cbox./cbox configshows the review settings this pull request uses and where each comes from./cbox helpshows this list.
Only people who can push to this repository and have linked their GitHub account in Cbox can use /cbox.
|
|
||
| permissions: | ||
| contents: read | ||
| actions: write |
There was a problem hiding this comment.
actions: write is granted to the whole workflow, not to the one job that dispatches. Not blocking.
Set top-level permissions: {} and move contents: read and actions: write under jobs.dispatch.permissions.
| '--output', str(report_path), str(sbom)], check=True) | ||
| report = json.loads(report_path.read_text()) | ||
| # Missing package detection is not evidence of a clean image. | ||
| if not any(r.get('Class') == 'os-pkgs' and r.get('Type') == 'debian' for r in report.get('Results', [])): |
There was a problem hiding this comment.
v1 targets are filtered with main's .trivyignore, whose Bookworm, Go and npm exceptions are retired. No remediation exists for v1 non-OS findings.
Load the ignore file for each target's branch (for example git show origin/<branch>:.trivyignore), or report non-OS v1 findings without failing the watch.
CVE severity is a guess; CISA KEV is evidence of exploitation. Until now nothing here looked at KEV, and the watch only saw fixable HIGH/CRITICAL in the current channel.
What changes
security/kev-exceptions.json..trivyignorecannot silence a KEV.versions.json→release.maintenance, v1 until 2027-05-07) and dispatches rebuilds onrelease/v1.maintain-previous-majors.ymlstarts the v1 chain weekly. Schedules never fire on non-default branches, so v1 had no rebuild path once v2 took over main. Chaining on the branch itself is fix(ci): chain v1 downstream builds on the maintenance branch #65.What the first full run found (36 images, v2 + v1, local run of this script)
nginx:bookworm-v1: libbrotli11.0.9-2+b6, CVE-2026-111497, KEV due 2026-11-10. Rebuilt fromrelease/v1today; now1.0.9-2+deb12u1.http2 on;is rejected by 1.22). The standalone nginx image runs nginx.org 1.29, which has had the mitigation since 1.25.3.https://claude.ai/code/session_01VnY3qneHHtCCBAr7izcfjC