Repository navigation
Description
Update 2026-11-26 (infra move): Do not fix this manifest.
dan-petty/homelab removed GPU feature discovery, and the copy here deploys nothing. Step 17 (#7290) deletes it. After that merge, close this item when alert 270 shows fixed. Do not add an ignore entry.
Trivy reports a misconfiguration that no issue names.
- Rule: KSV-0001
- Path: k8s/gpu-feature-discovery/daemonset.yaml
- Severity: MEDIUM
Open alerts:
Judge it under "Judging a Trivy-config Alert" in SECURITY.md: fix the file, dismiss the alert with a reason, or add a time-limited entry to .trivyignore.yaml. The owner judges a CRITICAL alert within 24 hours. An agent judges any other alert within 14 days.
Proposed design
Problem statement
Trivy reports KSV-0001 for the privileged GPU feature discovery daemonset, and no issue names that alert. The container needs privileged mode to read GPU devices through NVML and /sys until #5646 replaces it. The change records a time-limited .trivyignore.yaml entry with a reason and an expiry date, so the alert closes and the risk stays visible.
Acceptance criteria
Requirement: Time-limited KSV-0001 ignore entry
The repository SHALL hold a time-limited Trivy ignore entry for KSV-0001 on k8s/gpu-feature-discovery/daemonset.yaml.
Scenario: The Trivy scan skips the privileged GPU daemonset
- WHEN
trivy config --ignorefile .trivyignore.yaml k8s/gpu-feature-discovery/daemonset.yamlruns before the entry expiry - THEN the command reports no KSV-0001 finding for
k8s/gpu-feature-discovery/daemonset.yaml.
Requirement: Ignore entry statement and expiry
The ignore entry MUST hold a statement that names #5646 and an expired_at date.
Scenario: The ignore entry is valid and dated
- WHEN
yq -e '.misconfigurations[] | select(.id | test("KSV-0001$")) | select(.paths[] == "k8s/gpu-feature-discovery/daemonset.yaml") | select(.statement | test("#5646")) | .expired_at' .trivyignore.yamlruns - THEN the command prints a date and exits 0.
Requirement: Code scanning alert closes
The open code scanning alert 270 MUST close after the next Trivy scan reads the ignore entry.
Scenario: The alert state is read from GitHub
- WHEN
gh api repos/dan-petty/devops-cli/code-scanning/alerts/270 --jq .stateruns after the scan - THEN the command prints
fixedordismissed.
Existing Tool Considered
No alternatives check has run. Trivy is the open, maintained tool that covers the need: its .trivyignore.yaml supports misconfigurations entries with id, paths, statement and expired_at. The change adds one entry and builds no code.
Key questions
- Which action judges KSV-0001: fix the daemonset, dismiss alert 270, or add a time-limited ignore entry?: Add a time-limited
.trivyignore.yamlentry for KSV-0001 onk8s/gpu-feature-discovery/daemonset.yaml. (best practice) [sources: k8s/gpu-feature-discovery/daemonset.yaml, SECURITY.md, openspec/specs/trivy-config-alerts/spec.md]- Rejected: Remove
privileged: truefrom the daemonset. The NVIDIA container needs privileged mode to read GPUs through NVML and/sys; the daemonset annotations cite fix(security): remove privileged mode from gpu-feature-discovery #5646 for the replacement. - Rejected: Dismiss alert 270 with no repository change. The next Trivy scan reports KSV-0001 again, and the repository keeps no reason or expiry.
- Chosen: Add a time-limited
.trivyignore.yamlentry. The entry records the reason and expiry in the repository, and Trivy reads it.
- Rejected: Remove
- What expiry date and statement does the ignore entry use?: Use
expired_at: 2027-03-31and the statementThe NVIDIA GPU feature discovery container requires privileged mode to read GPU devices through NVML and /sys until #5646 replaces it.(best practice) [sources: k8s/gpu-feature-discovery/daemonset.yaml, openspec/specs/trivy-config-alerts/spec.md]- Rejected: No expiry. The spec requires a dated ignore entry, and the issue requires a time-limited entry.
- Rejected: A 30-day expiry. fix(security): remove privileged mode from gpu-feature-discovery #5646 is not likely done in 30 days, so the alert would reopen too soon.
- Chosen:
2027-03-31. The date gives about four months for fix(security): remove privileged mode from gpu-feature-discovery #5646 and forces a review before the next quarter.
- Does the change need a manual dismissal of alert 270?: No. The next Trivy scan with the ignore entry stops the finding, and GitHub closes the code scanning alert. If the alert stays open, dismiss it with the same reason. (best practice) [sources: SECURITY.md, openspec/specs/trivy-config-alerts/spec.md]
- Rejected: Dismiss alert 270 now. A dismissal with no repository change leaves no record and the next scan reopens the alert.
- Chosen: Let the next Trivy scan close the alert. The ignore entry is the source of truth, and the scan result closes the code scanning alert.
Fit
Fits in one pull request.
Suspected block
None.
Dependencies
None.
Activity
devops-cli-service commentedon Nov 18, 2026
Both judge Trivy-config alerts in the same daemonset.yaml file, but the candidate targets rule KSV-0001 while 5371 targets KSV-0017.[-]fix(security): judge Trivy-config KSV-0001 in k8s/gpu-feature-discovery/daemonset.yaml[/-][+]fix(security): Judge KSV-0001 in k8s/gpu-feature-discovery/daemonset.yaml[/+]devops-cli-service commentedon Nov 18, 2026
The job shortened the title of this item. The summary had 71 characters, and the limit is 60. The type and the scope stay.
fix(security): judge Trivy-config KSV-0001 in k8s/gpu-feature-discovery/daemonset.yamlfix(security): Judge KSV-0001 in k8s/gpu-feature-discovery/daemonset.yamldevops-cli-service commentedon Nov 19, 2026
Waiting for the alternatives check to run. The next refine round looks at the item again after the check records a verdict.
dan-petty commentedon Nov 26, 2026
Closed: step 17 (#7317) deleted
k8s/gpu-feature-discovery/daemonset.yaml, and code scanning shows alert 270 as fixed on 2026-11-26.No manifest of this repository needs a change and no ignore entry is needed.