-
Notifications
You must be signed in to change notification settings - Fork 0
63 lines (55 loc) · 2.11 KB
/
Mend_NPM_Prioritize.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
name: NPM Prioritize Scan
on:
push:
branches: [ release* ]
pull_request:
branches: [ release* ]
jobs:
WhiteSource-Prioritize:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
node-version: ["12.x"]
steps:
- name: Checkout https://github.com/${{ github.repository }}@${{ github.ref }}
uses: actions/checkout@v2
with:
persist-credentials: false
- name: Set up Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- uses: actions/cache@v2
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Install dependencies
run: npm install --only=prod
- name: WhiteSource Unified Agent Scan
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
WS_APIKEY: ${{secrets.APIKEY}}
WS_WSS_URL: https://saas-eu.whitesourcesoftware.com/agent
WS_PRODUCTNAME: GH_${{github.event.repository.name}}
WS_PROJECTNAME: ${{github.ref}}_Prioritize
WS_ENABLEIMPACTANALYSIS: true
WS_RESOLVEALLDEPENDENCIES: false
WS_NPM_RESOLVEDEPENDENCIES: true
WS_NPM_RESOLVELOCKFILE: false
WS_FILESYSTEMSCAN: false
WS_GENERATEPROJECTDETAILSJSON: true
run: |
curl -LJO https://unified-agent.s3.amazonaws.com/wss-unified-agent.jar
echo Unified Agent downloaded successfully
if [[ "$(curl -sL https://unified-agent.s3.amazonaws.com/wss-unified-agent.jar.sha256)" != "$(sha256sum wss-unified-agent.jar)" ]] ; then
echo "Integrity Check Failed"
else
echo "Integrity Check Passed"
echo "Starting WhiteSource Scan"
fi
java -jar wss-unified-agent.jar -appPath ./package.json -d ./
curl -LJO https://raw.githubusercontent.com/whitesource-ft/ws-examples/main/Scripts/ghissue-eua.sh
chmod +x ./ghissue-eua.sh && ./ghissue-eua.sh