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

DCJ-667: Use better-npm-audit for CI instead of plain npm-audit #2669

Closed
wants to merge 4 commits into from

Conversation

rushtong
Copy link
Contributor

@rushtong rushtong commented Sep 11, 2024

Addresses

https://broadworkbench.atlassian.net/browse/DCJ-667

Summary

This PR does two things:

  1. Replace usages of npm audit with better-npm-audit audit -p
  2. Adds an exclusion for the path-to-regexp finding

The path-to-regexp finding will be handled with https://broadworkbench.atlassian.net/browse/DCJ-294. In the meantime, this finding should not prevent other work from proceeding. This PR allows for that to happen and also provides a better way of managing potential exclusions in the future.


Have you read Terra's Contributing Guide lately? If not, do that first.

  • Label PR with a Jira ticket number and include a link to the ticket
  • Label PR with a security risk modifier [no, low, medium, high]
  • PR describes scope of changes
  • Get a minimum of one thumbs worth of review, preferably two if enough team members are available
  • Get PO sign-off for all non-trivial UI or workflow changes
  • Verify all tests go green
  • Test this change deployed correctly and works on dev environment after deployment

@rushtong rushtong requested a review from a team as a code owner September 11, 2024 12:43
@rushtong rushtong requested review from fboulnois and removed request for a team September 11, 2024 12:43
Copy link
Contributor

@fboulnois fboulnois left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See below:

@@ -14,6 +14,7 @@
"ajv": "8.17.1",
"ajv-formats": "3.0.1",
"axios": "1.7.7",
"better-npm-audit": "3.11.0",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Although I can see the advantages of this package, I have a few concerns:

  • It is itself an npm dependency that depends on a number of packages that may have vulnerabilities
  • According to the Readme , they are looking for collaborators, which suggests that it may not be well maintained (although I do see a recently published version)
  • npm seems to change the audit command behavior between major versions, which also requires major changes to this package

Instead could we:

  1. not depend on npm audit in Pull Requests?
  2. run npm audit in a non-blocking way?
  3. run npm audit on a schedule?

@rushtong
Copy link
Contributor Author

This PR is no longer necessary. #2673 updated the underlying problem behind this effort.

@rushtong rushtong closed this Sep 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants