Skip to content

fix(security): Judge KSV-0001 in k8s/gpu-feature-discovery/daemonset.yaml #6972

Backlog

Description

@github-actions

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-0001 finding for k8s/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 dismissed or fixed.

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 allowPrivilegeEscalation is 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 annotation ignore-check.kube-linter.io/privilege-escalation-container for 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.yaml for KSV-0001 at k8s/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: false in 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.

Fit

Fits in one pull request.

Suspected block

None.

Dependencies

None.

Activity

  1. added
    type/bug
    scope/security
    on Nov 24, 2026
  2. added
    status/new
    value/medium
    effort/low
    on Nov 24, 2026
  3. devops-cli-service commented on Nov 24, 2026

    @devops-cli-service
    Contributor
    • Possible duplicate: fix(security): Judge KSV-0001 in k8s/gpu-feature-discovery/daemonset.yaml #6386, which may ask for the same change. The model names 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.yaml as 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.
  4. changed the title [-]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[/+] on Nov 24, 2026
  5. devops-cli-service commented on Nov 24, 2026

    @devops-cli-service
    Contributor

    The job shortened the title of this item. The summary had 71 characters, and the limit is 60. The type and the scope stay.

    • Before: fix(security): judge Trivy-config KSV-0001 in k8s/gpu-feature-discovery/daemonset.yaml
    • After: fix(security): Judge KSV-0001 in k8s/gpu-feature-discovery/daemonset.yaml
    • Source of the summary: the background model
  6. devops-cli-service commented on Nov 24, 2026

    @devops-cli-service
    Contributor

    Next step: the alternatives check records a verdict. See the section Proposed design of the body.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    effort/lowpriority/p2-mediumscope/securitystatus/newtype/bugvalue/medium

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions