Repository navigation
Description
Trivy reports a misconfiguration that no issue names.
- Rule: KSV-0013
- Path: k8s/devops/cronjob-repos-drift.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-0013, a medium misconfiguration, for k8s/devops/cronjob-repos-drift.yaml. The pod sets non-root values, but the container securityContext does not repeat them. The change sets runAsNonRoot and runAsUser on the container and makes the Trivy scan clean.
Acceptance criteria
Requirement: Container non-root security context
The repos-drift container MUST set runAsNonRoot: true and runAsUser: 1000 in its container securityContext.
Scenario: Trivy config scan is clean
- WHEN
uv run devops review path k8s/devops/cronjob-repos-drift.yamlruns - THEN The review reports no KSV-0013 finding for
k8s/devops/cronjob-repos-drift.yaml.
Existing Tool Considered
No alternatives check has run. Trivy is the open, maintained scanner that reports KSV-0013, and the repository already uses it in its review tools (SECURITY.md). The change builds no code. It only sets fields in the Kubernetes manifest, so it has no build cost.
Key questions
- Which remedy does SECURITY.md allow for KSV-0013: fix the file, dismiss the alert, or add a time-limited ignore entry?: Fix the file. Add
runAsNonRoot: trueandrunAsUser: 1000to the containersecurityContext. The pod already sets these values. The container repeats them, and the Trivy scan then passes. A dismissal has no evidence of a false positive. An ignore entry is not needed because a permanent fix is available. (best practice) [sources: SECURITY.md, k8s/devops/cronjob-repos-drift.yaml]- Chosen: Fix the manifest. The container can set the non-root fields with no behavior change, and the scan then passes.
- Rejected: Dismiss the alert. The issue shows no false positive. The container context does not repeat the non-root fields.
- Rejected: Add a time-limited ignore entry. A permanent manifest fix exists, so SECURITY.md does not need an ignore entry.
Fit
Fits in one pull request.
Suspected block
None.
Dependencies
None.
Activity
devops-cli-service commentedon Nov 25, 2026
Both judge a Trivy-config alert under the same SECURITY.md process, but target different rules and different files.[-]fix(security): judge Trivy-config KSV-0013 in k8s/devops/cronjob-repos-drift.yaml[/-][+]fix(security): Judge Trivy-config KSV-0013 in cronjob-repos-drift.yaml[/+]devops-cli-service commentedon Nov 25, 2026
The job shortened the title of this item. The summary had 66 characters, and the limit is 60. The type and the scope stay.
fix(security): judge Trivy-config KSV-0013 in k8s/devops/cronjob-repos-drift.yamlfix(security): Judge Trivy-config KSV-0013 in cronjob-repos-drift.yamldevops-cli-service commentedon Nov 25, 2026
Next step: the alternatives check records a verdict. See the section Proposed design of the body.
dan-petty commentedon Nov 28, 2026
Superseded by #7562, which tracks the same Trivy-config KSV-0013 alert (1188) on
k8s/devops/cronjob-repos-drift.yaml.