Skip to content

fix(security): 52 Trivy-config alerts stay open, none judged #4401

Closed

Description

@dan-petty

Problem Description

52 code scanning alerts of the tool Trivy-config are open on main. Their severities are 1 critical, 10 high, 19 medium and 22 low. GitHub opened all of them from 2026-10-28 to 2026-10-31. None has changed state since. No open issue, pull request or dismissal names them (searched on 2026-11-10 with devops gh issues list --state all for KSV, trivy, terraform and IaC).

They sit in these places: k8s/coredns (12), tf/gcp (10), tf/azure (7), k8s/llm (5), k8s/devops (4), k8s/gpu-feature-discovery (4), tf/aws (4), .devcontainer/Dockerfile (3), and 3 other files. The critical alert is AZU-0041 in tf/azure/main.tf. The high alerts include KSV-0017 (privileged) in k8s/gpu-feature-discovery/daemonset.yaml, DS-0002 (image user is root) in .devcontainer/Dockerfile, and 5 alerts in tf/aws, tf/azure and tf/gcp main.tf.

Other scanners do not have this gap. The 26 high alerts of CodeQL in the same window were fixed in a median of 1.4 days. devops-cli alerts (3 high, 1 critical) were fixed too. Only 2 of the 40 fixed alerts are from Trivy-config. So an alert of this tool has no fixer: nothing turns it into a fix, a dismissal with a reason, or an ignore as SECURITY.md ("A Finding with No Fix") describes.

Evidence: devops gh api 'repos/dan-petty/devops-cli/code-scanning/alerts?state=open&per_page=100' --paginate --jq '.[] | select(.tool.name=="Trivy-config") | .number' prints 52 numbers.

Reproduction Steps

  1. Run the command above.
  2. Run devops gh issues list --state all --limit 200 and search the titles for the rule ids (for example KSV-0017) or for Trivy-config. Nothing matches.

Expected vs Actual Behavior

Expected: each open alert has a decision on record: a fix in a pull request, a dismissal with a reason that a person reads, or a scoped ignore with a reason and an expiry. A privileged GPU daemonset can be a decision to keep, and the record then says so. The Security tab shows no alert that nobody has judged.

Actual: 52 alerts wait with no owner, and the oldest is 13 days old.

Environment Diagnostics

Repository dan-petty/devops-cli, branch main, scan step Security Scan of .github/workflows/ci.yml (uv run devops scan report --sarif .data/scan.sarif), SARIF upload by github/codeql-action/upload-sarif.

Acceptance criteria

  • devops gh api 'repos/dan-petty/devops-cli/code-scanning/alerts?state=open' --paginate --jq '[.[] | select(.tool.name=="Trivy-config")] | length' prints 0, or each remaining alert holds a dismissal comment with a reason.
  • A fix or an ignore for a finding of a manifest of k8s/ or a module of tf/ follows SECURITY.md. A CRITICAL finding is a decision of the owner.
  • A short rule in SECURITY.md or tf/README.md says who judges a new Trivy-config alert and in what time, or a job files one issue for each new alert.

Proposed design

Problem statement

The Trivy-config scanner left 52 alerts open on main, and no fix, dismissal or ignore names them. CodeQL and devops-cli alerts of the same period got a fix in about 1.4 days, so only this scanner has no owner. Nothing turns a new Trivy-config alert into an issue, and SECURITY.md names no judge and no time for one. This item adds a filer that opens one issue for each new alert group, and a rule that names the judge and the time.

Acceptance criteria

Requirement: The filer lists the open Trivy-config alerts

The alert filer SHALL list each open code scanning alert whose tool is Trivy-config and no other alert.

Scenario: A payload with a second tool

  • WHEN the recorded alerts payload holds three Trivy-config alerts and one CodeQL alert
  • THEN the filer prints the three Trivy-config alerts and no CodeQL alert.

Requirement: The filer groups the alerts by rule and path

The filer SHALL group the open alerts by rule id and file path.

Scenario: Two alerts of one rule in one file

  • WHEN two open alerts hold the rule id KSV-0017 and the path k8s/gpu-feature-discovery/daemonset.yaml
  • THEN the filer gives one group, and the body of the group names both alert numbers.

Requirement: A group that an open issue names gets no new issue

The filer SHALL skip each group whose exact title an open issue holds.

Scenario: One group with an open issue

  • WHEN an open issue holds the title of one group and the other group has no issue
  • THEN the filer files one issue, for the group with no open issue.

