Stop dependency-review from commenting the benign fork-PR snapshot warning - #216
Merged
AndreasIgel merged 2 commits intoJul 26, 2026
Merged
Conversation
…-PR snapshot warning (java-helpers#212) Co-Authored-By: Andreas Igel <andreas.igel@computacenter.com>
Contributor
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.Snapshot WarningsEnsure that dependencies are being submitted on PR branches and consider enabling retry-on-snapshot-warnings. See the documentation for more information and troubleshooting advice. Scanned FilesNone |
Co-Authored-By: Andreas Igel <andreas.igel@computacenter.com>
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
|
This was referenced Jul 26, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Summary
Stops the
dependency-reviewcheck from posting the confusing "No snapshots were found for the head SHA" warning as a comment on every PR. Fixes #212 (follow-up to #160 / #182).Root cause / why the earlier idea doesn't work: the warning is not a failure — the check is green. It appears because for a fork PR head GitHub has only the manifest-derived dependency graph and no submitted snapshot. A submitted snapshot can't be produced for a fork PR head without building untrusted fork code with a write token (the pattern the fork-CI design deliberately avoids), and submitting on
maindoesn't help a PR head. So the warning can't be "fixed" by adding data — it has to be configured away.Fix: switch
comment-summary-in-prfromalwaystoon-failure. The action only creates/updates the PR summary comment when the review actually fails (a vulnerability at/abovefail-on-severity, or a denied license); snapshot warnings alone never trigger a comment. On clean PRs there is now no comment, so the benign snapshot warning stops showing up on PRs. The warning remains only in the Actions run log, and the check still runs and still fails on real issues.This is the standard approach for OSS projects (GitHub's own starter workflow defaults
comment-summary-in-prtonever;on-failurekeeps a helpful comment when it matters). Tradeoff: no "✅ No vulnerabilities" comment on clean PRs — the green check conveys that instead.Also removes
retry-on-snapshot-warnings: true(added in #182): with no submission workflow it just retries ~2 min for a snapshot that never arrives, then proceeds with the warning anyway.Related
Note
A separate, optional enhancement (not in this PR) would be adding a Maven dependency submission workflow on
mainfor fuller transitive dependency coverage in the graph/Dependabot alerts — but that is orthogonal to this warning and I left it out to keep this focused. Happy to add it if you want it.