Skip to content

fix(security): judge KSV-0014 in kubernetes_adversary.yaml #6267

Closed

Description

@github-actions

Trivy reports a misconfiguration that no issue names.

  • Rule: KSV-0014
  • Path: tests/fixtures/prompt_adversaries/kubernetes_adversary.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 misconfiguration KSV-0014 at tests/fixtures/prompt_adversaries/kubernetes_adversary.yaml as alert 284, and no issue names it. The file is the input of a prompt-adversary test, and its injected text names the read-only root file system requirement, so the violation must stay. This change adds one dated entry to .trivyignore.yaml with the rule, the path, a statement and an expiry. The scan then drops the result, and the alert closes.

Acceptance criteria

Requirement: The adversary fixture holds a dated ignore entry

The .trivyignore.yaml file MUST hold one entry that names rule KSV0014, the path tests/fixtures/prompt_adversaries/kubernetes_adversary.yaml, a statement and an expired_at date.

Scenario: The Trivy-config scan reads the entry

  • WHEN a person runs uv run devops review path tests/fixtures/prompt_adversaries/kubernetes_adversary.yaml at the merge commit
  • THEN the review reports no KSV-0014 finding for the fixture, and its Tool Runs table names the Trivy run.

Requirement: The open KSV-0014 alert closes

The IaC scan MUST report no open KSV-0014 alert for the fixture path while the entry is unexpired.

Scenario: The code-scanning alert of the fixture

  • WHEN the scheduled IaC scan runs on main after the merge, and a person runs gh api repos/dan-petty/devops-cli/code-scanning/alerts/284 --jq .state
  • THEN the state is fixed, and no open alert names rule KSV0014 at the fixture path.

Requirement: The change holds the ignore file only

The change MUST NOT change tests/fixtures/prompt_adversaries/kubernetes_adversary.yaml, because its injected text and its violation are the test input.

Scenario: The pull request touches one file

  • WHEN a person runs git diff --name-only origin/main...HEAD on the pull request
  • THEN the list holds .trivyignore.yaml only, and git diff origin/main...HEAD -- tests/fixtures/prompt_adversaries/kubernetes_adversary.yaml shows no change.

Existing Tool Considered

No alternatives check has run for this issue. Trivy (Aqua Security, open and maintained) covers the need: an entry of .trivyignore.yaml holds the rule id, the path, a statement and an expired_at date. The scan then drops the result, and the entry expires by itself. Trivy lacks the dismissal of the GitHub code-scanning alert; the next analysis of the branch closes the alert when the result is gone. This change builds no code, so it gives no build cost.

Key questions

  • How must the project judge the KSV-0014 alert for tests/fixtures/prompt_adversaries/kubernetes_adversary.yaml?: Add one time-limited entry to .trivyignore.yaml that names rule KSV0014, the fixture path, a statement and an expiry. Change no other file. (best practice) [sources: SECURITY.md, openspec/specs/trivy-config-alerts/spec.md, docs/adr/0005-review-findings-come-from-tools-not-models.md, CONTEXT.md, .trivyignore.yaml]
    • Rejected: Fix the fixture file. The fixture is the input of a prompt-adversary test, and its injected text names the read-only root file system requirement, so the violation must stay.
    • Rejected: Dismiss the alert on GitHub. A dismissal is no project configuration at the base revision, so a review run reports the finding again (ADR 0005).
    • Chosen: Add a dated .trivyignore.yaml entry. The judging policy names this option, and the trivy-config-alerts spec already uses dated entries for workloads that must keep a misconfiguration.
  • Which expired_at date must the entry carry?: A date 90 days after the merge, so the alert returns and forces a new judgment each quarter. (best practice) [sources: SECURITY.md, openspec/specs/trivy-config-alerts/spec.md]
    • Rejected: 30 days. The fixture purpose is stable, and a new issue each month costs more than the check saves.
    • Chosen: 90 days. One quarter fits the 14-day judgment window of an agent and the stable purpose of the fixture.
    • Rejected: No expiry. The judging policy of SECURITY.md requires a time-limited entry.
  • Does a test read tests/fixtures/prompt_adversaries/kubernetes_adversary.yaml as a non-compliant manifest?: Not verified in this round. The refined context names the fixture and its injection text, and no test path. Refine must read the tests that use tests/fixtures/prompt_adversaries/ before the entry is added. [sources: tests/fixtures/prompt_adversaries/kubernetes_adversary.yaml]
  • Does the IaC scan read .trivyignore.yaml and honor its expired_at date?: Yes. The trivy-config-alerts spec holds the requirement The IaC scan reads the ignore file with an expiry, and dated entries already cover the GPU workloads and the harbor template Dockerfile. [sources: openspec/specs/trivy-config-alerts/spec.md, .trivyignore.yaml]

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. added
    priority/p1-high
    on Nov 18, 2026
  5. changed the title [-]fix(security): judge Trivy-config KSV-0014 in tests/fixtures/prompt_adversaries/kubernetes_adversary.yaml[/-] [+]fix(security): judge KSV-0014 in kubernetes_adversary.yaml[/+] on Nov 18, 2026
  6. devops-cli-service commented on Nov 18, 2026

    @devops-cli-service
    Contributor

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

    • Before: fix(security): judge Trivy-config KSV-0014 in tests/fixtures/prompt_adversaries/kubernetes_adversary.yaml
    • After: fix(security): judge KSV-0014 in kubernetes_adversary.yaml
    • Source of the summary: the background model
  7. devops-cli-service commented on Nov 18, 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.

  8. added
    status/in-progress
    and removed
    status/new
    on Nov 18, 2026
  9. removed
    status/in-progress
    on Nov 18, 2026
  10. devops-cli-service commented on Nov 18, 2026

    @devops-cli-service
    Contributor
  11. devops-cli-service commented on Nov 18, 2026

    @devops-cli-service
    Contributor

    Live since 2026-11-18 13:25 UTC

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