Skip to content

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

Not planned

Description

@github-actions

Update 2026-11-26 (infra move): Do not fix this manifest.

dan-petty/homelab removed GPU feature discovery, and the copy here deploys nothing. Step 17 (#7290) deletes it. After that merge, close this item when alert 270 shows fixed. Do not add an ignore entry.


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 for the privileged GPU feature discovery daemonset, and no issue names that alert. The container needs privileged mode to read GPU devices through NVML and /sys until #5646 replaces it. The change records a time-limited .trivyignore.yaml entry with a reason and an expiry date, so the alert closes and the risk stays visible.

Acceptance criteria

Requirement: Time-limited KSV-0001 ignore entry

The repository SHALL hold a time-limited Trivy ignore entry for KSV-0001 on k8s/gpu-feature-discovery/daemonset.yaml.

Scenario: The Trivy scan skips the privileged GPU daemonset

  • WHEN trivy config --ignorefile .trivyignore.yaml k8s/gpu-feature-discovery/daemonset.yaml runs before the entry expiry
  • THEN the command reports no KSV-0001 finding for k8s/gpu-feature-discovery/daemonset.yaml.

Requirement: Ignore entry statement and expiry

The ignore entry MUST hold a statement that names #5646 and an expired_at date.

Scenario: The ignore entry is valid and dated

  • WHEN yq -e '.misconfigurations[] | select(.id | test("KSV-0001$")) | select(.paths[] == "k8s/gpu-feature-discovery/daemonset.yaml") | select(.statement | test("#5646")) | .expired_at' .trivyignore.yaml runs
  • THEN the command prints a date and exits 0.

Requirement: Code scanning alert closes

The open code scanning alert 270 MUST close after the next Trivy scan reads the ignore entry.

Scenario: The alert state is read from GitHub

  • WHEN gh api repos/dan-petty/devops-cli/code-scanning/alerts/270 --jq .state runs after the scan
  • THEN the command prints fixed or dismissed.

Existing Tool Considered

No alternatives check has run. Trivy is the open, maintained tool that covers the need: its .trivyignore.yaml supports misconfigurations entries with id, paths, statement and expired_at. The change adds one entry and builds no code.

Key questions

  • Which action judges KSV-0001: fix the daemonset, dismiss alert 270, or add a time-limited ignore entry?: Add a time-limited .trivyignore.yaml entry for KSV-0001 on k8s/gpu-feature-discovery/daemonset.yaml. (best practice) [sources: k8s/gpu-feature-discovery/daemonset.yaml, SECURITY.md, openspec/specs/trivy-config-alerts/spec.md]
    • Rejected: Remove privileged: true from the daemonset. The NVIDIA container needs privileged mode to read GPUs through NVML and /sys; the daemonset annotations cite fix(security): remove privileged mode from gpu-feature-discovery #5646 for the replacement.
    • Rejected: Dismiss alert 270 with no repository change. The next Trivy scan reports KSV-0001 again, and the repository keeps no reason or expiry.
    • Chosen: Add a time-limited .trivyignore.yaml entry. The entry records the reason and expiry in the repository, and Trivy reads it.
  • What expiry date and statement does the ignore entry use?: Use expired_at: 2027-03-31 and the statement The NVIDIA GPU feature discovery container requires privileged mode to read GPU devices through NVML and /sys until #5646 replaces it. (best practice) [sources: k8s/gpu-feature-discovery/daemonset.yaml, openspec/specs/trivy-config-alerts/spec.md]
  • Does the change need a manual dismissal of alert 270?: No. The next Trivy scan with the ignore entry stops the finding, and GitHub closes the code scanning alert. If the alert stays open, dismiss it with the same reason. (best practice) [sources: SECURITY.md, openspec/specs/trivy-config-alerts/spec.md]
    • Rejected: Dismiss alert 270 now. A dismissal with no repository change leaves no record and the next scan reopens the alert.
    • Chosen: Let the next Trivy scan close the alert. The ignore entry is the source of truth, and the scan result closes the code scanning alert.

Fit

Fits in one pull request.

Suspected block

None.

Dependencies

None.

Activity

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

    @devops-cli-service
    Contributor
  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 18, 2026
  5. devops-cli-service commented on Nov 18, 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 19, 2026

    @devops-cli-service
    Contributor

    Waiting for the alternatives check to run. The next refine round looks at the item again after the check records a verdict.

  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 270 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