Repository navigation
Description
Problem
The code scanning check Trivy of each pull request ends as neutral with the title "1 configuration not found". GitHub says that it cannot determine the alerts that the pull request introduces, because the configuration trivy-image-devcontainer of release.yml is present on main and no run of a pull request uploads it. So the check does not compare the Trivy alerts of a pull request with main.
Evidence
- Pull requests 7373, 7361 and 7352: the check run
Trivyof the appgithub-advanced-securityhas the conclusionneutraland the title "1 configuration not found". Its summary names the workflowrelease.ymland the configurationtrivy-image-devcontainer. - Command:
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}'.
Acceptance criteria
- The check
Trivyof a pull request ends assuccessorfailure, and it names the alerts that the pull request introduces. - Each code scanning configuration that
mainuploads has a run on a pull request, ormainuploads no configuration that a pull request cannot upload.
Alternatives check of 2026-11-27: none.
Tool: none found.
Reason: Searches found only Trivy SARIF pipeline examples, not a tool that reconciles per-workflow code-scanning configurations; the fix is to upload the same configuration on pull requests or stop uploading it on main.
Lacks:
- A pull-request run for every configuration that main uploads
- A configuration name shared by main and pull-request runs
- Automatic comparison of pull-request alerts against main
Proposed design
Problem statement
The code scanning check Trivy of a pull request ends as neutral with the title "1 configuration not found". main uploads code scanning configurations that no pull-request run uploads. The workflow devcontainer-image.yml already uploads trivy-image-devcontainer on a pull request that changes a devcontainer input (#6903). The release image configurations trivy-image-service, trivy-image-runner and trivy-image-mcp-server have no analysis on a pull request. The pull-request container job of ci.yml builds those images. The change uploads the SARIF of each image that the job builds under the release category, so GitHub compares their alerts with main.
Acceptance criteria
Requirement: Each image of the pull request gets a code scanning analysis
The pull-request workflow SHALL scan each container image that it builds and SHALL upload the SARIF under the category that release.yml uses for that image.
Scenario: The analyses of a pull request
- WHEN a person runs
devops gh api "repos/dan-petty/devops-cli/code-scanning/analyses?ref=refs/pull/<number>/merge&per_page=100" --jq '.[].category'for an open pull request after the merge - THEN the output holds
trivy-image-service,trivy-image-runnerandtrivy-image-mcp-server
Requirement: No DevContainer Image job on a source-only pull request
The pull-request workflows MUST NOT start a job of devcontainer-image.yml for a pull request that changes only files under src/.
Scenario: A source-only pull request
- WHEN a person runs
devops gh api "repos/dan-petty/devops-cli/actions/runs/<run id>/jobs?per_page=100" --jq '.jobs[].name'for the run of a pull request that changes onlysrc/files after the merge - THEN the output holds no job name of
devcontainer-image.yml
Requirement: The changed workflows pass the workflow checks
The changed workflow files MUST pass the workflow checks of the project.
Scenario: The workflow checks
- WHEN a person runs
uv run devops ci --check --only actionlint,zizmoron the branch of this change - THEN the command exits 0 and reports no error
Existing Tool Considered
The alternatives check of 2026-11-27 in the issue body records the verdict none with no tool. It found no open, maintained tool that reconciles the code scanning configurations of the workflows. The change builds no code and no image. It adds a scan and an upload to a job that already builds each image, so the cost is the scan time of each image. The change gives each pull-request run a configuration for an image, under the category that main uses, and GitHub itself compares the alerts.
Key questions
- Does a pull request already upload the code scanning configuration
trivy-image-devcontainer?: Yes..github/workflows/devcontainer-image.ymlscans the devcontainer image and uploads the SARIF under the categorytrivy-image-devcontaineron a pull request that changes a devcontainer input (ci(security): scan devcontainer image and rescan daily #6903). Owner decision O2 stops every job of that workflow on a pull request that changes onlysrc/files. [sources: .github/workflows/devcontainer-image.yml, openspec/specs/ci-devcontainer-image/spec.md] - Which code scanning configurations does
mainupload that a pull-request run does not upload?:release.ymluploadstrivy-image-service,trivy-image-runner,trivy-image-mcp-server,trivy-image-uv-seedandtrivy-image-devcontainer. A pull request uploads onlytrivy-image-devcontainer, and only when a devcontainer input changes. Pull requests 6964 and 6941 reported three configurations not found for service, runner and mcp-server. [sources: .github/workflows/release.yml, .github/workflows/ci.yml, openspec/specs/container-image-layers/spec.md] - How does a pull request produce the analysis of an image without a new build?: The pull-request container job of
ci.ymlscans each image that it already builds and uploads the SARIF under the release category of that image. The job already builds the container images in the Docker Engine of the runner. (best practice) [sources: .github/workflows/ci.yml, .github/actions/image-scan/action.yml, openspec/specs/container-image-layers/spec.md]- Chosen: Scan the image that the pull-request job builds. The job already builds the image, so the scan adds no build. The category matches the one that
mainuploads, so GitHub compares the alerts of the two. - Rejected: Run the release image jobs on each pull request.
release.ymlbuilds each image with the release settings and a 60-minute limit. A pull-request run repeats that build and breaks the 5-minute budget ofAGENTS.mdrule 5. - Rejected: Stop the upload on the default branch. The analyses leave code scanning. Only the owner can allow a lower security threshold (
AGENTS.mdrule 5,SECURITY.md).
- Chosen: Scan the image that the pull-request job builds. The job already builds the image, so the scan adds no build. The category matches the one that
- Which category name does each pull-request upload use?: The category that
release.ymluses for the same image:trivy-image-service,trivy-image-runnerandtrivy-image-mcp-server. (best practice) [sources: .github/workflows/release.yml, AGENTS.md]- Chosen: Reuse the release category. GitHub compares a pull request with the most recent analysis of the same category on the default branch. A shared name makes the comparison.
- Rejected: Use a pull-request-only name. The check reports the main configuration as missing, and the comparison does not happen.
- Does the devcontainer configuration also upload on a pull request that changes only
src/files?: No. Owner decision O2 inopenspec/specs/ci-devcontainer-image/spec.mdstops every job ofdevcontainer-image.ymlon such a pull request. The last 10 successful runs averaged 365.8 s (257 s to 439 s), over the 360 s limit ofAGENTS.mdrule 5. The remaining configuration goes to a new issue. (best practice) [sources: openspec/specs/ci-devcontainer-image/spec.md, AGENTS.md]- Chosen: Keep the current behavior. Owner decision O2 and the 360 s limit of rule 5 forbid a devcontainer run on every pull request.
- Rejected: Run
devcontainer-image.ymlon every pull request. It contradicts O2, and the average of 365.8 s breaks the 360 s limit of rule 5. - Rejected: Scan the published devcontainer image on each pull request. The published image is the last release, not the image of the pull request. The analysis would hide an alert that the pull request introduces.
Fit
Fits in one pull request.
Suspected block
None.
Dependencies
None.
Activity
dan-petty commentedon Nov 27, 2026
Both deal with Trivy scanning in CI, but #6405 consolidates scan blocks and adds SARIF while the candidate fixes the PR check not finding its configuration.devops-cli-service commentedon Nov 27, 2026
The result in the alternatives block of the issue body changed. Before this check: no check. A person decides what the new result means for the item.
Searches (8)
Searches run:
Sources:
devops-cli-service commentedon Nov 28, 2026
Next step: the stage job writes the plan of the item. See the section Proposed design of the body.
dan-petty commentedon Nov 28, 2026
Cannot build as written: the issue rests on false premises and conflicts with Owner decision O2 (#4658, #4977) and AGENTS.md rule 5. (1) .github/workflows/devcontainer-image.yml already scans and uploads trivy-image-devcontainer on pull requests via scan-upload (#6903, PR #6903) when devcontainer inputs change. (2) Running DevContainer Image on every pull request contradicts Owner decision O2 in openspec/specs/ci-devcontainer-image/spec.md ('A pull request that changes only src/ files SHALL start no job of it') and exceeds the 360 s limit of AGENTS.md rule 5: the last 10 successful pull_request runs of DevContainer Image averaged 365.8 s (runs 46197579960..46107036979: 257 s to 439 s even with registry cache). (3) Uploading only trivy-image-devcontainer when IMAGE_CONTENT_PATHS does not change still leaves the Trivy check neutral with missing ci.yml configurations (e.g. PRs #6964 and #6941 reported '3 configurations not found' for service, runner and mcp-server). An owner decision is needed on whether pull requests and main should align Trivy configuration uploads (or drop PR-only config comparisons) rather than adding an unconditional 6+ minute devcontainer build on every PR.
devops-cli-service commentedon Nov 28, 2026
Next step: the stage job writes the plan of the item. See Moved to new items in the section Proposed design of the body.
dan-petty commentedon Nov 29, 2026
Closing as not planned (superseded): PRs already scan and upload
trivy-image-service,trivy-image-mcp-server,trivy-image-runner, andtrivy-image-uv-seedin.github/workflows/ci.yml(#7207, #7241; verified live on PR #7690 code-scanning analyses), and the remainingtrivy-image-devcontaineralignment was split to #7654.