diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index c5698bc..21493f8 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -22,6 +22,18 @@ jobs: run: ${{ steps.download-actionlint.outputs.executable }} -color shell: bash + analyse-code: + name: Code scanner + needs: check-workflows + uses: ./.github/workflows/security-code-scanner.yml + permissions: + actions: read + contents: read + security-events: write + secrets: + SECURITY_SCAN_METRICS_TOKEN: ${{ secrets.SECURITY_SCAN_METRICS_TOKEN }} + APPSEC_BOT_SLACK_WEBHOOK: ${{ secrets.APPSEC_BOT_SLACK_WEBHOOK }} + build-lint-test: name: Build, lint, and test uses: ./.github/workflows/build-lint-test.yml @@ -31,6 +43,7 @@ jobs: runs-on: ubuntu-latest needs: - check-workflows + - analyse-code - build-lint-test outputs: PASSED: ${{ steps.set-output.outputs.PASSED }} diff --git a/.github/workflows/security-code-scanner.yml b/.github/workflows/security-code-scanner.yml index 6bb460d..ababbbe 100644 --- a/.github/workflows/security-code-scanner.yml +++ b/.github/workflows/security-code-scanner.yml @@ -1,24 +1,25 @@ name: MetaMask Security Code Scanner on: - push: - branches: - - main - pull_request: - branches: - - main + workflow_call: + secrets: + SECURITY_SCAN_METRICS_TOKEN: + required: false + APPSEC_BOT_SLACK_WEBHOOK: + required: false workflow_dispatch: jobs: run-security-scan: + name: Run security scan runs-on: ubuntu-latest permissions: actions: read contents: read security-events: write steps: - - name: MetaMask Security Code Scanner - uses: MetaMask/Security-Code-Scanner@main + - name: Analyse code + uses: MetaMask/action-security-code-scanner@v1 with: repo: ${{ github.repository }} paths_ignored: |