Skip to content

fix(security): Judge KSV-0109 in k8s/devops/renovate/configmap.yaml #6859

Done

Description

@github-actions

Trivy reports a misconfiguration that no issue names.

  • Rule: KSV-0109
  • Path: k8s/devops/renovate/configmap.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-0109 at k8s/devops/renovate/configmap.yaml with severity HIGH, and no issue names it. The ConfigMap holds the Renovate option name token and a read of the token file, not a secret value; the token cannot move to an environment variable without exposing it to post-upgrade tasks (#6020). This item records the judgment as one dated entry in .trivyignore.yaml, with the 3-day expiry that SECURITY.md allows an agent. The entry stops the report and closes alert 286; when it expires, the rule judges the file again.

Acceptance criteria

Requirement: The ignore file holds a dated entry for KSV-0109

.trivyignore.yaml MUST hold one misconfigurations entry for KSV-0109 at k8s/devops/renovate/configmap.yaml, with a statement that gives the reason and names #6859, and an expired_at date.

Scenario: The IaC scan hides the false positive

  • WHEN uv run devops scan report --scanner trivy-config runs from the repository root after the merge
  • THEN the report lists no KSV-0109 finding for k8s/devops/renovate/configmap.yaml.

Requirement: Alert 286 closes

The next Security Scan on main MUST close alert 286 once the entry hides the finding.

Scenario: The alert state after the next Security Scan

  • WHEN the next Security Scan on main completes after the merge
  • THEN uv run devops gh api repos/dan-petty/devops-cli/code-scanning/alerts/286 --jq .state prints fixed or dismissed.

Requirement: The ignore entry expires and the rule judges the file again

The entry MUST set expired_at to the day of the entry plus 3 days, the agent limit of SECURITY.md, so that the rule judges the file again at that date.

Scenario: The finding returns after the expiry date

  • WHEN the expired_at date passes and uv run devops scan report --scanner trivy-config runs from the repository root
  • THEN the report lists a KSV-0109 finding for k8s/devops/renovate/configmap.yaml again.

Existing Tool Considered

No alternatives check has run on this item. Trivy itself covers the need: it is the pinned, maintained scanner (src/devops_cli/security/trivy.py:223), and its YAML ignore file .trivyignore.yaml holds a misconfigurations entry with the rule id, the paths, a statement and expired_at (.trivyignore.yaml:1-6). TrivyConfigScanner names that file with --ignorefile when the scan directory holds it (src/devops_cli/security/trivy.py:231-246), so the scan skips the finding until the expiry date. The change builds no code: it writes one YAML entry, so it has no build cost.

Key questions

  • Does the ConfigMap hold a secret value?: No. config.js reads the token from the file that the init container writes, removes the file at once, and exports the value under the quoted key 'token'; the ConfigMap holds no token value. [sources: k8s/devops/renovate/configmap.yaml:30-45, openspec/changes/archive/2026-11-18-6020-keep-the-renovate-token-away-from/design.md:5-6]
  • How does the project judge this Trivy-config false positive?: Add one misconfigurations entry for KSV-0109 and the path to .trivyignore.yaml. Its statement gives the reason and names fix(security): Judge KSV-0109 in k8s/devops/renovate/configmap.yaml #6859, and its expired_at is the day of the entry plus 3 days, the agent limit of SECURITY.md. An agent may renew the entry up to 14 days in all; a longer date is the owner's decision, which no source records. (best practice) [sources: SECURITY.md:105-114, .trivyignore.yaml:1-6, openspec/specs/trivy-config-alerts/spec.md:57-62, k8s/devops/renovate/configmap.yaml:30-45]
    • Rejected: Fix the file so the rule does not fire. The trigger is the Renovate option name token in config.js; Renovate reads the token from that option, and an environment variable was rejected because a child process inherits it (fix(k8s): Keep the Renovate token away from upgrade tasks #6020).
    • Rejected: Dismiss alert 286 with a reason and change no file. An agent does not dismiss an alert (SECURITY.md:114), and the repository records no reason; a later scan reports the finding again.
    • Chosen: Add one dated entry to .trivyignore.yaml with a 3-day expiry. The scan stops the report, GitHub closes alert 286, and the expiry makes the rule judge the file again. SECURITY.md:113 sets 3 days for an agent.
    • Rejected: Add one dated entry to .trivyignore.yaml with a 90-day expiry. SECURITY.md:113 caps an agent's entry at 3 days and 14 days in all; a longer date is the owner's decision, which no source records.
  • Does the change need code in the scan or the workflow?: No. TrivyConfigScanner already names .trivyignore.yaml with --ignorefile when the scan directory holds it, and devops scan report starts the scan in the directory that holds its targets. The change writes one YAML entry and no code. [sources: src/devops_cli/security/trivy.py:231-246, src/devops_cli/security/base.py:710-726, openspec/specs/trivy-config-alerts/spec.md:57-62]
  • Which check shows that alert 286 closes?: uv run devops gh api repos/dan-petty/devops-cli/code-scanning/alerts/286 --jq .state prints fixed after the next Security Scan on main reports no KSV-0109 for the path, or dismissed if a person dismissed it. The GitHub code scanning alert API returns state as open, fixed or dismissed (fetched 2026-11-23). uv run devops scan alerts --repo dan-petty/devops-cli also lists no open Trivy-config group for the path, because the filer reads only open alerts. [sources: docs/commands/gh.md:7-31, src/devops_cli/security/alert_filer.py:147, CHANGELOG.md:5192, https://github.blog/changelog/2020-09-09-code-scanning-api/]

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. HIGH severity security misconfiguration is open and unaddressed.
    • Possible duplicate: fix(security): Judge KSV-0109 in k8s/devops/renovate/configmap.yaml #6751, which may ask for the same change. The model names Judge the KSV-0109 Trivy-config alert 286 on k8s/devops/renovate/configmap.yaml as the change that both ask for. Same rule, path, alert 286, and acceptance criteria as item 6751. 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-0109 in k8s/devops/renovate/configmap.yaml[/-] [+]fix(security): Judge KSV-0109 in k8s/devops/renovate/configmap.yaml[/+] 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 65 characters, and the limit is 60. The type and the scope stay.

    • Before: fix(security): judge Trivy-config KSV-0109 in k8s/devops/renovate/configmap.yaml
    • After: fix(security): Judge KSV-0109 in k8s/devops/renovate/configmap.yaml
    • 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