Skip to content

fix(ci): align code scanning configs a pull request uploads #7654

Backlog

Description

@devops-cli-service

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.yml and .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 only src/
  • THEN the command prints a conclusion of success or failure, and the title holds no configuration 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.yml upload on main?: release.yml uploads trivy-image-uv-seed and trivy-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 only src/ 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.yml and the pull request workflows upload under that category, so a source-only pull request presents the same configuration that main holds. (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.md rule 5 reserves that change for the owner.
    • Rejected: Run devcontainer-image.yml on 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.

Fit

Fits in one pull request.

Suspected block

None.

Dependencies

None.

Activity

  1. added
    type/bug
    scope/ci
    source/agent
    status/new
    value/medium
    effort/medium
    on Nov 28, 2026
  2. devops-cli-service commented on Nov 28, 2026

    @devops-cli-service
    ContributorAuthor
  3. changed the title [-]fix(ci): align the code scanning configurations that a pull request cannot upload[/-] [+]fix(ci): align code scanning configs a pull request uploads[/+] on Nov 28, 2026
  4. devops-cli-service commented on Nov 28, 2026

    @devops-cli-service
    ContributorAuthor

    The job shortened the title of this item. The summary had 72 characters, and the limit is 60. The type and the scope stay.

    • Before: fix(ci): align the code scanning configurations that a pull request cannot upload
    • Source of the summary: the background model
  5. devops-cli-service commented on Nov 28, 2026

    @devops-cli-service
    ContributorAuthor

    Next step: the alternatives check records a verdict. See the section Proposed design of the body.

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/p2-mediumscope/cisource/agentstatus/newtype/bugvalue/medium

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions