```yaml
- step: &audit-step-dev
name: 'Pull request - audit'
caches:
- node
script:
- npm install
- npm audit
- step: &audit-step-prod
name: 'Pull request - soft audit'
caches:
- node
script:
- npm install
- |
set +e
npm audit
if [[ $? -gt 0 ]]; then echo "NPM Audit failed, fix dependencies before next merge!"; else echo "NPM Audit OK"; fi
set -e
```
#bash #linux #pipeline #bitbucket #npm





