ci: fail on high/critical vulnerabilities - #73
Merged
Merged
Conversation
Backstage pulls js-cookie 2.x (via react-use) and adm-zip 0.6.0 (via module-federation), and their ranges keep yarn from reaching the patched versions. Resolutions force them so the audit gate starts green.
Catches high/critical advisories locally before CI does. Only runs when package.json or yarn.lock change, so a new upstream advisory doesn't block unrelated commits.
mateobur
approved these changes
Sep 25, 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.
Martin asked for CI to fail when there are major or critical vulnerabilities. This adds
just audit(yarn npm audit --all --recursive --severity high) to the PR workflow.To start green, two transitive deps are forced with
resolutions. Backstage's own ranges don't let yarn reach the fixed versions:js-cookie^3.0.6: pulled in byreact-use, whichcore-components,catalog-reactandcore-app-apiall depend on.react-useonly callsget/set/remove, which work the same in v3, and the plugin doesn't useuseCookie.adm-zip^0.6.1: pulled in by@module-federation/dts-pluginfrom the Backstage CLI, which pins 0.6.0. Patch bump, dev-only.Resolutions only affect this repo's lockfile. Apps installing the plugin resolve their own versions. They can be removed once Backstage bumps these upstream.
No version bump, since nothing in the published package changes.
The same check also runs as a pre-commit hook, but only when
package.jsonoryarn.lockchange. That way a new upstream advisory doesn't block unrelated commits.