Skip to content

fix(security): Judge Trivy-config KSV-0017 in gpu-feature-discovery #6858

Done

Description

@github-actions

Trivy reports a misconfiguration that no issue names.

  • Rule: KSV-0017
  • 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 reports KSV-0017 at HIGH for k8s/gpu-feature-discovery/daemonset.yaml, and alert 217 is open. KSV-0017 is the privileged-container check: the gpu-feature-discovery container sets privileged: true to read the GPU devices and /sys through NVML, and the dated .trivyignore.yaml entry that hid the finding expired on 2026-11-21, so the alert re-opened. The manifest fix waits on #5646, because removing privileged: true now breaks GPU discovery, so SECURITY.md's first choice is unavailable; the judgment renews the dated entry for three days, inside the agent's 14-day limit, adds no memory-backed /dev/shm mount (which would clear no KSV-0017 finding) and dismisses nothing.

Acceptance criteria

Requirement: Dated KSV-0017 entry for the GPU workload

The repository MUST hold a misconfigurations entry of .trivyignore.yaml for the rule KSV-0017 on the path k8s/gpu-feature-discovery/daemonset.yaml, with a statement that names the privileged GPU device and sysfs access and the tracking issue #5646, and an expired_at three days after the entry and no later than 2026-11-28.

Scenario: The IaC scan hides KSV-0017

  • WHEN uv run devops scan report --scanner trivy-config --json k8s/gpu-feature-discovery/daemonset.yaml runs from the repository root on a host that holds Trivy.
  • THEN The JSON holds no KSV-0017 finding for k8s/gpu-feature-discovery/daemonset.yaml.

Existing Tool Considered

No alternatives check has run; Trivy's own config scanner and its .trivyignore.yaml ignore file cover the need. Trivy is open, maintained and pinned by the repository, TrivyConfigScanner names the file with --ignorefile (src/devops_cli/security/trivy.py:243), and an entry holds the rule id, the paths, a statement and an expired_at. It lacks no part of the need. The change builds no code and adds no test: the live trivy config run is the proof.

Key questions

  • What does KSV-0017 require?: KSV-0017 is Trivy's privileged-container check: it requires that a container does not set securityContext.privileged: true. It is not a /dev/shm check, so a memory-backed emptyDir at /dev/shm clears no KSV-0017 finding. The gpu-feature-discovery container sets privileged: true at k8s/gpu-feature-discovery/daemonset.yaml:76, which is the finding. [sources: openspec/changes/archive/2026-10-28-2214-pin-kubeconform-drop-checkov/proposal.md:64, openspec/specs/trivy-config-alerts/spec.md:64, .trivyignore.yaml:17, k8s/gpu-feature-discovery/daemonset.yaml:76]
  • Why is the KSV-0017 alert open again?: The misconfigurations entry of KSV-0017 on the GPU daemonset carries expired_at: 2026-11-21 (.trivyignore.yaml:21), and the latest release of the staging commit is 2026-11-23 (CHANGELOG.md:5). Trivy stops applying an entry after its date, so the finding returns and alert 217 re-opens. [sources: .trivyignore.yaml:21, CHANGELOG.md:5, SECURITY.md:113]
  • How should the project judge the KSV-0017 alert?: Renew the dated .trivyignore.yaml entry for KSV-0017 on k8s/gpu-feature-discovery/daemonset.yaml, keeping the statement that names the privileged GPU device and sysfs access and the tracking issue fix(security): remove privileged mode from gpu-feature-discovery #5646. Leave the manifest unchanged, add no /dev/shm volume and dismiss no alert: the manifest fix needs fix(security): remove privileged mode from gpu-feature-discovery #5646, because removing privileged: true now breaks GPU discovery. (best practice) [sources: SECURITY.md:112, SECURITY.md:113, SECURITY.md:114, openspec/specs/trivy-config-alerts/spec.md:65, .trivyignore.yaml:17, k8s/gpu-feature-discovery/daemonset.yaml:18, k8s/gpu-feature-discovery/daemonset.yaml:76, openspec/changes/archive/2026-11-14-5640-judge-ksv-0017-in-k8s-gpu/design.md:5]
    • Chosen: Renew the dated ignore entry. SECURITY.md takes the fix first but allows the dated entry when the fix breaks the workload; fix(security): remove privileged mode from gpu-feature-discovery #5646 owns the manifest change, and the entry is already the recorded judgment for this rule and path (openspec/specs/trivy-config-alerts/spec.md:65).
    • Rejected: Add a memory-backed emptyDir at /dev/shm. KSV-0017 is the privileged-container check, so the mount changes no finding of that rule; the premise that the pod lacks a /dev/shm mount is not what the alert reports.
    • Rejected: Remove privileged: true now. GFD reads the GPU devices and /sys through NVML as a privileged container; the non-privileged manifest is fix(security): remove privileged mode from gpu-feature-discovery #5646, and removing the flag here breaks GPU discovery.
    • Rejected: Dismiss the alert in code scanning. SECURITY.md:114 says an agent does not dismiss an alert; a person does.
  • What expired_at date does the renewed entry take?: 2026-11-26, three days after 2026-11-23, the date of the latest release in CHANGELOG.md:5. The first KSV-0017 entry was written on 2026-11-14 (fix(security): Judge KSV-0017 in k8s/gpu-feature-discovery/daemonset.yaml #5640), so the agent's 14 days in all end on 2026-11-28, and this date stays inside them. A date past 2026-11-28 is the owner's decision, and the statement must name it. (best practice) [sources: SECURITY.md:80, SECURITY.md:84, CHANGELOG.md:5, openspec/changes/archive/2026-11-14-5640-judge-ksv-0017-in-k8s-gpu/proposal.md:11, .trivyignore.yaml:21]
    • Chosen: Three days, to 2026-11-26. The date is the day of the entry plus 3 days, and 2026-11-26 is 12 days after the first entry of 2026-11-14, inside the 14 days in all.
    • Rejected: A date past 2026-11-28. SECURITY.md:84 and SECURITY.md:113 leave a longer ignore to the owner, and this issue is a HIGH alert that an agent judges.
    • Rejected: No expired_at. SECURITY.md requires a time-limited entry, and an entry with no expired_at never expires, so the alert would stay hidden with no reminder.
  • How is the renewed entry proven, without a test that reads the ignore file?: With the live IaC scan: uv run devops scan report --scanner trivy-config --json k8s/gpu-feature-discovery/daemonset.yaml on a host that holds Trivy shows no KSV-0017 finding for the path. No pytest asserts a value of .trivyignore.yaml, because docs/TESTING.md:61 and test(security): delete the Trivy ignore tests that read the clock #6381 forbid a test that asserts a value of a manifest or a config file, and such a test fails when the date passes. (best practice) [sources: docs/TESTING.md:61, openspec/changes/archive/2026-11-19-6381-delete-clock-trivyignore-tests/proposal.md:5, tests/security/test_trivy_config_ignore.py:15, src/devops_cli/security/trivy.py:243, docs/commands/scan.md:259]
    • Chosen: Live trivy-config scan. Trivy applies the entry and reports no KSV-0017 finding for the path, and no test couples the repository to the date.
    • Rejected: A pytest that loads .trivyignore.yaml. docs/TESTING.md:61 forbids a test that asserts a value of a config file, and test(security): delete the Trivy ignore tests that read the clock #6381 deleted the tests that read the clock on an ignore entry because they failed every pull request after the date.

Fit

Fits in one pull request.

Suspected block

None.

Dependencies

None.

Activity

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

    @devops-cli-service
    Contributor
    • Priority: P1-High. A live HIGH severity security misconfiguration in a Kubernetes daemonset.
    • Possible duplicate: fix(security): Judge KSV-0017 in gpu-feature-discovery daemonset #5371, which may ask for the same change. The model names Judge Trivy-config alert KSV-0017 (alert 217) in k8s/gpu-feature-discovery/daemonset.yaml by fixing the file, dismissing the alert, or adding a time-limited entry to .trivyignore.yaml as the change that both ask for. The candidate and item 5371 both ask to judge the same KSV-0017 alert 217 in the same file with the same acceptance criteria. A person closes one of the two if that is so.
  4. added
    priority/p1-high
    on Nov 23, 2026
  5. changed the title [-]fix(security): judge Trivy-config KSV-0017 in k8s/gpu-feature-discovery/daemonset.yaml[/-] [+]fix(security): Judge Trivy-config KSV-0017 in gpu-feature-discovery[/+] on Nov 23, 2026
  6. devops-cli-service commented on Nov 23, 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-0017 in k8s/gpu-feature-discovery/daemonset.yaml
    • After: fix(security): Judge Trivy-config KSV-0017 in gpu-feature-discovery
    • Source of the summary: the background model
  7. devops-cli-service commented on Nov 23, 2026

    @devops-cli-service
    Contributor

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

  8. added
    owner/agent
    status/in-progress
    status/in-review
    and removed
    status/new
    status/in-progress
    on Nov 23, 2026
  9. removed
    status/in-review
    owner/agent
    on Nov 23, 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/p1-highscope/securitytype/bugvalue/medium

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions