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

Support Yarn's --exclude #298

Closed
sargunv opened this issue Jan 4, 2023 · 2 comments · Fixed by #303
Closed

Support Yarn's --exclude #298

sargunv opened this issue Jan 4, 2023 · 2 comments · Fixed by #303

Comments

@sargunv
Copy link
Contributor

sargunv commented Jan 4, 2023

Certain dependencies will cause NPM's quick audit endpoint to return a 400 Bad Request error, which bubbles up to yarn npm audit failing with that error and audit-ci failing with an "Invalid JSON" error.

Normally, we can work around this with yarn npm audit --exclude <pkg>, but currently there's no way to pass such excludes to Yarn when running it with audit-ci.

Would an "exclude" feature in audit-ci be acceptable? If so, I can start working on a PR.

CleanShot 2023-01-04 at 13 51 14@2x

CleanShot 2023-01-04 at 13 54 37@2x

@quinnturner
Copy link
Member

quinnturner commented Jan 4, 2023

I was not aware of this. Absolutely, I would support passing this argument.

One point of debate is whether we should just go ahead and have some approach of passing in extra arguments directly to auditors vs. making an --exclude flag.

Making a Yarn-exclusive flag would be a first. Perhaps we can have an --extra-arguments flag which would append whatever is provided to the underlying auditor directly.

@sargunv
Copy link
Contributor Author

sargunv commented Jan 4, 2023

One point of debate is whether we should just go ahead and have some approach of passing in extra arguments directly to auditors vs. making an --exclude flag.

This sounds like a good idea to me. Happy to start a PR this week

quinnturner added a commit to quinnturner/audit-ci that referenced this issue Jan 9, 2023
chore(deps): bump json5 from 1.0.1 to 1.0.2 (IBM#299)
Add --extra-args to fix IBM#298 (IBM#300)
quinnturner added a commit to quinnturner/audit-ci that referenced this issue Jan 9, 2023
chore(deps): bump json5 from 1.0.1 to 1.0.2 (IBM#299)
Add --extra-args to fix IBM#298 (IBM#300)

Signed-off-by: Quinn Turner <quinnturnertech@gmail.com>
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 a pull request may close this issue.

2 participants