Skip to content

[Feature] add exit code explanations for "yarn npm audit" #6893

@Crare

Description

@Crare
  • I'd be willing to implement this feature (contributing guide)
  • This feature is important to have in this repository; a contrib plugin wouldn't do

Describe the user story

We are using 'yarn npm audit' for auditing packages in pipeline. we want to receive information about what severity by highest severity was found with the exit code, if it's over moderate severity, we want it to return exit code that we can check to stop the pipeline continuing. Lower severities will print out warnings. We still want to see the audit results in full so the "--severity" argument is not an option as I think it will hide lower severity results. So we use the exitcode to define what severity is highest. But there is no documentation what these exitcodes are. Are they even the severity level or something else like the amount of vulnerabilities found?

Describe the solution you'd like

Add clear list of all the possible exit codes the "yarn npm audit" outputs and their explanation in the documentation : https://yarnpkg.com/cli/npm/audit.

Describe the drawbacks of your solution

I can't see none, it's just adding more information what the script does.

Describe alternatives you've considered

none.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestwaiting for feedbackWill autoclose in a while unless more data are provided

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions