[P17] Add --close mode to api.diag.vuln for auto-closing resolved vulns #128

Closed
opened 2026-03-23 18:11:15 +00:00 by kert · 0 comments
Owner

Problem

Vuln issues (#114-#117) are created automatically but never closed. After hardening, a clean scan should auto-close the matching issue.

Fix

Add --close flag to api.diag.vuln:

uv run python -m api.diag.vuln --close notebooks-scan.json

Behavior:

  • Parse scan JSON
  • If no fixable HIGH/CRITICAL: find open issue with vuln: <image> title, close it with comment
  • If vulns remain: update existing issue or create new one

Acceptance criteria

  • --close mode implemented
  • Closes matching issue via Gitea API
  • Adds closing comment with scan summary
  • Full test coverage
## Problem Vuln issues (#114-#117) are created automatically but never closed. After hardening, a clean scan should auto-close the matching issue. ## Fix Add `--close` flag to `api.diag.vuln`: ```bash uv run python -m api.diag.vuln --close notebooks-scan.json ``` Behavior: - Parse scan JSON - If no fixable HIGH/CRITICAL: find open issue with `vuln: <image>` title, close it with comment - If vulns remain: update existing issue or create new one ## Acceptance criteria - [ ] `--close` mode implemented - [ ] Closes matching issue via Gitea API - [ ] Adds closing comment with scan summary - [ ] Full test coverage
kert added this to the P17: Hardened Containers — auto-patch vulns via CI/CD milestone 2026-03-23 18:11:15 +00:00
kert added the qualityci labels 2026-03-23 18:11:15 +00:00
kert closed this issue 2026-03-23 18:21:26 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: homelab/stack#128