-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Find and fix vulnerable npm packages #8
Conversation
If we want to reduce the duplication, I've now made the ecosystem of the GitHub security advisory database configurable in We could then push that file here from that repository, as we also do with a few other deploy keys such as for our docs. |
src/main/java/org/openrewrite/nodejs/github/ParseAdvisories.java
Outdated
Show resolved
Hide resolved
src/main/java/org/openrewrite/nodejs/github/ParseAdvisories.java
Outdated
Show resolved
Hide resolved
Co-authored-by: Shannon Pamperl <[email protected]>
src/main/java/org/openrewrite/nodejs/github/ParseAdvisories.java
Outdated
Show resolved
Hide resolved
src/main/java/org/openrewrite/nodejs/DependencyVulnerabilityCheck.java
Outdated
Show resolved
Hide resolved
src/test/java/org/openrewrite/nodejs/DependencyVulnerabilityCheckTest.java
Outdated
Show resolved
Hide resolved
src/main/java/org/openrewrite/nodejs/DependencyVulnerabilityCheck.java
Outdated
Show resolved
Hide resolved
src/test/java/org/openrewrite/nodejs/DependencyVulnerabilityCheckTest.java
Outdated
Show resolved
Hide resolved
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approved with some minor comments.
edit: Oh I guess this is still in draft. Feel free to re-request 😅
src/main/java/org/openrewrite/nodejs/github/advisories/Advisory.java
Outdated
Show resolved
Hide resolved
src/main/java/org/openrewrite/nodejs/github/advisories/Range.java
Outdated
Show resolved
Hide resolved
src/main/java/org/openrewrite/nodejs/github/advisories/Range.java
Outdated
Show resolved
Hide resolved
* Parse vulnerabilities into local csv file * Detect and bump NPM dependency versions * Some minor comments to document what's done * Parse a single advisory file in tests due to ordering * Additional tests to document current behavior * Find all vulnerabilities, but only bump patch versions * Minor polish to get rid of warnings * Apply suggestions from code review Co-authored-by: Shannon Pamperl <[email protected]> * Apply suggestions from code review * Apply suggestions from code review Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * Keep parsing advisories in rewrite-java-dependencies --------- Co-authored-by: Shannon Pamperl <[email protected]> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
What's changed?
Add a recipe to Find and fix vulnerable npm packages
Anything in particular you'd like reviewers to focus on?
^
versions specifically..minor
and.major
CVEs in code that now only show up in data table rowsDependencyInsight
this for now assumes a singlepackage-lock.json
. Should we support multiple?Anyone you would like to review specifically?
@zieka
Have you considered any alternatives or workarounds?
rewrite-java-dependencies
, unless we rename thatrewrite-dependencies
.DependencyVulnerabilityCheck
for Java, producing different data table rows sans groupId/artifactId split, and without dependency depth, due to lacking data. This will require new visualizations, and separate recipe runs, but seemed a stretch to "make it fit" the existing model in rewrite-java-dependencies.