Skip to content

fix(security): Judge Trivy-config KSV-0014 in valkey.yaml #6383

Not planned

Description

@github-actions

Trivy reports a misconfiguration that no issue names.

  • Rule: KSV-0014
  • Path: tests/fixtures/research/repo/k8s/llm/valkey.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-0014 at HIGH severity on tests/fixtures/research/repo/k8s/llm/valkey.yaml. The two containers of the fixture set no readOnlyRootFilesystem. GitHub alert 287 is open. This change adds the control to each container, so the next config scan closes the alert.

Acceptance criteria

Requirement: Read-only root file system in the valkey fixture

Each container of tests/fixtures/research/repo/k8s/llm/valkey.yaml SHALL set securityContext.readOnlyRootFilesystem to true.

Scenario: Trivy config scan of the fixture

  • WHEN A person runs uv run devops review path tests/fixtures/research/repo/k8s/llm/valkey.yaml after uv run devops review fetch-databases.
  • THEN The Trivy row of the review reports no KSV-0014 finding for the fixture.

Requirement: Alert 287 closes after the next scan

The change SHALL clear alert 287, so that its state reads fixed after the next Trivy config scan of main.

Scenario: Read-back of the code-scanning alert

  • WHEN A person runs gh api repos/dan-petty/devops-cli/code-scanning/alerts/287 --jq .state after the scheduled config scan on main.
  • THEN The command prints fixed.

Existing Tool Considered

No alternatives check has run for this item. Trivy (aquasecurity/trivy) is the open, maintained tool that covers the need: its config scan reports KSV-0014, and its ignore file takes an expiry date for a suppression. The change writes no code of its own. It adds a securityContext of two lines to a test fixture, so the build cost is zero tokens and zero minutes.

Key questions

  • Which container setting does KSV-0014 check?: KSV-0014 checks securityContext.readOnlyRootFilesystem. Each container must set it to true. [sources: openspec/specs/trivy-config-alerts/spec.md]
  • How does the project judge a HIGH Trivy-config alert?: Fix the manifest. SECURITY.md puts the fix of the file first, a dismissal with a reason second and a dated .trivyignore.yaml entry last. An agent judges a non-CRITICAL alert within 14 days. (best practice) [sources: SECURITY.md, tests/fixtures/research/repo/k8s/llm/valkey.yaml]
    • Chosen: Set readOnlyRootFilesystem in the fixture. The control is settable, and a static test fixture never runs, so the root file system needs no write.
    • Rejected: Dismiss alert 287 with a reason. It leaves the manifest misconfigured and needs a person to act in GitHub.
    • Rejected: Add a dated .trivyignore.yaml entry. The project keeps dated entries for a workload that cannot set the control, and this fixture can.
  • Does the fix keep the purpose of the fixture?: Yes. The fixture keeps its two containers and its images valkey/valkey:9.1.2-alpine and example/untagged. The change adds a securityContext and changes nothing else. [sources: tests/fixtures/research/repo/k8s/llm/valkey.yaml]
  • Does alert 287 close without a person?: Yes. The Trivy config scan runs every day and uploads its result to code scanning. The alert closes when the upload holds no KSV-0014 at the fixture path. [sources: openspec/specs/trivy-config-alerts/spec.md]

Fit

Fits in one pull request.

Suspected block

None.

Dependencies

None.

Activity

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

    @devops-cli-service
    Contributor
  4. changed the title [-]fix(security): judge Trivy-config KSV-0014 in tests/fixtures/research/repo/k8s/llm/valkey.yaml[/-] [+]fix(security): Judge Trivy-config KSV-0014 in valkey.yaml[/+] on Nov 19, 2026
  5. devops-cli-service commented on Nov 19, 2026

    @devops-cli-service
    Contributor

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

    • Before: fix(security): judge Trivy-config KSV-0014 in tests/fixtures/research/repo/k8s/llm/valkey.yaml
    • After: fix(security): Judge Trivy-config KSV-0014 in valkey.yaml
    • Source of the summary: the background model
  6. devops-cli-service commented on Nov 19, 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 21, 2026

    @dan-petty
    Owner

    dan-petty/homelab#88 rebuilds k8s/llm/valkey.yaml on the infra Valkey base (dan-petty/infra#13), which sets a read-only root file system. KSV-0014 for this file then goes away; #6502 judges the same finding.

  8. dan-petty commented on Nov 26, 2026

    @dan-petty
    Owner

    Closed: alert 287 is fixed (2026-11-24).

    #7024 added the security context to tests/fixtures/research/repo/k8s/llm/valkey.yaml.

  9. 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