Repository navigation
Description
Update 2026-11-26 (infra move): many alert files left or leave this repository.
tf/is removed (refactor(terraform): run deploy-cloud on the infra examples #6767). dan-petty/infra holds the Terraform, and its AKS module limits the API server ranges (AZU-0041).k8s/corednsis removed (fix(k8s): delete the CoreDNS files that k3s never applies #5055).- Step 17 (refactor(k8s): delete the environment files from devops-cli #7290) deletes each file under
k8s/outsidek8s/devops, such ask8s/llmandk8s/gpu-feature-discovery. Add no ignore entry for them, also not the GPU entry of the design. - After step 17 and the next scan, judge only the alerts that stay open.
Split from #4401.
The problem: 52 Trivy-config code scanning alerts are open on main, and no fix, dismissal or ignore names them. Their severities are 1 critical, 10 high, 19 medium and 22 low. 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 and DS-0002 (image user is root) in .devcontainer/Dockerfile and 5 alerts in the main.tf of tf/aws, tf/azure and tf/gcp (1, 1 and 3). Their places are 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. Nothing judges an alert, so each one waits with no owner and the oldest is 13 days old. Why this part is deferred: SECURITY.md makes a CRITICAL finding the decision of the owner, and only a person's verdict confirms a finding. The item that files this issue adds the rule and the filer. This issue applies them to the alerts that are open now. Acceptance criteria: - [ ] Each open Trivy-config alert holds a fix, a dismissal with a reason, or an entry of .trivyignore.yaml with a statement and an expired_at date. - [ ] AZU-0041 needs no decision here: tf/azure is removed (#6767). - [ ] GPU feature discovery needs no change: dan-petty/homelab removed the workload, and step 17 (#7290) deletes the file. - [ ] devops gh api 'repos/dan-petty/devops-cli/code-scanning/alerts?state=open' --paginate --jq '[.[] | select(.tool.name==Trivy-config)] | length' prints 0. - [ ] A follow-up comment on this issue names the alert that each change, dismissal or ignore closes.
Proposed design
Problem statement
The infra move has already taken the files out of this repository: tf/ lives in dan-petty/infra, and #7290 deleted every file under k8s/ outside k8s/devops, including k8s/coredns, k8s/llm and k8s/gpu-feature-discovery. The Trivy-config alerts at those paths close on the next scan and get no ignore entry. The alerts whose files remain are judged here: the file is fixed when a safe edit removes the result, and otherwise a dated .trivyignore.yaml entry with a statement and an expired_at date hides it, within the 3-day and 14-day limits of SECURITY.md. The change renews each existing entry whose date has passed or is about to pass, because an expired entry reports its finding again. No entry hides a CRITICAL result, no agent dismisses an alert, and a live trivy-config scan plus the live code-scanning alert count prove the outcome.
Acceptance criteria
Requirement: Each remaining alert is fixed or hidden by a live entry
The change SHALL leave no Trivy-config finding of LOW or higher severity in the tree: each finding is fixed in its file, or a .trivyignore.yaml entry that names its rule id and its path, with a statement and an unexpired expired_at, hides it.
Scenario: The IaC scan reports no remaining finding
- WHEN
uv run devops scan report --scanner trivy-config --fail-on lowruns on the change from the repository root - THEN it exits 0 and reports no finding at LOW or higher severity.
Requirement: No alert stays open at a path that the tree lacks
After the merge, the repository MUST hold no open Trivy-config alert at a path that this tree no longer holds, so the change adds no .trivyignore.yaml entry for tf/, k8s/coredns, k8s/llm or k8s/gpu-feature-discovery.
Scenario: The live alert query filters the paths that left the repository
- WHEN
devops gh api 'repos/dan-petty/devops-cli/code-scanning/alerts?state=open' --paginate --jq '[.[] | select(.tool.name=="Trivy-config") | .most_recent_instance.location.path | select(startswith("tf/") or startswith("k8s/coredns/") or startswith("k8s/llm/") or startswith("k8s/gpu-feature-discovery/"))] | length'runs after the merge - THEN it prints
0.
Requirement: Pending a person after the merge
After the merge, the repository MUST have no open Trivy-config code scanning alert.
Scenario: The live code-scanning query returns no alert
- WHEN
devops gh api 'repos/dan-petty/devops-cli/code-scanning/alerts?state=open' --paginate --jq '[.[] | select(.tool.name=="Trivy-config")] | length'runs after the merge - THEN it prints
0.
Requirement: The follow-up comment names each closed alert
The change MUST leave a follow-up comment on #4409 that names the rule id and the path of each Trivy-config alert that it closes.
Scenario: The comment lists each closed alert
- WHEN
devops gh api 'repos/dan-petty/devops-cli/issues/4409/comments' --paginate --jq '[.[].body] | join("\n")'runs after the merge - THEN the output names the rule id and the path of each alert that the change closes.
Existing Tool Considered
No alternatives check has run. Trivy (aquasecurity/trivy, pinned by the repository) is the open, maintained tool that runs the trivy config scan and reads .trivyignore.yaml with id, paths, statement and expired_at; the repository already runs it through TrivyConfigScanner and the trivy-config registry scanner. It lacks a verdict on a finding and it cannot dismiss a GitHub alert, which SECURITY.md leaves to a person. The change builds no scanner and no scan engine, so it has no build cost.
Key questions
- Which alerts does this issue judge after the infra move?: Only the alerts whose files remain in the tree at this commit: the DS-0002 alerts in
.devcontainer/Dockerfile, the alerts ink8s/devops, and each finding that the five existingmisconfigurationsentries still cover (the prompt-adversary fixture and the harbor.venvDockerfiles) whose entry has expired or expires within days.tf/is in dan-petty/infra, and refactor(k8s): delete the environment files from devops-cli #7290 deleted every file underk8s/outsidek8s/devops, so the alerts attf/,k8s/coredns,k8s/llmandk8s/gpu-feature-discoveryclose on the next scan and get no entry. [sources: README.md:50, k8s/README.md:3, CHANGELOG.md:23, docs/HOMELAB_REPO_SWITCH.md:5, .trivyignore.yaml:2] - How does the change handle the GPU feature discovery alert?: It adds no entry.
k8s/gpu-feature-discovery/daemonset.yamlis gone at this commit, because refactor(k8s): delete the environment files from devops-cli #7290 deleted every environment file underk8s/outsidek8s/devops, so the next scan reports no result there and the KSV-0017 alert closes. The dated GPU entry of the earlier design is not written, andprivileged: trueneeds no decision. [sources: k8s/README.md:3, CHANGELOG.md:23, docs/HOMELAB_REPO_SWITCH.md:5] - Which file format holds a Trivy ignore entry with a path, a statement and an expiry date?:
.trivyignore.yamlholdsid,paths,statementandexpired_at, and the config scan names it with--ignorefilewhen it exists. The plain.trivyignoretext file has no path field. [sources: .trivyignore.yaml:1, src/devops_cli/security/trivy.py:231, SECURITY.md:131] - Which severity may an ignore entry hide?: None of severity CRITICAL.
SECURITY.mdgives the owner the decision on a CRITICAL finding and forbids an agent to ignore one, so this change adds no entry for a CRITICAL result; AZU-0041 needs no decision becausetf/azureis gone. [sources: SECURITY.md:92, SECURITY.md:127, SECURITY.md:131] - How long may an ignore entry last?: An entry gets an
expired_at3 days after the day of the entry, and the first entry with its renewals lasts at most 14 days in all. A longer date is the owner's decision, and thestatementnames that decision. [sources: SECURITY.md:85, SECURITY.md:89, SECURITY.md:131] - Who dismisses a code scanning alert?: A person dismisses the alert in code scanning with a reason. An agent does not dismiss an alert, so this change fixes the file or adds a dated ignore entry. [sources: SECURITY.md:132]
- How does the change judge a remaining alert?: Fix the file first. Add a dated
.trivyignore.yamlentry only when the fix breaks the workload or needs an unreleased change. Never dismiss a GitHub alert. An entry that is expired or about to expire is renewed within the 3-day and 14-day limits. (best practice) [sources: SECURITY.md:129, SECURITY.md:130, SECURITY.md:131, .trivyignore.yaml:1]- Chosen: Fix when safe, renew or add a dated entry otherwise. This follows the order of
SECURITY.md: the fix is the first choice, and the dated entry is the recorded fallback where a safe edit does not exist. - Rejected: Ignore every remaining alert. This hides a result that a safe edit can remove and leaves unnecessary debt.
- Rejected: Fix every remaining alert. Some alerts are in files whose fix breaks the build or the workload, such as the build stages of the devcontainer image.
- Rejected: Dismiss every alert on GitHub. Only a person may dismiss an alert, and a dismissal leaves no reproducible record in the repository.
- Chosen: Fix when safe, renew or add a dated entry otherwise. This follows the order of
- Which command proves that every remaining alert is judged?:
uv run devops scan report --scanner trivy-config --fail-on lowruns the registry'sTrivyConfigScanner, which names.trivyignore.yamlof the scan directory, and it exits 0 only when no finding at LOW or higher survives the entries; a requested scanner that did not run also fails it. The live code-scanning count proves the state of GitHub after the merge. There is notrivygate row, souv run devops ci --check --only trivyis replaced by these two checks. (best practice) [sources: src/devops_cli/config/constants.py:6108, src/devops_cli/security/registry.py:44, src/devops_cli/security/trivy.py:231, src/devops_cli/commands/scan.py:1042, docs/commands/scan.md:259]- Chosen: Live IaC scan and live code-scanning count. The scan applies the ignore file with the real scanner and fails on a finding or a scanner that did not run; the live count proves the state of GitHub.
- Rejected: A new
trivyrow ofdevops ci. No such row exists, and adding a gate row is new code that this alert-judging change does not need. - Rejected: A test that reads
.trivyignore.yaml. The project rule requires a validator command or a live check for a config file, and a test asserts no value of it. - Rejected: A fixture of the open alerts and a scan test. The fixture copies GitHub state and becomes stale; the live count already proves the state.
- How does the change clear the DS-0002 alerts in
.devcontainer/Dockerfile?: Add one datedDS-0002entry for the path.devcontainer/Dockerfile. The image already runs asvscodein its runtime stages (USER vscodeat lines 46 and 83); the stages without aUSERline are build stages that need root, and aUSERline in them breaks the build or is inherited bybuilder, which installs into/optas root. Thestatementnames that reason and fix(security): judge the 52 open Trivy-config alerts #4409, andexpired_atis 3 days after the entry. (best practice) [sources: SECURITY.md:131]- Chosen: Dated entry for DS-0002 at
.devcontainer/Dockerfile. The runtime stages already setUSER vscode; the reported stages are build-only and need root, so no safe edit removes the result and the entry records the reason with an expiry. - Rejected: Add
USER vscodeto every stage.builderstartsFROM venv, so a trailingUSER vscodeinvenvmakes itsuv pip installinto/optrun as vscode, andUSER rootinbuildernames a root user. - Rejected: Rewrite the build stages to run as vscode with chown. This is a rework of the devcontainer build and its smoke test, not a safe edit for an alert-judging change.
- Chosen: Dated entry for DS-0002 at
- What does the change do with the existing
.trivyignore.yamlentries that expire now?: Renew each entry whose finding the live scan still reports to 3 days after the renewal day, and no later than the 14th day after its first entry: the prompt-adversary KSV-0014 entry expired on 2026-11-21 (first entry 2026-11-18, limit 2026-12-02), the DS-0029 harbor entry ends 2026-11-26 (first entry 2026-11-16, limit 2026-11-30), and the three DS-0002 harbor entries end 2026-11-26 to 2026-11-28 (first entries 2026-11-23 to 2026-11-25, limits 2026-12-07 to 2026-12-09). A date past a limit is the owner's decision and thestatementnames it. (best practice) [sources: .trivyignore.yaml:2, .trivyignore.yaml:7, .trivyignore.yaml:12, .trivyignore.yaml:17, .trivyignore.yaml:22, SECURITY.md:89, SECURITY.md:131, openspec/changes/archive/2026-11-16-5947-judge-trivy-ds0029-task-template-dockerfile/proposal.md:14]- Chosen: Renew each entry within its 14-day limit. An expired entry stops hiding its finding, so the next scan reports it and the alert reopens; a renewal keeps the record dated and inside the policy.
- Rejected: Let the entries expire. The live scan then fails and the code-scanning alert reopens, which is the state this issue removes.
- Rejected: Ask the owner now for a longer date. The 14-day limit is not reached for any of the entries, so no owner decision is needed yet.
Fit
Fits in one pull request.
Suspected block
None.
Dependencies
None.
Activity
devops-cli-service 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.The item judges open security alerts, but it waits on #4401 and on the owner's verdict for the critical alert.It clears 52 unjudged alerts and makes the code scanning count reach 0, but it adds no user-facing function.Each of the 52 alerts needs a fix, a reasoned dismissal or an ignore entry, plus a follow-up comment.Both cover the same 52 open Trivy-config alerts, but #4401 adds the rule and the filer while this item applies them to the alerts open now.dan-petty commentedon Nov 10, 2026
This item cannot be built as written. First, this item waits for #4401 to merge. The .trivyignore.yaml format and triage rules do not exist in the codebase yet. Second, acceptance criterion 2 requires the owner to record the decision on AZU-0041 in tf/azure/main.tf. AZU-0041 is a CRITICAL finding. Per SECURITY.md, only the owner can decide on a CRITICAL finding. Third, criterion 4 requires open code scanning alerts on main to reach 0. A pull request cannot close alerts on main before merge.
devops-cli-service commentedon Nov 10, 2026
Refine cannot set this item to Ready at e590fa3 until a person answers the questions below. Reply in a comment or edit the body, and the next refine round looks at the item again.
mainreach 0? (a person decides)devops-cli-service commentedon Nov 11, 2026
Refine cannot set this item to Ready at 5c71ad4 until a person answers the questions below. Reply in a comment or edit the body, and the next refine round looks at the item again.
mainreach 0, and comments the alert that each change, dismissal or ignore closes? (a person decides)devops-cli-service commentedon Nov 20, 2026
Owner question: See the first point of Open questions in the section Proposed design of the body.
Options
Recommendation: Decide the question: only a person can answer it.
Evidence
devops-cli-service commentedon Nov 21, 2026
Next step: the alternatives check records a verdict. See the section Proposed design of the body.
dan-petty commentedon Nov 30, 2026
Pull request #7876 closes each open
Trivy-configalert of 2026-11-30 as follows. The scan ofmainafter the merge closes the alerts..devcontainer/DockerfileHEALTHCHECK NONEin.devcontainer/Dockerfile,Dockerfile,smoke.Dockerfileand the harbor taskDockerfilek8s/devops/cronjob-runner.yamlk8s/devops/roadmap-service/deployment.yamlk8s/devops/roadmap-service/role.yamlk8s/devops/cronjob-openrouter-reconcile.yamlk8s/devops/cronjob-openrouter-reconcile.yamlk8s/devops/cronjob-openrouter-reconcile.yamlk8s/devops/configmap-sandbox.yamlEach alert stands for all the files that hold its rule, because the scan keeps one result for each rule (#7875). So each entry names every path that
trivy configreports for the rule: 46 results in 14 files before the change, 0 after it. The tracking issue of each entry is #4409. Alerts 240, 263, 264 and 265 are older than 14 days, so the owner confirms their entries (SECURITY.md, "Judging a Trivy-config Alert").fix(security): judge the 8 open Trivy-config alerts
chore(main): release 0.261.0 (#7884)
devops-cli-service commentedon Nov 30, 2026
Released in v0.261.0: https://github.com/dan-petty/devops-cli/releases/tag/v0.261.0
devops-cli-service commentedon Nov 30, 2026
Live since 2026-11-30 20:54 UTC