diff --git a/scripts/build-linux.sh b/scripts/build-linux.sh index 855f93cc..125c2529 100644 --- a/scripts/build-linux.sh +++ b/scripts/build-linux.sh @@ -1,7 +1,7 @@ #!/bin/bash NODE_REQUIRED_VERSION=v12.13.1 -SNYK_API_TOKEN=885953dc-9469-443c-984d-524352d54116 +SNYK_ORG=sda if ! [ -x "$(command -v git)" ]; then echo 'GIT does not exist! Please set it up before running this script!' >&2 @@ -42,7 +42,8 @@ fi if ! [ -x "$(command -v snyk)" ]; then echo 'Snyk does not exist! Installing and setting it up' >&2 npm install -g snyk - snyk config set api=$SNYK_API_TOKEN + snyk config set org="$SNYK_ORG" + snyk config set api="$SNYK_API_TOKEN" fi if [ -z "$PARENT_BUILD_VERSION" ]; then @@ -67,7 +68,7 @@ npm install # Run Snyk Security Tests echo "Running snyk security tests" -snyk test --file=package.json +snyk test --file=package-lock.json --org="$SNYK_ORG" # replace url in config echo "Setting default pod url to https://corporate.symphony.com" diff --git a/scripts/build-mac.sh b/scripts/build-mac.sh index 1c05abce..b07f4cf7 100755 --- a/scripts/build-mac.sh +++ b/scripts/build-mac.sh @@ -1,7 +1,7 @@ #!/bin/bash NODE_REQUIRED_VERSION=v12.13.1 -SNYK_API_TOKEN=885953dc-9469-443c-984d-524352d54116 +SNYK_ORG=sda # Check basic dependencies if ! [ -x "$(command -v git)" ]; then @@ -43,7 +43,8 @@ fi if ! [ -x "$(command -v snyk)" ]; then echo 'Snyk does not exist! Installing and setting it up' >&2 npm install -g snyk - snyk config set api=$SNYK_API_TOKEN + snyk config set org="$SNYK_ORG" + snyk config set api="$SNYK_API_TOKEN" fi if ! [ -x "$(command -v /usr/local/bin/packagesbuild)" ]; then @@ -81,7 +82,7 @@ npm install # Run Snyk Security Tests echo "Running snyk security tests" -snyk test --file=package.json +snyk test --file=package-lock.json --org="$SNYK_ORG" # Replace url in config echo "Setting default pod url to https://corporate.symphony.com" diff --git a/scripts/build-win32.bat b/scripts/build-win32.bat index 7d0c6b22..e79b3c5b 100644 --- a/scripts/build-win32.bat +++ b/scripts/build-win32.bat @@ -6,7 +6,7 @@ echo %PATH% set DISABLE_REBUILD=true set NODE_REQUIRED_VERSION=12.13.1 -set SNYK_API_TOKEN=885953dc-9469-443c-984d-524352d54116 +set SNYK_ORG=sda set PATH=%PATH%;C:\Program Files\nodejs\;C:\Program Files\Git\cmd echo %PATH% @@ -39,6 +39,7 @@ WHERE snyk if %ERRORLEVEL% NEQ 0 ( echo "Snyk does not exist! Installing and setting it up" call npm i snyk -g + call snyk config set org=%$SNYK_ORG% call snyk config set api=%SNYK_API_TOKEN% ) @@ -54,7 +55,7 @@ call npm install # Run Snyk Security Tests echo "Running snyk security tests" -call snyk test --file=package.json +call snyk test --file=package-lock.json --org=%SNYK_ORG% :: Set expiry if required IF "%EXPIRY_PERIOD%"=="" ( diff --git a/scripts/build-win64.bat b/scripts/build-win64.bat index 07b29e56..333ec585 100644 --- a/scripts/build-win64.bat +++ b/scripts/build-win64.bat @@ -6,7 +6,7 @@ echo %PATH% set DISABLE_REBUILD=true set NODE_REQUIRED_VERSION=12.13.1 -set SNYK_API_TOKEN=885953dc-9469-443c-984d-524352d54116 +set SNYK_ORG=sda set PATH=%PATH%;C:\Program Files\nodejs\;C:\Program Files\Git\cmd echo %PATH% @@ -27,6 +27,7 @@ WHERE snyk if %ERRORLEVEL% NEQ 0 ( echo "Snyk does not exist! Installing and setting it up" call npm i snyk -g + call snyk config set org=%$SNYK_ORG% call snyk config set api=%SNYK_API_TOKEN% ) @@ -42,7 +43,7 @@ call npm install # Run Snyk Security Tests echo "Running snyk security tests" -call snyk test --file=package.json +call snyk test --file=package-lock.json --org=%SNYK_ORG% :: Set expiry if required IF "%EXPIRY_PERIOD%"=="" (