Skip to content
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 dependencies #13

Open
timtebeek opened this issue Feb 14, 2024 · 0 comments
Open

Find and fix vulnerable NPM dependencies #13

timtebeek opened this issue Feb 14, 2024 · 0 comments
Labels

Comments

@timtebeek
Copy link
Contributor

As a sister to our existing https://app.moderne.io/recipes/org.openrewrite.java.dependencies.DependencyVulnerabilityCheck

For a v1 we can leverage quite a few components we have already, as linked under references.

The tasks then come down to:

  1. Copy or broaden the existing ParseAdvisories to also cover NPM ecosystem
  2. Copy or broaden the existing recipe to cross reference package-lock.json against the vulnerabilities
  3. Deploy to platform, and ensure the data table produced is hooked up to the same visualization

Reference

  1. The existing Advisories parser
    https://github.com/openrewrite/rewrite-java-dependencies/blob/8092228ee2a8b78c8974b641722e7ebaed1d678a/src/main/java/org/openrewrite/java/dependencies/github/ParseAdvisories.java#L92
  2. The weekly job that updates our advisories
    https://github.com/openrewrite/rewrite-java-dependencies/blob/main/.github/workflows/advisories.yml
  3. The existing Find and fix recipe
    https://github.com/openrewrite/rewrite-java-dependencies/blob/8092228ee2a8b78c8974b641722e7ebaed1d678a/src/main/java/org/openrewrite/java/dependencies/DependencyVulnerabilityCheck.java#L55
  4. Supported version selectors
    https://docs.openrewrite.org/reference/dependency-version-selectors#caret-range
  5. package-lock.json file format
    https://docs.npmjs.com/cli/v10/configuring-npm/package-lock-json
  6. moderne_visualizations_misc/specs/dependency_vulnerabilities.yml
    https://github.com/moderneinc/moderne-visualizations-misc/blob/fb8630a08ef849466ee8d3f3a6aeec37816097f9/moderne_visualizations_misc/specs/dependency_vulnerabilities.yml#L14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant