Fail PRs that pin packages JFrog will not serve - #5656
Merged
Conversation
A PR can already fail the proxy age check and still merge, and listing a version in deps-proxy-allowlist.json made that check green while npm ci still 403s. HEAD the tarball on same-repo CI and age-check forks, and post the check on every PR so it can be required.
HEAD is the wrong verb for what Artifactory actually answers; npm ci's 403 is on GET.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Keep the why for the dual signal and the byte-range probe; drop restated how.
A Range-ignoring registry would stream the whole package and leave the required check hanging after it had already printed success. The JSON allowlist is unread and would still look like a way to pass.
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
Protected-runner CI installs through the Databricks JFrog npm mirror. That mirror quarantines each package version for seven days. A lockfile that pins a version inside that window fails
npm ciwith403and{7d-cooldown}.#5640 pinned
nextto16.3.3. The existing check Dependencies available on Databricks proxy went red on that PR:The PR merged anyway.
mainthen could notnpm cion this runner group. Scheduled jobs that install (agent-discovery, docs-api, format-markdown) fail at Install dependencies. Vercel stays green because it uses public npm.scripts/deps-proxy-allowlist.jsonskipped named versions in that check. The JSON cannot make JFrog serve a quarantined tarball, so a PR could add its own exception and look green whilenpm cistill 403s.This repo has no required status checks, so a red check does not block merge. The check also used path filters, so it never posted on content-only PRs and could not be marked required without deadlocking those PRs.
Diagnosis
The check already existed and already failed on the bump. Two things kept it from being a gate:
deps-proxy-allowlist.jsonas a skip. JFrog 403s the tarball even when the packument is readable.mainhas no branch protection. The job only ran whenpackage.json/package-lock.jsonchanged, so the context is missing on most PRs.What changed
Same-repo PRs probe the tarball with a 1-byte range GET against JFrog, then cancel the body (some registries ignore
Rangeand would stream the whole file). HTTP 403 fails the check. A served tarball passes.scripts/deps-proxy-allowlist.jsonis deleted.Fork PRs cannot mint JFrog OIDC. They run on
ubuntu-latestand fail when public npm publish age is younger than seven days.The workflow runs on every
pull_requestwith no path filter. When the PR introduces no new lockfile versions vs the base, the script exits 0 so the check context still posts.Same-repo blocked bump:
Fork blocked bump (age check, no JFrog call):
Content-only PR (no new lockfile versions):
npm run check:deps-proxyis unchanged as the entry point.What this does not do
The merge button is unchanged until a repo admin requires the check context Dependencies available on Databricks proxy on
main(strict required status checks).It does not revert
next@16.3.3onmain. PRs that do not introduce new lockfile versions still pass this check while othernpm cijobs stay red until that version clears the cooldown or is pinned back.Verification
This PR does not bump dependencies, so the always-on workflow should itself go green.
Risks
Until an admin requires the check, a red result can still be merged, same as #5640. Fork PRs approximate the cooldown with publish age rather than a JFrog 403.