diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 21493f8..b1ef501 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -23,16 +23,38 @@ jobs: shell: bash analyse-code: - name: Code scanner + name: Analyse code needs: check-workflows - uses: ./.github/workflows/security-code-scanner.yml + uses: MetaMask/action-security-code-scanner/.github/workflows/security-scan.yml@v2 + with: + scanner-ref: v2 + paths-ignored: | + .storybook/ + **/__snapshots__/ + **/*.snap + **/*.stories.js + **/*.stories.tsx + **/*.test.browser.ts* + **/*.test.js* + **/*.test.ts* + **/fixtures/ + **/jest.config.js + **/jest.environment.js + **/mocks/ + **/test*/ + docs/ + e2e/ + merged-packages/ + node_modules/ + storybook/ + test*/ + secrets: + project-metrics-token: ${{ secrets.SECURITY_SCAN_METRICS_TOKEN }} + slack-webhook: ${{ secrets.APPSEC_BOT_SLACK_WEBHOOK }} 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 diff --git a/.github/workflows/security-code-scanner.yml b/.github/workflows/security-code-scanner.yml deleted file mode 100644 index ababbbe..0000000 --- a/.github/workflows/security-code-scanner.yml +++ /dev/null @@ -1,47 +0,0 @@ -name: MetaMask Security Code Scanner - -on: - 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: Analyse code - uses: MetaMask/action-security-code-scanner@v1 - with: - repo: ${{ github.repository }} - paths_ignored: | - .storybook/ - '**/__snapshots__/' - '**/*.snap' - '**/*.stories.js' - '**/*.stories.tsx' - '**/*.test.browser.ts*' - '**/*.test.js*' - '**/*.test.ts*' - '**/fixtures/' - '**/jest.config.js' - '**/jest.environment.js' - '**/mocks/' - '**/test*/' - docs/ - e2e/ - merged-packages/ - node_modules - storybook/ - test*/ - rules_excluded: example - project_metrics_token: ${{ secrets.SECURITY_SCAN_METRICS_TOKEN }} - slack_webhook: ${{ secrets.APPSEC_BOT_SLACK_WEBHOOK }}