Repository navigation
Description
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
- Run the command above.
- Run
devops gh issues list --state all --limit 200and search the titles for the rule ids (for example KSV-0017) or forTrivy-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 oftf/follows SECURITY.md. A CRITICAL finding is a decision of the owner. - A short rule in
SECURITY.mdortf/README.mdsays who judges a newTrivy-configalert 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-configalerts and oneCodeQLalert - THEN the filer prints the three
Trivy-configalerts and noCodeQLalert.
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-0017and the pathk8s/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-0002at.devcontainer/Dockerfilewith the severityHIGH - THEN the title holds
DS-0002and.devcontainer/Dockerfile, and the body holdsHIGHand 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
onblock of.github/workflows/trivy-config-alerts.yml - THEN the block holds a
scheduletrigger and aworkflow_runtrigger whose workflow name isCI 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-configrule ofSECURITY.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.yamlwithstatementandexpired_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-configalert an owner?: Both. A rule inSECURITY.mdnames 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.mdonly. 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.
- Rejected: A rule in
- Which file records an ignore with a reason and an expiry?:
.trivyignore.yaml, withstatementandexpired_atfor each entry. (best practice) [sources: SECURITY.md]- Rejected:
.trivyignorein plain text. The plain file holds no expiry date, so nothing removes the ignore. - Chosen:
.trivyignore.yamlwithstatementandexpired_at. Trivy reads the date and applies the entry only until then.
- Rejected:
- 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 Scanstep uploads, and it needssecurity-events: readandissues: writeonly. - 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-configalert, 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.mdforbids 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
dan-petty commentedon Nov 10, 2026
Intake placed this item to the backlog: intake puts every new item in the backlog. A person plans the milestones.
fixprefix of the title gives the type.(security)scope of the title gives the scope.One critical and ten high alerts have no owner for 13 days, leaving a known security gap unaddressed.Untriaged critical and high security alerts expose the project to known vulnerabilities with no decision on record.52 alerts need individual decisions plus a process rule or automation for future alerts.Both deal with deciding on scanner findings, but #3919 defines the ignore mechanism while this candidate triages 52 open alerts and assigns ownership.devops-cli-service commentedon Nov 10, 2026
Status set to Ready at 013c1f4 (see proposed design in issue body).
Moved to new items: #4409.
devops-cli-service commentedon Nov 11, 2026
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)
Covers:
statementand anexpired_at, so an ignore carries a reason and stops applying after its dateLacks:
Tools considered:
Searches run:
Sources:
Checked on 2026-11-11. A person decides what this means for the item. The check changes no label and closes no issue.
devops-cli-service commentedon Nov 11, 2026
Released in v0.112.2: https://github.com/dan-petty/devops-cli/releases/tag/v0.112.2
devops-cli-service commentedon Nov 11, 2026
Live since 2026-11-11 17:36 UTC