Repository navigation
Description
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, a MEDIUM misconfiguration, on the GPU feature discovery DaemonSet at k8s/gpu-feature-discovery/daemonset.yaml, and alert 270 is open. The container must stay privileged to read the GPUs through NVML, so the check cannot pass. The change adds a dated, reasoned entry to .trivyignore.yaml so the alert closes and the rule returns when the entry expires.
Acceptance criteria
Requirement: Dated ignore entry for KSV-0001
The .trivyignore.yaml SHALL hold an entry for rule KSV-0001 on path k8s/gpu-feature-discovery/daemonset.yaml with a reason and an expiry date.
Scenario: The k8s IaC scan reads the entry
- WHEN A person runs
uv run devops ci --check --only k8s. - THEN The command exits 0 and reports no
KSV-0001finding fork8s/gpu-feature-discovery/daemonset.yaml.
Requirement: The open KSV-0001 alert is closed
The change MUST close code scanning alert 270 or mark it dismissed with the reason that the ignore entry records.
Scenario: The code scanning alert shows the closed state
- WHEN A person runs
gh api repos/dan-petty/devops-cli/code-scanning/alerts/270 --jq .state. - THEN The command prints
dismissedorfixed.
Existing Tool Considered
No alternatives check has run. Trivy (aquasecurity/trivy) is the open, maintained tool that reports KSV-0001. It covers the detection and lacks a passing result for a privileged container, so the plan adds a dated entry to .trivyignore.yaml and builds no code.
Key questions
- What does the Trivy rule KSV-0001 check?: KSV-0001 reports a container process that can elevate its own privileges because
allowPrivilegeEscalationis not false. [sources: k8s/gpu-feature-discovery/daemonset.yaml] - Why does the GPU feature discovery container run privileged?: The container reads the GPUs through NVML and mounts
/sys. The manifest annotations cite fix(security): remove privileged mode from gpu-feature-discovery #5646 for the removal of the privileged mode. The manifest also carries the kube-linter annotationignore-check.kube-linter.io/privilege-escalation-containerfor the same reason. [sources: k8s/gpu-feature-discovery/daemonset.yaml] - How should the plan judge KSV-0001 on the privileged GPU feature discovery container?: Add a dated entry to
.trivyignore.yamlforKSV-0001atk8s/gpu-feature-discovery/daemonset.yaml. State that the container runs privileged to read the GPUs through NVML, and that fix(security): remove privileged mode from gpu-feature-discovery #5646 tracks the removal. Set an expiry date. (best practice) [sources: k8s/gpu-feature-discovery/daemonset.yaml, SECURITY.md]- Rejected: Set
allowPrivilegeEscalation: falsein the container securityContext. Kubernetes sets this value to true when the container is privileged, and the container needs privileged access to NVML. - Rejected: Remove
privileged: true. The container reads the GPUs through NVML. fix(security): remove privileged mode from gpu-feature-discovery #5646 tracks the removal and the change cannot do it now. - Rejected: Dismiss alert 270 in GitHub with a reason. A dismissal leaves no expiry in the repository. The ignore entry keeps the reason and the expiry with the code.
- Chosen: Add a dated ignore entry in
.trivyignore.yaml. The rule cannot pass while the container is privileged. The repository already uses dated ignore entries for the GPU workload.
- Rejected: Set
Fit
Fits in one pull request.
Suspected block
None.
Dependencies
None.
Activity
devops-cli-service commentedon Nov 24, 2026
Judge the KSV-0001 Trivy misconfiguration in k8s/gpu-feature-discovery/daemonset.yaml (alert 270): fix the file, dismiss the alert, or add a time-limited entry to .trivyignore.yamlas the change that both ask for.Same rule KSV-0001, same file, same alert 270, same acceptance criteria as #6386.A person closes one of the two if that is so.[-]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 24, 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 24, 2026
Next step: the alternatives check records a verdict. See the section Proposed design of the body.