Requirement: One run files a bounded number of issues

The filer MUST file at most five issues in one run.

Scenario: Eight groups with no issue

  • WHEN eight groups have no open issue and the limit is five
  • THEN the filer files five issues and names the three groups that it leaves for the next run.

Requirement: The filed issue holds the rule, the path and the severity

The filer SHALL put the rule id, the path, the severity and the alert numbers in the issue that it files.

Scenario: The body of a filed issue

  • WHEN the filer files an issue for the rule id DS-0002 at .devcontainer/Dockerfile with the severity HIGH
  • THEN the title holds DS-0002 and .devcontainer/Dockerfile, and the body holds HIGH and the alert number.

Requirement: The workflow runs on a schedule and after the scan

The alert workflow MUST run on the daily schedule and after the CI workflow ends.

Scenario: The triggers of the workflow

  • WHEN a test reads the on block of .github/workflows/trivy-config-alerts.yml
  • THEN the block holds a schedule trigger and a workflow_run trigger whose workflow name is CI Quality Gate.

Requirement: The policy names the judge and the time

SECURITY.md SHALL name who judges a new Trivy-config alert, the time in which it happens, and the ignore file with its reason and expiry fields.

Scenario: The Trivy-config rule in the policy

  • WHEN a test reads the Trivy-config rule of SECURITY.md
  • THEN the rule names the owner for a CRITICAL alert within 24 hours, an agent for the other severities within 14 days, and .trivyignore.yaml with statement and expired_at.

Existing Tool Considered

No alternatives check has run on this item. Trivy, pinned at v0.75.0, covers the detection and the scoped ignore: .trivyignore.yaml holds a statement and an expired_at, and Trivy stops applying an entry after that date. The GitHub code scanning API covers the record: it lists each open alert and it holds a dismissal with a reason. Neither tool judges an alert, and no open tool files an issue for one. The plan therefore builds a filer of about 180 lines on the existing devops gh api wrapper: about 350k tokens to build, about 120k tokens a year to keep and fix, and about 6 hours of elapsed work.

Key questions

  • Which mechanism gives each new Trivy-config alert an owner?: Both. A rule in SECURITY.md names the judge and the time, and a scheduled workflow files one issue for each new alert group. (best practice) [sources: SECURITY.md, CONTEXT.md, .github/workflows/ci.yml]
    • Rejected: A rule in SECURITY.md only. A rule with no job leaves the alert in the Security tab until a person looks.
    • Rejected: A scheduled workflow only. An issue with no named judge and no time waits like the 52 alerts of today.
    • Chosen: A rule and a scheduled workflow. The rule sets the owner and the time, and the job makes the issue exist.
  • Which file records an ignore with a reason and an expiry?: .trivyignore.yaml, with statement and expired_at for each entry. (best practice) [sources: SECURITY.md]
    • Rejected: .trivyignore in plain text. The plain file holds no expiry date, so nothing removes the ignore.
    • Chosen: .trivyignore.yaml with statement and expired_at. Trivy reads the date and applies the entry only until then.
  • Where does the filer run?: In a new workflow, .github/workflows/trivy-config-alerts.yml, on the daily schedule and after the CI run. (best practice) [sources: .github/workflows/ci.yml, CONTEXT.md]
    • Rejected: A new row on the Service's status lane. It needs a new row, a setting and a token scope for work that the CI scan already starts.
    • Chosen: A new workflow, on a schedule and after the CI run. It reads the alerts that the Security Scan step uploads, and it needs security-events: read and issues: write only.
    • Rejected: A step in the existing CI workflow. A step of a pull request run must not write issues.
  • How many issues does one run file, and for what?: One issue for each rule id and path group that no open issue names, at most five in one run. The filer compares the exact title fix(security): judge Trivy-config <rule-id> in <path>. (best practice) [sources: CONTEXT.md, SECURITY.md]
    • Rejected: One issue for each alert. The 52 open alerts become 52 issues at once.
    • Chosen: One issue for each rule id and path, at most five in one run. One issue matches one fix, and the limit keeps a run small.
    • Rejected: One issue for each run. One issue then holds several fixes and closes on the first.
  • Who judges a new Trivy-config alert, and in what time?: The owner judges a CRITICAL alert within 24 hours. An agent judges a HIGH, MEDIUM or LOW alert within 14 days, and the owner decides after that. (best practice) [sources: SECURITY.md]
    • Rejected: The owner judges every severity. The 51 non-critical alerts then wait for one person.
    • Rejected: An agent judges every severity. SECURITY.md forbids an agent to ignore a CRITICAL finding.
    • Chosen: The owner judges CRITICAL within 24 hours, and an agent judges the other severities within 14 days. It keeps the owner's limits and the existing triage time.

Fit

Fits in one pull request.

Suspected block

None.

Dependencies

None.

Alternatives check of 2026-11-11: partly.
Tool: aquasecurity/trivy (https://github.com/aquasecurity/trivy), Apache-2.0, last activity 2026-11-10, maintained.

Activity

  1. added
    source/agent
    type/bug
    scope/security
    status/new
    value/high
    effort/medium
    on Nov 10, 2026
  2. dan-petty commented on Nov 10, 2026

    @dan-petty
    OwnerAuthor

    Intake placed this item to the backlog: intake puts every new item in the backlog. A person plans the milestones.

    • Type: type/bug. The fix prefix of the title gives the type.
    • Scope: scope/security. The (security) scope of the title gives the scope.
    • Priority: P1-High. One critical and ten high alerts have no owner for 13 days, leaving a known security gap unaddressed.
    • Value: High. Untriaged critical and high security alerts expose the project to known vulnerabilities with no decision on record.
    • Effort: Medium. 52 alerts need individual decisions plus a process rule or automation for future alerts.
    • Related: docs(security): ignore an unfixable finding for 3 days #3919, which asks for a different change. Both deal with deciding on scanner findings, but #3919 defines the ignore mechanism while this candidate triages 52 open alerts and assigns ownership.
  3. added
    priority/p1-high
    on Nov 10, 2026
  4. added
    status/ready
    and removed
    status/new
    on Nov 10, 2026
  5. devops-cli-service commented on Nov 10, 2026

    @devops-cli-service
    Contributor

    Status set to Ready at 013c1f4 (see proposed design in issue body).

    Moved to new items: #4409.

  6. devops-cli-service commented on Nov 11, 2026

    @devops-cli-service
    Contributor

    Alternatives check: partly

    Reason: The searches found no open tool that files an issue for, or otherwise assigns an owner to, a code scanning alert; the closest match is Trivy itself, which is already the scanner behind the 52 alerts. Trivy covers the detection and the scoped ignore with a reason and an expiry, but it does not judge an alert, file an issue for a new alert group or dismiss an alert in GitHub code scanning, so the ownership and filing part of the need is still unbuilt.

    Tool: aquasecurity/trivy (https://github.com/aquasecurity/trivy)

    • License: Apache-2.0
    • Last activity: 2026-11-10
    • Maintained: yes

    Covers:

    • Runs the misconfiguration checks (KSV/DS rules) that produce the 52 Trivy-config alerts on the k8s manifests and Terraform modules
    • Records a scoped ignore in .trivyignore.yaml with a statement and an expired_at, so an ignore carries a reason and stops applying after its date
    • Ships as a maintained open-source CLI that the Security Scan step of the CI workflow already invokes

    Lacks:

    • Does not file an issue for a new alert group, so nothing gives each new Trivy-config alert an owner
    • Does not judge or dismiss an alert with a reason in GitHub code scanning; the decision record is left to a person
    • No scheduled or post-CI run that acts on the alerts a scan uploads
    • No per-rule/per-path grouping, issue-title deduplication or bounded issue creation

    Tools considered:

    Searches run:

    • Trivy misconfiguration scanning .trivyignore.yaml statement expired_at, results: 5
    • tool that files GitHub issues for code scanning alerts automatically, results: 5
    • trivy config scan Kubernetes terraform IaC misconfiguration KSV rules, results: 5
    • github action create issue from code scanning alert sarif, results: 5
    • aquasecurity trivy GitHub repository, results: 5
    • DefectDojo open source vulnerability management GitHub issues, results: 5
    • trivyignore.yaml expired_at, results: 5
    • "code scanning" alerts "create issues" tool open source security triage, results: 5
    • Trivy documentation, results: 5
    • trivy-operator kubernetes security, results: 5

    Sources:

    Checked on 2026-11-11. A person decides what this means for the item. The check changes no label and closes no issue.

  7. added
    owner/agent
    on Nov 11, 2026
  8. removed
    status/ready
    owner/agent
    on Nov 11, 2026
  9. devops-cli-service commented on Nov 11, 2026

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

    @devops-cli-service
    Contributor

    Live since 2026-11-11 17:36 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/mediumpriority/p1-highscope/securitysource/agenttype/bugvalue/high

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions