Skip to content

fix(security): Judge Trivy-config KSV-0013 in cronjob-repos-drift.yaml #7396

Not planned

Description

@github-actions

Trivy reports a misconfiguration that no issue names.

  • Rule: KSV-0013
  • Path: k8s/devops/cronjob-repos-drift.yaml
  • Severity: MEDIUM

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-0013 for the runner image in k8s/devops/cronjob-repos-drift.yaml because the image line gives no tag. The file is correct for the cluster: Argo CD Image Updater sets the image digest in Application devops. The change adds a time-limited .trivyignore.yaml entry with the reason and an expiry. The code scanning alert then closes, and the exception stays visible.

Acceptance criteria

Requirement: KSV-0013 is suppressed

The repository MUST hold a time-limited .trivyignore.yaml entry that names KSV-0013, the CronJob path, Argo CD Image Updater and an expiry date, and suppresses the finding.

Scenario: Trivy config scan

  • WHEN A person runs trivy config --ignorefile .trivyignore.yaml --severity MEDIUM --exit-code 1 k8s/devops/cronjob-repos-drift.yaml at the repository root.
  • THEN The command exits 0 and its output holds no KSV-0013 finding.

Requirement: Pending a person after the merge

The code scanning alert 1188 MUST close after the change merges.

Scenario: Alert closure

  • WHEN A person runs devops gh api repos/dan-petty/devops-cli/code-scanning/alerts/1188 --jq .state after the pull request merges and the code scanning workflow runs.
  • THEN The command prints fixed.

Existing Tool Considered

No alternatives check has run. Trivy is the open, maintained tool that reports KSV-0013. It covers detection, and its .trivyignore.yaml covers a time-limited exception. It lacks the live image digest that Argo CD Image Updater sets in Application devops. The change adds no code; it records that gap in the ignore file.

Key questions

  • What does KSV-0013 report on k8s/devops/cronjob-repos-drift.yaml?: The runner image line image: ghcr.io/dan-petty/devops-cli/runner gives no tag. Trivy reads the missing tag as :latest and reports KSV-0013. [sources: k8s/devops/cronjob-repos-drift.yaml]
  • Why is the no-tag image line correct for this CronJob?: The kube-linter ignore annotation in the same file says Argo CD Image Updater sets the digest of the image in Application devops. The live object uses a digest, and the file keeps no tag for the updater. [sources: k8s/devops/cronjob-repos-drift.yaml]
  • Which action resolves the KSV-0013 alert?: Add a time-limited .trivyignore.yaml entry for KSV-0013 on k8s/devops/cronjob-repos-drift.yaml, with a statement that names Argo CD Image Updater and an expiry date. Do not pin a tag in the manifest and do not dismiss the alert only in GitHub. (best practice) [sources: SECURITY.md, k8s/devops/cronjob-repos-drift.yaml]
    • Rejected: Pin a fixed image tag or digest in the CronJob. The repository uses Argo CD Image Updater to set the digest in Application devops. A fixed value in this file goes stale and conflicts with that update path.
    • Rejected: Dismiss the alert in GitHub with a reason. The dismissal leaves no time limit or reason in the repository. The next scan can report the same alert, and no code review sees the exception.
    • Chosen: Add a time-limited .trivyignore.yaml entry. Trivy reads the entry, the repository records the reason and the expiry, and the code scanning alert closes when the scan no longer reports KSV-0013.
  • How long may the KSV-0013 exception stay?: 90 days after the merge. The entry then expires and Trivy reports KSV-0013 again. (best practice) [sources: SECURITY.md]
    • Chosen: 90 days. It matches a quarterly review of a medium-severity exception and keeps the exception visible.
    • Rejected: 30 days. It forces a new judgment each month for a manifest that changes only when the runner image changes.
    • Rejected: No expiry. The security policy asks for a time-limited entry. A permanent entry hides the alert.

Fit

Fits in one pull request.

Suspected block

None.

Dependencies

None.

Activity

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

    @devops-cli-service
    Contributor
    • Possible duplicate: fix(security): Judge Trivy-config KSV-0013 in cronjob-repos-drift.yaml #7106, which may ask for the same change. The model names Judge Trivy-config KSV-0013 in k8s/devops/cronjob-repos-drift.yaml (alert 1188): fix the file, dismiss the alert, or add a time-limited entry to .trivyignore.yaml as the change that both ask for. Same rule KSV-0013, same file, same alert 1188, and identical acceptance criteria as item 7106. A person closes one of the two if that is so.
  4. changed the title [-]fix(security): judge Trivy-config KSV-0013 in k8s/devops/cronjob-repos-drift.yaml[/-] [+]fix(security): Judge Trivy-config KSV-0013 in cronjob-repos-drift.yaml[/+] on Nov 27, 2026
  5. devops-cli-service commented on Nov 27, 2026

    @devops-cli-service
    Contributor

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

    • Before: fix(security): judge Trivy-config KSV-0013 in k8s/devops/cronjob-repos-drift.yaml
    • Source of the summary: the background model
  6. devops-cli-service commented on Nov 28, 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 28, 2026

    @dan-petty
    Owner

    Superseded by #7562, which tracks the same Trivy-config KSV-0013 alert (1188) on k8s/devops/cronjob-repos-drift.yaml.

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