Skip to content

fix(security): Judge Trivy-config KSV-0012 in gpu-feature-discovery #6973

Not planned

Description

@github-actions

Update 2026-11-26 (infra move): gpu-feature-discovery is removed from the cluster.

dan-petty/homelab removed it because it labels nothing (dan-petty/homelab#234). k8s/gpu-feature-discovery/ in devops-cli deploys nothing, and step 17 (#7290) deletes it. Do not change the manifest. Alert 271 was still open on 2026-11-26. Close this issue when #7290 is merged and the alert shows fixed.


Trivy reports a misconfiguration that no issue names.

  • Rule: KSV-0012
  • 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-0012 on the GPU feature discovery DaemonSet. The container must stay privileged to read the GPUs through NVML, and Kubernetes forces allowPrivilegeEscalation to true for a privileged container. The issue adds a dated Trivy ignore entry until #5646 removes the privileged requirement.

Acceptance criteria

Requirement: Dated ignore entry for KSV-0012

The repository SHALL hold a Trivy ignore entry for KSV-0012 on k8s/gpu-feature-discovery/daemonset.yaml with a statement that names #5646 and an expiry date after the current date.

Scenario: Trivy scan suppresses the active entry

  • WHEN trivy config --ignorefile .trivyignore.yaml k8s/gpu-feature-discovery/daemonset.yaml runs before the expiry date.
  • THEN The command prints no KSV-0012 result for k8s/gpu-feature-discovery/daemonset.yaml.

Existing Tool Considered

No alternatives check has run. Trivy (Apache-2.0, maintained by Aqua Security) already covers the need: it reports KSV-0012 and reads a dated misconfigurations entry in .trivyignore.yaml. It lacks a valid manifest fix, because Kubernetes forces allowPrivilegeEscalation to true when privileged is true. The proposal adds the dated ignore entry and builds no code, so it has no build cost.

Key questions

  • Which action judges KSV-0012: fix the manifest, dismiss the alert, or add a dated ignore entry?: Add a misconfigurations entry to .trivyignore.yaml with id: KSV-0012, paths: [k8s/gpu-feature-discovery/daemonset.yaml], a statement that names fix(security): remove privileged mode from gpu-feature-discovery #5646, and expired_at: 2027-02-28. (best practice) [sources: SECURITY.md, k8s/gpu-feature-discovery/daemonset.yaml, .trivyignore.yaml]
    • Rejected: Set allowPrivilegeEscalation: false in the DaemonSet. Kubernetes forces this field to true when privileged: true; the API rejects the manifest.
    • Rejected: Dismiss alert 271 in GitHub code scanning with a reason. The dismissal leaves no dated record in the repository, and the next scan can reopen the alert.
    • Chosen: Add a dated ignore entry to .trivyignore.yaml. The entry records the reason and an expiry in the repository, and Trivy reads it on each scan.
  • Why does the container need privileged: true?: The container runs the NVIDIA GPU feature discovery binary. It reads the GPUs through NVML and the PCI devices from /sys. The manifest sets privileged: true and mounts /sys for that read. fix(security): remove privileged mode from gpu-feature-discovery #5646 removes the privileged requirement. [sources: k8s/gpu-feature-discovery/daemonset.yaml]
  • What expiry date should the ignore entry use?: Use 2027-02-28. It is 90 days after the refinement date and forces a review before the next quarter. Renew it only with a new issue if fix(security): remove privileged mode from gpu-feature-discovery #5646 is not done. (best practice) [sources: SECURITY.md, k8s/gpu-feature-discovery/daemonset.yaml]
    • Chosen: 90 days from refinement (2027-02-28). A short expiry forces a review and matches the time-limited policy.
    • Rejected: No expiry. The policy requires a time-limited entry; Trivy treats an entry with no expiry as active forever.
    • Rejected: One year (2027-11-30). A long expiry hides the alert after the tracking item can finish, so it delays the review.

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
  4. changed the title [-]fix(security): judge Trivy-config KSV-0012 in k8s/gpu-feature-discovery/daemonset.yaml[/-] [+]fix(security): Judge Trivy-config KSV-0012 in gpu-feature-discovery[/+] 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-0012 in k8s/gpu-feature-discovery/daemonset.yaml
    • After: fix(security): Judge Trivy-config KSV-0012 in gpu-feature-discovery
    • 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.

  7. dan-petty commented on Nov 26, 2026

    @dan-petty
    Owner

    Closed: step 17 (#7317) deleted k8s/gpu-feature-discovery/daemonset.yaml, and code scanning shows alert 271 as fixed on 2026-11-26.

    No manifest of this repository needs a change and no ignore entry is needed.

  8. removed
    status/new
    on Nov 26, 2026
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/securitytype/bugvalue/medium

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions