Use offline cache for Security Scan on fork PRs#1514
Merged
Conversation
The Security Scan job skipped JFrog auth for fork PRs on the assumption that Maven could fetch everything from Central directly. On the protected runner group that assumption is false — connections to repo.maven.apache.org fail with "Remote host terminated the handshake", so the SBOM build (mvn package) could never resolve plugins like spotless-maven-plugin and the job failed before reaching the CVE scan. This blocked every fork PR regardless of its actual CVE posture. Switch the job to the same fork-check + ./.github/actions/setup-maven flow used by prCheck.yml: fork PRs restore the warmed offline cache and run Maven offline; same-repo runs authenticate to JFrog. The warmer already caches the cyclonedx and spotless plugins the SBOM build needs (verified in a warm run). Co-authored-by: Isaac Signed-off-by: Vikrant Puppala <vikrant.puppala@databricks.com>
sreekanth-db
approved these changes
Jun 29, 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.
Problem
The Security Scan check fails on every fork PR (e.g. #1507), and not on a CVE finding — it dies earlier, at the SBOM build:
securityScan.ymlskips JFrog auth for fork PRs (no OIDC token) on the assumption — see the old comment — that Maven can fetch everything from Maven Central directly. On thedatabricks-protected-runner-group, that assumption is false: connections torepo.maven.apache.orgare refused (Remote host terminated the handshake). Somvn packagecan't resolve build plugins and the job fails beforeosv-scannerever runs. The CVE step isskipped. This blocks fork PRs regardless of their actual CVE posture.Fix
Switch the job to the same dependency-resolution flow every other CI job already uses —
fork-check+./.github/actions/setup-maven:The cache warmer already downloads the plugins the SBOM build needs — verified in a warm run that both
cyclonedx-maven-plugin:2.9.1andspotless-maven-plugin:2.39.0are cached.This also aligns the checkout with the rest of CI (checks out the fork's head ref).
Note on the CVE baseline
Separately, the scheduled (non-fork) Security Scan on
maincan fail on real OSV-Scanner CVE findings — that's a genuine dependency-CVE signal and unaffected by this change. This PR only fixes the fork-PR case where the build couldn't even run.NO_CHANGELOG=true
This pull request and its description were written by Isaac.