Skip to content

Instantly share code, notes, and snippets.

@farhad-taran
Created February 13, 2024 18:02
Show Gist options
  • Save farhad-taran/9541fec7f59b7f793bedeb54f8c103cd to your computer and use it in GitHub Desktop.
Save farhad-taran/9541fec7f59b7f793bedeb54f8c103cd to your computer and use it in GitHub Desktop.
How to bypass audit step when blocked on packages that do not have a patch

some times your deployment might be blocked by a audit scan that shows a security alarm for a package that does not have a patch yet. in these instances you probably would like to deploy and wait for patch to become available. the following command can let you bypass the audit step for a specific PR but still allow you to be warned of the issue for the next change. you simply have to make your last commit as skip audit.

 "audit": "yarn audit --level high --groups dependencies; if [ \"$?\" -ge 8 ] && [ -z $(git log --format=%B -n 1|grep \"skip audit\") ]; then exit 1; else exit 0; fi;",
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment