Resolve remaining dependabot alerts in d3_graph_generator#111
Closed
dduugg wants to merge 1 commit into
Closed
Conversation
… resolutions react-scripts pins many nested build-tool dependencies (webpack-dev-server, postcss, minimatch, js-yaml, etc.) that Dependabot can't bump on its own since they're several levels deep in the tree. Adds a yarn `resolutions` block forcing each flagged package to its patched version. ajv and loader-utils are left alone: forcing either one flat in either direction broke the build (ajv-keywords@3.5.2 hard-requires ajv@^6.9.1; some loaders require loader-utils@2's getOptions API). ajv's two alerts turned out to already be satisfied by the existing ^6.x/^8.x ranges once the lockfile was refreshed - no override needed. loader-utils was forced down to 2.0.4 across the board (the only direction that didn't break), which removes the vulnerable 3.x range from the tree entirely. Verified with a full `yarn install` + `CI=true yarn build` - the app still compiles. No test suite exists for this package to run.
6 tasks
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
The 17 auto-generated Dependabot PRs already merged into this repo fixed the alerts Dependabot could bump on its own. The remaining ~54 open alerts (https://github.com/rubyatscale/visualize_packs/security/dependabot) are all nested build-tool dependencies pulled in transitively by
react-scripts(webpack-dev-server, postcss, minimatch, js-yaml, svgo, etc.) — several levels deep in the tree, which Dependabot can't open a version-bump PR for directly.This adds a
resolutionsblock tod3_graph_generator/package.jsonforcing each flagged package to its patched version, and regeneratesyarn.lock.Two packages are deliberately not touched:
ajv-keywords@3.5.2(used by several old webpack loaders) hard-requiresajv@^6.9.1, while newerschema-utils@4requiresajv@^8.x. Leaving it alone turned out to be sufficient: refreshing the lockfile let the existing^6.x/^8.xranges naturally resolve to already-patched versions (6.15.0 / 8.20.0), so bothajvalerts are actually resolved by this PR too, just without an explicit override.3.xbreaksbabel-loader/@svgr/webpack/file-loader(they use loader-utils@2'sgetOptionsAPI, removed in v3). Forced it down to2.0.4instead — the only direction that didn't break the build — which removes the vulnerable3.xline from the tree entirely.All of this is dev/build tooling only (
react-scripts start/build/test) — none of it ships in the app's production bundle.Test plan
yarn installcompletes cleanlyCI=true yarn buildcompiles successfully (verified locally; this repo's CI doesn't run a JS build step)