Repository navigation
Description
Chore Type
CI / Build change
Description
The Security and quality tab currently shows 564 open code-scanning alerts, but a large share are stale, orphaned, or duplicated rather than genuine, actionable exposure. This issue tracks cleaning up the alert surface and consolidating the Trivy scan configuration so the count reflects reality.
Findings (evaluated 2026-06-19):
Totals: 983 alerts → 419 fixed, 564 open. Source is almost entirely Trivy container-image CVE scans (969 Trivy; 8 CodeQL all closed; 6 Scorecard). Open severity: 12 critical, 62 high, 260 medium, 201 low, 29 unknown.
| Category | Open | Source | State |
|---|---|---|---|
container-image-latest |
236 | security-scan.yml nightly scan of GHCR :latest |
Live & accurate (refreshed daily) |
container-image |
313 | ci.yml Trivy on PR-built image |
Mostly stale (last refresh 2026-06-11) |
container-image-scheduled |
10 | a workflow that no longer exists | Orphaned (frozen 2026-03-30) |
supply-chain/* (Scorecard) |
5 | Scorecard action | Config findings |
Auto-close behaviour (GitHub clears an alert when a later run of the same category+tool+ref omits it):
- ✅
container-image-latestauto-closes correctly (nightly refresh; 419 already-fixed prove the pipeline works). ⚠️ container-imagewill not reliably auto-close:ci.ymlnow uploads SARIF filtered toseverity: 'HIGH,CRITICAL'only (ci.yml#L314), so its 191 low + 97 medium alerts are zombies the current scan can no longer "see" to clear; it also runs only onpull_request, sorefs/heads/mainrarely gets a fresh upload.- ❌
container-image-scheduled(10) can never auto-close — no workflow emits that category anymore.
Actual actionable exposure is small: of the open HIGH/CRITICAL, only 4 are fixable (have an upstream patch); the other 67 are unfixed (no vendor fix yet). The single live fixable HIGH/CRITICAL is already tracked by the nightly gate issue #602.
Conclusion: ~300 of the 564 are stale/orphaned duplicates from a superseded scan config, plus a long tail of unfixable CVEs. Cleaning up the dead categories and consolidating to one authoritative scan is the biggest lever.
Acceptance Criteria
- The 10 orphaned
container-image-scheduledalerts are dismissed (reason:won't_fix— orphaned category, no producing workflow). - A decision is made and implemented for the stale
container-imagelow/medium alerts: either (a)container-image-latestbecomes the single authoritative scan and the ~292 stalecontainer-imagelow/medium alerts are dismissed, or (b)ci.ymlis restored to upload all-severity SARIF + reconcile onmain. - Scan categories in
ci.yml/security-scan.ymlare documented so future readers know which is authoritative (SSoT). - The 5 Scorecard
supply-chain/*findings are individually reviewed and either fixed or dismissed with rationale. - After cleanup, the open alert count reflects only genuine, current exposure; a short note records the new baseline.
- TDD compliance (see .cursor/rules/tdd.mdc) — for any testable logic touched (e.g. workflow-helper scripts); pure workflow/YAML changes noted as non-testable.
Implementation Notes
- Bulk-dismiss via REST:
gh api repos/:owner/:repo/code-scanning/alerts/<n> -X PATCH -f state=dismissed -f dismissed_reason="won't fix" -f dismissed_comment="...". - Target files:
.github/workflows/ci.yml(SARIF severity/trigger/category),.github/workflows/security-scan.yml,.trivyignore. - Relates to discussion [DISCUSSION] Optimize CI pipeline for PRs to dev — full security scan on every PR? #109 (full security scan on every PR) — the category-consolidation decision overlaps with that thread.
- Does not cover remediating individual CVEs (tracked by the nightly gate issue Nightly security scan: HIGH/CRITICAL vulnerabilities in :latest #602).
Related Issues
Priority
Medium
Changelog Category
Security
Activity
ci(security): make nightly :latest scan the SARIF source of truth
c-vigo commentedon Jun 21, 2026
Executed on branch
chore/604-cleanup-scanning-alerts(PR #605).Outcome — open alerts 564 → 237:
container-image-scheduledalerts (no producer since 2026-03-30).ci.ymlTrivy is now a gate-only step (SARIF upload removed);container-image-latestdocumented as SSoT; dismissed all 313 now-orphanedcontainer-imagealerts.supply-chain/*findings with per-alert rationale.New baseline: 237 open, all from the single authoritative nightly
container-image-latestscan. Remaining genuinely-fixable HIGH/CRITICAL exposure continues to be tracked by the nightly gate issue #602.test(image): bump typstyle version pin to 0.15
ci(security): consolidate container-image scanning to single source o…
chore: release 0.3.7 (#609)
ci(security): vulnix + SBOM CVE scanning for the Nix image (#637) (#660)
docs: retire the documented Debian fallback path (T4.4) (#889)