Repository navigation
Description
Trivy reports a misconfiguration that no issue names.
- Rule: KSV-0014
- Path: k8s/gpu-feature-discovery/daemonset.yaml
- Severity: HIGH
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 config reports KSV-0014 for k8s/gpu-feature-discovery/daemonset.yaml (alert 268, HIGH): the gpu-feature-discovery container has no read-only root file system. The container sets only privileged: true. SECURITY.md makes the file fix the first choice, so the change sets readOnlyRootFilesystem: true and keeps the privileged access that the dated KSV-0017 entry covers. If a GPU node shows that gpu-feature-discovery writes to its own root file system, the fallback is a dated .trivyignore.yaml entry with a statement and an expiry, under the limits of "A Finding with No Fix".
Acceptance criteria
Requirement: Read-only root file system
The gpu-feature-discovery container SHALL set readOnlyRootFilesystem to true.
Scenario: The manifest sets a read-only root file system
- WHEN A test loads k8s/gpu-feature-discovery/daemonset.yaml and reads the securityContext of the gpu-feature-discovery container.
- THEN The test finds readOnlyRootFilesystem set to true.
Requirement: Privileged GPU access stays
The change MUST keep privileged: true and the two hostPath mounts of the gpu-feature-discovery container.
Scenario: The privileged access is unchanged
- WHEN A test loads k8s/gpu-feature-discovery/daemonset.yaml.
- THEN The test finds privileged set to true and the hostPath volumes output-dir and host-sys.
Requirement: No KSV-0014 result
The IaC scan SHALL report no KSV-0014 result for k8s/gpu-feature-discovery/daemonset.yaml.
Scenario: A Trivy config run on the folder
- WHEN trivy config runs on k8s/gpu-feature-discovery with the repository ignore file and the check update off.
- THEN The scan prints no result whose ID is KSV-0014 for that path.
Existing Tool Considered
No alternatives check has run. Trivy config covers the need: the repository already runs it in the Security Scan step and in .github/workflows/trivy-config-alerts.yml, it reports KSV-0014, and it reads .trivyignore.yaml. It lacks a fix: it names the missing field and changes no manifest. The change builds no code; it adds one YAML field and one test, so its cost is minutes of edit and review, not tokens of build and upkeep.
Key questions
- Which part of k8s/gpu-feature-discovery/daemonset.yaml does KSV-0014 name?: The container securityContext holds only privileged: true. KSV-0014 is the Trivy check for a container with no read-only root file system, so it names the missing readOnlyRootFilesystem field. Refine confirms the rule text from the Trivy Kubernetes check documentation. [sources: k8s/gpu-feature-discovery/daemonset.yaml, .trivyignore.yaml]
- Does the gpu-feature-discovery container write to its own root file system?: No path shows a write there. The container writes the feature file to the output-dir hostPath mount at /etc/kubernetes/node-feature-discovery/features.d and reads /sys from the host-sys mount. A GPU node confirms this when the manifest rolls out. [sources: k8s/gpu-feature-discovery/daemonset.yaml]
- Should the change fix the manifest, add an ignore entry, or dismiss the alert?: Fix the manifest. SECURITY.md makes the fix the first choice, and no evidence shows that a read-only root file system breaks the workload. (best practice) [sources: SECURITY.md]
- Chosen: Set readOnlyRootFilesystem: true in the manifest. SECURITY.md names the file fix as the first choice, and the container writes only to its mounted paths.
- Rejected: Add a KSV-0014 entry to .trivyignore.yaml. SECURITY.md allows an ignore entry only when the fix breaks the workload or needs an unreleased change, and neither holds here.
- Rejected: Dismiss the alert in code scanning. SECURITY.md lets only a person dismiss an alert, and an agent does not.
- How does the change keep the privileged GPU access that KSV-0017 names?: Keep privileged: true and the two hostPath mounts. The dated KSV-0017 entry in .trivyignore.yaml stays until 2026-11-17, and the fix adds only readOnlyRootFilesystem: true. (best practice) [sources: .trivyignore.yaml, k8s/gpu-feature-discovery/daemonset.yaml]
- Chosen: Keep privileged and add a read-only root file system. gpu-feature-discovery needs the NVIDIA device and sysfs access, and the KSV-0017 entry already covers that access until its date.
- Rejected: Drop privileged in the same change. gpu-feature-discovery loses device and sysfs access, and the KSV-0017 entry would stay with no cause.
- How does a test check the fix offline?: A test parses the manifest and asserts readOnlyRootFilesystem true on the gpu-feature-discovery container. The
Security Scanstep of CI then shows that the alert closes. (best practice) [sources: SECURITY.md, tests/invariants/test_k8s_mcp_server_policies.py]- Chosen: A YAML-parse test in tests/invariants/. It runs offline with no Trivy cache, and the folder already holds manifest invariants such as test_k8s_mcp_server_policies.py.
- Rejected: Run trivy config inside the test. It needs the Trivy check bundle and is slower, and the CI scan already covers the rule.
Fit
Fits in one pull request.
Suspected block
None.
Dependencies
None.
Activity
devops-cli-service commentedon Nov 15, 2026
The alert is a live HIGH severity security misconfiguration that needs a judgement.Judge Trivy-config alert 268 for rule KSV-0014 in k8s/gpu-feature-discovery/daemonset.yaml by a fix, a dismissal or a time-limited .trivyignore.yaml entry.as the change that both ask for.Item 5639 names the same rule KSV-0014, the same path and the same alert 268, so one delivery closes both.A person closes one of the two if that is so.[-]fix(security): judge Trivy-config KSV-0014 in k8s/gpu-feature-discovery/daemonset.yaml[/-][+]fix(security): Judge KSV-0014 in gpu-feature-discovery daemonset[/+]devops-cli-service commentedon Nov 15, 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-0014 in k8s/gpu-feature-discovery/daemonset.yamlfix(security): Judge KSV-0014 in gpu-feature-discovery daemonsetdevops-cli-service commentedon Nov 15, 2026
Waiting for the alternatives check to run. The next refine round looks at the item again after the check records a verdict.
fix(security): configure read-only root file system for GFD (#5791)
fix(security): configure read-only root file system for GFD (#5791)
chore(main): release 0.153.0 (#5830)
devops-cli-service commentedon Nov 15, 2026
Released in v0.153.0: https://github.com/dan-petty/devops-cli/releases/tag/v0.153.0
devops-cli-service commentedon Nov 15, 2026
Live since 2026-11-15 13:55 UTC