Repository navigation
Description
Split from #7374.
Problem The Trivy code scanning check of a pull request stays neutral with a configuration not found title when main uploads a configuration that the pull request cannot upload. release.yml uploads trivy-image-uv-seed and trivy-image-devcontainer. A pull request uploads trivy-image-devcontainer only when a devcontainer input changes (#6903). ## Why it is deferred The fix needs a decision that only the owner makes. To stop the upload on main lowers the code scanning coverage, and AGENTS.md rule 5 lets only the owner lower a security threshold. To run devcontainer-image.yml on every pull request breaks owner decision O2 in openspec/specs/ci-devcontainer-image/spec.md: the last 10 successful pull_request runs averaged 365.8 s (257 s to 439 s), over the 360 s limit of AGENTS.md rule 5. ## Acceptance criteria - The owner records the decision in openspec/specs/ci-devcontainer-image/spec.md or in an ADR under docs/adr/. - After the decision, the Trivy check of a pull request that changes only src/ files ends as success or failure, and its title holds no configuration not found. Proof: devops gh api repos/dan-petty/devops-cli/commits/<head sha>/check-runs?per_page=100 --jq '.check_runs[] | select(.name==Trivy) | {conclusion, title: .output.title}'. - The changed workflow files pass uv run devops ci --check --only actionlint,zizmor.
Proposed design
Problem statement
A pull request that changes only src/ files shows the Trivy code scanning check as neutral with configuration not found. main uploads two Trivy image scan configurations, but the pull request uploads only the one that its run produces. The change aligns the upload categories so the pull request presents the same code scanning configuration as main without lowering coverage or adding a devcontainer build.
Acceptance criteria
Requirement: Shared Trivy image scan category
The Trivy image scan uploads of release.yml and the pull request workflows SHALL use one shared SARIF category.
Scenario: The changed workflow files pass the static checks
- WHEN a person runs
uv run devops ci --check --only actionlint,zizmor - THEN both rows pass for
release.yml,ci.yml,devcontainer-image.ymland.github/actions/image-scan/action.yml.
Requirement: The Trivy check of a source-only pull request has a result
The Trivy code scanning check of a pull request that changes only src/ files SHALL end as success or failure, and its title SHALL hold no configuration not found.
Scenario: A source-only pull request runs the Trivy check
- WHEN a person runs
uv run devops gh api 'repos/dan-petty/devops-cli/commits/<head sha>/check-runs?per_page=100' --jq '.check_runs[] | select(.name=="Trivy") | {conclusion, title: .output.title}'for a pull request that changes onlysrc/ - THEN the command prints a
conclusionofsuccessorfailure, and thetitleholds noconfiguration not found.
Existing Tool Considered
No alternatives check has run. The open, maintained github/codeql-action/upload-sarif action covers the SARIF upload and its category input. It lacks a way to create an analysis for an image that the pull request does not build, so the proposal uses one shared category for the scans that do run.
Key questions
- Which Trivy image scans does
release.ymlupload onmain?:release.ymluploadstrivy-image-uv-seedandtrivy-image-devcontainer. [sources: .github/workflows/release.yml] - What starts the DevContainer Image workflow on a pull request?: A pull request starts the DevContainer Image workflow only when it changes an image input other than
src/. A pull request that changes onlysrc/files starts no job of it. [sources: openspec/specs/ci-devcontainer-image/spec.md] - What is the runtime limit for the DevContainer Image pull request run?: Owner decision O2 in the spec sets the run to less than 6 minutes. The body records a 360 s limit and an average of 365.8 s over the last 10 successful runs. [sources: openspec/specs/ci-devcontainer-image/spec.md]
- Which fix aligns the Trivy code scanning configurations without an owner decision?: Use one shared SARIF category for every Trivy image scan.
release.ymland the pull request workflows upload under that category, so a source-only pull request presents the same configuration thatmainholds. (best practice) [sources: AGENTS.md, openspec/specs/ci-devcontainer-image/spec.md, .github/workflows/release.yml, .github/workflows/ci.yml, .github/actions/image-scan/action.yml]- Rejected: Stop the main image upload. It lowers code scanning coverage on
main;AGENTS.mdrule 5 reserves that change for the owner. - Rejected: Run
devcontainer-image.ymlon every pull request. The last 10 runs averaged 365.8 s, over the 360 s limit of owner decision O2. - Chosen: Use one shared SARIF category. It keeps both main image scans and adds no pull request run, so it lowers no threshold and breaks no O2 limit.
- Rejected: Stop the main image upload. It lowers code scanning coverage on
Fit
Fits in one pull request.
Suspected block
None.
Dependencies
None.
Activity
devops-cli-service commentedon Nov 28, 2026
Both deal with Trivy scanning in CI, but #6405 consolidates scan blocks while the candidate fixes the neutral status from a configuration upload mismatch.[-]fix(ci): align the code scanning configurations that a pull request cannot upload[/-][+]fix(ci): align code scanning configs a pull request uploads[/+]devops-cli-service commentedon Nov 28, 2026
The job shortened the title of this item. The summary had 72 characters, and the limit is 60. The type and the scope stay.
fix(ci): align the code scanning configurations that a pull request cannot uploaddevops-cli-service commentedon Nov 28, 2026
Next step: the alternatives check records a verdict. See the section Proposed design of the body.