Skip to content

fix(security): judge Trivy KSV-0118 in kubernetes_adversary.yaml #6268

Not planned

Description

@github-actions

Trivy reports a misconfiguration that no issue names.

  • Rule: KSV-0118
  • 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 the HIGH misconfiguration KSV-0118 on tests/fixtures/prompt_adversaries/kubernetes_adversary.yaml as alert 285. The file is a prompt-adversary fixture. It must keep the insecure DaemonSet to test prompt injection. The change adds a dated .trivyignore.yaml entry with a reason. The alert then clears without weakening the fixture.

Acceptance criteria

Requirement: KSV-0118 is suppressed for the prompt-adversary fixture

The Trivy config scan SHALL report no KSV-0118 finding for tests/fixtures/prompt_adversaries/kubernetes_adversary.yaml.

Scenario: Dated ignore entry hides KSV-0118

  • WHEN I run trivy config --ignorefile .trivyignore.yaml tests/fixtures/prompt_adversaries/kubernetes_adversary.yaml.
  • THEN The command exits 0 and its output holds no KSV-0118 finding for the fixture path.

Requirement: The ignore entry is time-limited

The .trivyignore.yaml entry for KSV-0118 MUST name the fixture path, give a reason and set an expired_at date.

Scenario: The ignore entry expires

  • WHEN I run trivy config --ignorefile .trivyignore.yaml tests/fixtures/prompt_adversaries/kubernetes_adversary.yaml after the entry's expired_at date.
  • THEN The command reports KSV-0118 for the fixture path again.

Existing Tool Considered

No alternatives check has run. Trivy is the open, maintained scanner that reports KSV-0118. It covers detection and dated suppression through .trivyignore.yaml. It lacks automatic remediation. The change uses that suppression and adds no code.

Key questions

  • What does the prompt-adversary fixture contain?: The fixture is a DaemonSet named injection-daemon in namespace kube-system. It has one container named agent. The container has no securityContext. The file holds prompt-injection comments and an annotation. [sources: tests/fixtures/prompt_adversaries/kubernetes_adversary.yaml]
  • How should the project judge the HIGH KSV-0118 alert on the prompt-adversary fixture?: Add a time-limited .trivyignore.yaml entry for KSV-0118 on the fixture. The fixture must keep the insecure DaemonSet to test prompt injection. A fix to the manifest would remove the target of that test. (best practice) [sources: SECURITY.md, tests/fixtures/prompt_adversaries/kubernetes_adversary.yaml]
    • Rejected: Fix the manifest. It removes the insecure DaemonSet that the prompt-adversary test needs.
    • Rejected: Dismiss the alert with a reason. The project records suppressions in .trivyignore.yaml with an expiry. A dismissal leaves no dated reminder.
    • Chosen: Add a dated .trivyignore.yaml entry. It clears the alert, keeps the fixture, and expires so the next scan reminds the owner.

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-0118 in tests/fixtures/prompt_adversaries/kubernetes_adversary.yaml[/-] [+]fix(security): judge Trivy KSV-0118 in kubernetes_adversary.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 90 characters, and the limit is 60. The type and the scope stay.

    • Before: fix(security): judge Trivy-config KSV-0118 in tests/fixtures/prompt_adversaries/kubernetes_adversary.yaml
    • After: fix(security): judge Trivy KSV-0118 in kubernetes_adversary.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 19, 2026

    @dan-petty
    Owner

    Owner decision of 2026-11-19: trivy config skips tests/fixtures. #5790 adds the skip and deletes the dated entries of the fixtures. When the alert closes after that merge, close this item.

  8. dan-petty commented on Nov 29, 2026

    @dan-petty
    Owner

    Closing as not planned per the owner decision comment: #5790 merged and closed Trivy-config alert 285 (KSV-0118 on tests/fixtures/prompt_adversaries/kubernetes_adversary.yaml, state: fixed).

  9. removed
    status/new
    on Nov 29, 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