Skip to content

Commit 0bd639c

Browse files
authored
Update MetaMask/action-security-code-scanner and run as part of main workflow (#263)
* Update `MetaMask/action-security-code-scanner` and run as part of main workflow * Add name * Add code scanner as requirement for all-jobs-completed
1 parent 7e61f40 commit 0bd639c

File tree

2 files changed

+22
-8
lines changed

2 files changed

+22
-8
lines changed

Diff for: .github/workflows/main.yml

+13
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,18 @@ jobs:
2222
run: ${{ steps.download-actionlint.outputs.executable }} -color
2323
shell: bash
2424

25+
analyse-code:
26+
name: Code scanner
27+
needs: check-workflows
28+
uses: ./.github/workflows/security-code-scanner.yml
29+
permissions:
30+
actions: read
31+
contents: read
32+
security-events: write
33+
secrets:
34+
SECURITY_SCAN_METRICS_TOKEN: ${{ secrets.SECURITY_SCAN_METRICS_TOKEN }}
35+
APPSEC_BOT_SLACK_WEBHOOK: ${{ secrets.APPSEC_BOT_SLACK_WEBHOOK }}
36+
2537
build-lint-test:
2638
name: Build, lint, and test
2739
uses: ./.github/workflows/build-lint-test.yml
@@ -31,6 +43,7 @@ jobs:
3143
runs-on: ubuntu-latest
3244
needs:
3345
- check-workflows
46+
- analyse-code
3447
- build-lint-test
3548
outputs:
3649
PASSED: ${{ steps.set-output.outputs.PASSED }}

Diff for: .github/workflows/security-code-scanner.yml

+9-8
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,25 @@
11
name: MetaMask Security Code Scanner
22

33
on:
4-
push:
5-
branches:
6-
- main
7-
pull_request:
8-
branches:
9-
- main
4+
workflow_call:
5+
secrets:
6+
SECURITY_SCAN_METRICS_TOKEN:
7+
required: false
8+
APPSEC_BOT_SLACK_WEBHOOK:
9+
required: false
1010
workflow_dispatch:
1111

1212
jobs:
1313
run-security-scan:
14+
name: Run security scan
1415
runs-on: ubuntu-latest
1516
permissions:
1617
actions: read
1718
contents: read
1819
security-events: write
1920
steps:
20-
- name: MetaMask Security Code Scanner
21-
uses: MetaMask/Security-Code-Scanner@main
21+
- name: Analyse code
22+
uses: MetaMask/action-security-code-scanner@v1
2223
with:
2324
repo: ${{ github.repository }}
2425
paths_ignored: |

0 commit comments

Comments
 (0)