Skip to content

Commit a06c737

Browse files
committed
Update security code scanner workflow
1 parent 806b95d commit a06c737

File tree

1 file changed

+29
-12
lines changed

1 file changed

+29
-12
lines changed
Lines changed: 29 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,47 @@
1-
name: 'MetaMask Security Code Scanner'
1+
name: MetaMask Security Code Scanner
22

33
on:
4-
push:
5-
branches: ['main']
6-
pull_request:
7-
branches: ['main']
4+
workflow_call:
5+
secrets:
6+
SECURITY_SCAN_METRICS_TOKEN:
7+
required: false
8+
APPSEC_BOT_SLACK_WEBHOOK:
9+
required: false
10+
workflow_dispatch:
811

912
jobs:
1013
run-security-scan:
14+
name: Run security scan
1115
runs-on: ubuntu-latest
1216
permissions:
1317
actions: read
1418
contents: read
1519
security-events: write
1620
steps:
17-
- name: MetaMask Security Code Scanner
18-
uses: MetaMask/Security-Code-Scanner@main
21+
- name: Analyse code
22+
uses: MetaMask/action-security-code-scanner@v1
1923
with:
2024
repo: ${{ github.repository }}
2125
paths_ignored: |
26+
.storybook/
27+
'**/__snapshots__/'
28+
'**/*.snap'
29+
'**/*.stories.js'
30+
'**/*.stories.tsx'
31+
'**/*.test.browser.ts*'
32+
'**/*.test.js*'
33+
'**/*.test.ts*'
34+
'**/fixtures/'
35+
'**/jest.config.js'
36+
'**/jest.environment.js'
37+
'**/mocks/'
2238
'**/test*/'
2339
docs/
24-
'**/*.test.js'
25-
'**/*.test.ts'
26-
node_modules
40+
e2e/
2741
merged-packages/
28-
'**/jest.environment.js'
29-
project_metrics_token: ${{secrets.SECURITY_SCAN_METRICS_TOKEN}}
42+
node_modules
43+
storybook/
44+
test*/
45+
rules_excluded: example
46+
project_metrics_token: ${{ secrets.SECURITY_SCAN_METRICS_TOKEN }}
3047
slack_webhook: ${{ secrets.APPSEC_BOT_SLACK_WEBHOOK }}

0 commit comments

Comments
 (0)