File tree Expand file tree Collapse file tree 1 file changed +32
-14
lines changed
Expand file tree Collapse file tree 1 file changed +32
-14
lines changed Original file line number Diff line number Diff line change @@ -7,24 +7,42 @@ defaults:
77
88on :
99 push :
10- branches : [ "main" ]
11- paths : [' ui/**' ]
12- pull_request :
13- branches : [ "main" ]
10+ branches : ["main"]
11+ paths : [" ui/**" ]
12+ pull_request_target :
13+ branches : ["main"]
1414
1515jobs :
16- # CVE scanning
1716 cvescan :
18- name : CVE Scanning
17+ name : CVE Scan
1918 runs-on : ubuntu-latest
20- strategy :
21- matrix :
22- node-version : [18.x]
19+
20+ permissions :
21+ contents : read
22+
23+ env :
24+ NODE_VERSION : 24.x
25+
2326 steps :
24- - uses : actions/checkout@v4
25- - name : Use Node.js ${{ matrix.node-version }}
27+ - name : Checkout repository (trusted)
28+ uses : actions/checkout@v4
29+
30+ - name : Set up Node
2631 uses : actions/setup-node@v4
2732 with :
28- node-version : ${{ matrix.node-version }}
29- - run : npm ci
30- - run : npx --yes auditjs ossi --whitelist allow-list.json
33+ node-version : ${{ env.NODE_VERSION }}
34+
35+ - name : Checkout PR code (untrusted)
36+ uses : actions/checkout@v4
37+ with :
38+ repository : ${{ github.event.pull_request.head.repo.full_name }}
39+ ref : ${{ github.event.pull_request.head.ref }}
40+
41+ - name : Run CVE scan (auditjs)
42+ env :
43+ OSS_INDEX_USERNAME : ${{ secrets.OSS_INDEX_USERNAME }}
44+ OSS_INDEX_PASSWORD : ${{ secrets.OSS_INDEX_PASSWORD }}
45+ run : |
46+ echo "Running auditjs with secrets available"
47+ npm ci
48+ npx --yes auditjs ossi --whitelist allow-list.json -u "$OSS_INDEX_USERNAME" -p "$OSS_INDEX_PASSWORD"
You can’t perform that action at this time.
0 commit comments