fix(ci): snapshot dependencies on default-branch pushes so dependency-review has a base - #736
Conversation
dependency-review compares the base and head dependency graphs. SBOM
Generation only ran on pull_request and release, so main never received a
dependency snapshot and every PR's comparison reported:
The number of snapshots compared for the base SHA (0) and the head
SHA (1) do not match
With no base snapshot the action treats the entire dependency set as newly
added, so it re-flags every pre-existing vulnerability on every PR instead
of only the ones the PR actually introduces. That is why an untouched lock
file can block an unrelated PR.
Adds a push trigger on the default branches so those commits get a real
snapshot. The existing job conditions already handle it: cancel-closed-pr-runs
is pull_request-gated and generate-sbom runs for any non-pull_request event.
anchore/sbom-action only uploads release assets on release events, so
upload-release-assets is a no-op here.
Also switches the concurrency group's final fallback from github.ref to
github.sha. That fallback was previously unreachable (pull_request and
release both matched earlier terms); reached by push it would make two
commits landing close together cancel each other, and a cancelled push run
leaves that commit without a snapshot -- reopening the same base-side gap.
Co-Authored-By: Claude <noreply@anthropic.com>
|
Warning Review limit reached
Next review available in: 24 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
Comment |
|
Current-head diagnosis: the new SBOM push contract is not the failing component. CodeQL, Semgrep, Secret Scan, Scorecard, OSV and SBOM all pass; Python Security and Security Scan fail only on the protected |
There was a problem hiding this comment.
Pull request overview
OpenCode cannot approve yet because required coverage evidence did not pass.
Review outcome
1. HIGH .github/workflows/opencode-review.yml:1 - Coverage evidence did not prove required test/docstring evidence
-
Problem: The required coverage-evidence job result was
failure, so OpenCode cannot establish approval sufficiency for this head. -
Root cause: Automated approval is only valid when the same-head coverage-evidence job proves supported repository test suites passed and configured docstring gates passed or were advisory, or reports not applicable because no supported source files or package manifests exist. Missing, failed, skipped, unavailable, or unsupported-tooling test evidence is a blocker.
-
Fix: Install or configure the repository test/docstring evidence tooling when source files or package manifests exist, rerun the current-head coverage-evidence job, and approve only after it reports
successwith required evidence or explicit no-source not-applicable evidence. -
Regression test: Keep the approval branch checking
needs.coverage-evidence.result == successbefore posting APPROVE, and publish REQUEST_CHANGES when coverage-evidence blocker states such as cancelled, skipped, failed, unsupported-tooling, or below-100 evidence are present. -
Result: REQUEST_CHANGES
-
Reason: coverage-evidence result was
failure, so required test/docstring evidence was not proven for current head1b5dbebbc93fd4b9aafedafb22ee1679ed4ee7de. -
Head SHA:
1b5dbebbc93fd4b9aafedafb22ee1679ed4ee7de -
Workflow run: 30897835687
-
Workflow attempt: 1
Coverage evidence
Coverage Decision
- Result: FAIL
- Test evidence: not proven passing
- Docstring evidence: not proven passing when configured
- Failure count: 1
Changed-File Evidence Map
flowchart LR
PR["PR changed files"] --> Evidence["OpenCode bounded evidence"]
Evidence --> S1["Workflow: sbom-generation.yml"]
S1 --> I1["GitHub Actions review job"]
I1 --> R1["Review risk: Workflow: sbom-generation.yml"]
R1 --> V1["actionlint plus required checks"]
Evidence --> S2["Test: test_sbom_generation_push_contract.py"]
S2 --> I2["regression suite"]
I2 --> R2["Review risk: Test: test_sbom_generation_push_contract.py"]
R2 --> V2["targeted test run"]
OpenCode Review Overview
Pull request overviewOpenCode cannot approve yet because required coverage evidence did not pass. Review outcome1. HIGH .github/workflows/opencode-review.yml:1 - Coverage evidence did not prove required test/docstring evidence
Coverage evidenceCoverage Decision
Changed-File Evidence Mapflowchart LR
PR["PR changed files"] --> Evidence["OpenCode bounded evidence"]
Evidence --> S1["Workflow: sbom-generation.yml"]
S1 --> I1["GitHub Actions review job"]
I1 --> R1["Review risk: Workflow: sbom-generation.yml"]
R1 --> V1["actionlint plus required checks"]
Evidence --> S2["Test: test_sbom_generation_push_contract.py"]
S2 --> I2["regression suite"]
I2 --> R2["Review risk: Test: test_sbom_generation_push_contract.py"]
R2 --> V2["targeted test run"]
|
There was a problem hiding this comment.
Pull request overview
OpenCode cannot approve yet because required coverage evidence did not pass.
Review outcome
1. HIGH .github/workflows/opencode-review.yml:1 - Coverage evidence did not prove required test/docstring evidence
-
Problem: The required coverage-evidence job result was
failure, so OpenCode cannot establish approval sufficiency for this head. -
Root cause: Automated approval is only valid when the same-head coverage-evidence job proves supported repository test suites passed and configured docstring gates passed or were advisory, or reports not applicable because no supported source files or package manifests exist. Missing, failed, skipped, unavailable, or unsupported-tooling test evidence is a blocker.
-
Fix: Install or configure the repository test/docstring evidence tooling when source files or package manifests exist, rerun the current-head coverage-evidence job, and approve only after it reports
successwith required evidence or explicit no-source not-applicable evidence. -
Regression test: Keep the approval branch checking
needs.coverage-evidence.result == successbefore posting APPROVE, and publish REQUEST_CHANGES when coverage-evidence blocker states such as cancelled, skipped, failed, unsupported-tooling, or below-100 evidence are present. -
Result: REQUEST_CHANGES
-
Reason: coverage-evidence result was
failure, so required test/docstring evidence was not proven for current head1b5dbebbc93fd4b9aafedafb22ee1679ed4ee7de. -
Head SHA:
1b5dbebbc93fd4b9aafedafb22ee1679ed4ee7de -
Workflow run: 30899990370
-
Workflow attempt: 1
Coverage evidence
Coverage Decision
- Result: FAIL
- Test evidence: not proven passing
- Docstring evidence: not proven passing when configured
- Failure count: 1
Changed-File Evidence Map
flowchart LR
PR["PR changed files"] --> Evidence["OpenCode bounded evidence"]
Evidence --> S1["Workflow: sbom-generation.yml"]
S1 --> I1["GitHub Actions review job"]
I1 --> R1["Review risk: Workflow: sbom-generation.yml"]
R1 --> V1["actionlint plus required checks"]
Evidence --> S2["Test: test_sbom_generation_push_contract.py"]
S2 --> I2["regression suite"]
I2 --> R2["Review risk: Test: test_sbom_generation_push_contract.py"]
R2 --> V2["targeted test run"]
|
@opencode-agent Please re-review exact head |
|
@cwl-noema-review Please independently review exact head |
0b6a188
into
fix/strix-python-security-cves
|
Superseded by #731 exact head |
What
.github/workflows/sbom-generation.yml:push: branches: [main, master, develop]so default-branch commits get a dependency snapshot;github.reftogithub.sha;Why
dependency-reviewcompares the base and head dependency graphs. SBOM Generation only ran onpull_requestandrelease, somainnever received a dependency snapshot and every PR's comparison reports:With no base snapshot the action treats the entire dependency set as newly added, so it re-flags every pre-existing vulnerability on every PR instead of only the ones the PR introduces. This was observed on #733 and #734.
This does not weaken the gate: genuinely added vulnerable dependencies still fail, while whole-repository scanners (
trivy-fs,pip-audit) continue to catch pre-existing findings. It restores the intended diff-scoped semantics of dependency-review.Why the concurrency fallback changes
For pull requests the group is keyed by PR number and for releases by tag. Push events need a commit-specific final key. Using
github.refwould make every push tomainshare one concurrency group; withcancel-in-progress: true, a later commit could cancel the earlier commit's dependency submission and recreate the missing-base snapshot defect.github.shapreserves one snapshot attempt per commit while still deduplicating reruns of the same commit.Verification contracts
tests/test_sbom_generation_push_contract.pyproves:main,master, anddeveloppushes are included;dependency-snapshot: true;github.sha, nevergithub.ref;generate-sbomwith job-scopedcontents: write.Current-head GitHub Actions remain authoritative before merge. The first successful push run after this lands populates the default-branch snapshot used by subsequent PR comparisons.
Related
The genuine Strix lock advisories and explicit aiohttp floor are now folded into atomic baseline PR #731. This PR addresses the independent missing-base-snapshot root cause.