Skip to content

Commit

Permalink
SNOW-841052: Don't block build on npm audit (#551)
Browse files Browse the repository at this point in the history
  • Loading branch information
sfc-gh-dprzybysz authored Jun 27, 2023
1 parent 5cf2bf6 commit 29bb1b7
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 9 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/audit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Audit

on:
push:
branches:
- master
tags:
- v*
pull_request:
branches:
- master
- prep-**

jobs:
lint:
name: Run audit
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v1
- name: Set up Node.js
uses: actions/setup-node@v1
with:
node-version: '18.x'
- name: Install dependencies
run: npm i
- name: Run audit
run: npm audit
8 changes: 0 additions & 8 deletions ci/container/build_component.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,19 +13,11 @@ echo "[INFO] Building"
rm -f snowflake-sdk*.tgz
echo "[DEBUG] Version"
npm version
echo "[DEBUG] Installing newer node - bundled npm version 6.0.1 does not support setting audit level"
export NVM_PARENT_DIR=`pwd`/ignore
mkdir -p $NVM_PARENT_DIR
export NVM_DIR="$NVM_PARENT_DIR/nvm"
cp -r /usr/local/nvm $NVM_DIR
source $NVM_DIR/nvm.sh && nvm install 10
echo "[DEBUG] Packing"
npm pack
echo "[DEBUG] Installing"
npm install
rm -f ~/.npmrc
echo "[DEBUG] Auditing"
npm audit --audit-level moderate # TODO SNOW-841052 fast-xml-parser has low vulnerability - when new version will be released `moderate` option should be removed

echo "[INFO] Uploading Artifacts"
ARTIFACTS=($(ls snowflake-sdk*))
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"debug": "^3.2.6",
"expand-tilde": "^2.0.2",
"extend": "^3.0.2",
"fast-xml-parser": "^4.1.3",
"fast-xml-parser": "^4.2.5",
"generic-pool": "^3.8.2",
"glob": "^7.1.6",
"https-proxy-agent": "^5.0.1",
Expand Down

0 comments on commit 29bb1b7

Please sign in to comment.