Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,14 @@ updates:
target-branch: 'main'
versioning-strategy: 'increase'
open-pull-requests-limit: 10

- package-ecosystem: 'github-actions'
directory: '/'
schedule:
interval: 'daily'
time: '06:00'
allow:
- dependency-name: 'MetaMask/*'
- dependency-name: 'actions/*'
target-branch: 'main'
open-pull-requests-limit: 10
36 changes: 18 additions & 18 deletions .github/workflows/build-lint-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
node-version: [20.x, 22.x]
steps:
- name: Checkout and setup environment
uses: MetaMask/action-checkout-and-setup@v1
uses: MetaMask/action-checkout-and-setup@v2
with:
is-high-risk-environment: false
node-version: ${{ matrix.node-version }}
Expand All @@ -29,7 +29,7 @@ jobs:
run: yarn workspace @metamask/snaps-execution-environments run build:lavamoat:test
- name: Save "@metamask/snaps-execution-environments" build
id: cache-snaps-execution-environments-build
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v6
with:
name: snaps-execution-environments-build-${{ runner.os }}-${{ matrix.node-version }}-${{ github.sha }}
retention-days: 1
Expand All @@ -52,13 +52,13 @@ jobs:
needs: prepare
steps:
- name: Checkout and setup environment
uses: MetaMask/action-checkout-and-setup@v1
uses: MetaMask/action-checkout-and-setup@v2
with:
is-high-risk-environment: false
- name: Build
run: yarn build:ci
- name: Save build files
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v6
with:
name: build-source-${{ runner.os }}-${{ github.sha }}
retention-days: 1
Expand All @@ -79,7 +79,7 @@ jobs:
needs: prepare
steps:
- name: Checkout and setup environment
uses: MetaMask/action-checkout-and-setup@v1
uses: MetaMask/action-checkout-and-setup@v2
with:
is-high-risk-environment: false
- name: Build
Expand All @@ -98,11 +98,11 @@ jobs:
needs: build
steps:
- name: Checkout and setup environment
uses: MetaMask/action-checkout-and-setup@v1
uses: MetaMask/action-checkout-and-setup@v2
with:
is-high-risk-environment: false
- name: Restore build files
uses: actions/download-artifact@v4
uses: actions/download-artifact@v7
with:
name: build-source-${{ runner.os }}-${{ github.sha }}
- name: Generate LavaMoat policy
Expand All @@ -121,7 +121,7 @@ jobs:
needs: prepare
steps:
- name: Checkout and setup environment
uses: MetaMask/action-checkout-and-setup@v1
uses: MetaMask/action-checkout-and-setup@v2
with:
is-high-risk-environment: false
- name: Lint
Expand Down Expand Up @@ -149,16 +149,16 @@ jobs:
package-name: ${{ fromJson(needs.prepare.outputs.test-workspace-package-names) }}
steps:
- name: Checkout and setup environment
uses: MetaMask/action-checkout-and-setup@v1
uses: MetaMask/action-checkout-and-setup@v2
with:
is-high-risk-environment: false
node-version: ${{ matrix.node-version }}
- name: Restore "@metamask/snaps-execution-environments" build
uses: actions/download-artifact@v4
uses: actions/download-artifact@v7
with:
name: snaps-execution-environments-build-${{ runner.os }}-${{ matrix.node-version }}-${{ github.sha }}
- name: Restore build files
uses: actions/download-artifact@v4
uses: actions/download-artifact@v7
with:
name: build-source-${{ runner.os }}-${{ github.sha }}
- name: Install browsers
Expand All @@ -183,7 +183,7 @@ jobs:
shell: bash
- name: Upload coverage artifact
if: ${{ matrix.node-version == '22.x' }}
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v6
with:
name: coverage-${{ steps.get-coverage-folder.outputs.artifact-name }}
path: |
Expand All @@ -204,9 +204,9 @@ jobs:
runs-on: ubuntu-latest
needs: test
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6
- name: Download coverage artifact
uses: actions/download-artifact@v4
uses: actions/download-artifact@v7
with:
pattern: coverage-*
merge-multiple: true
Expand All @@ -229,16 +229,16 @@ jobs:
package-name: ${{ fromJson(needs.prepare.outputs.e2e-workspace-package-names) }}
steps:
- name: Checkout and setup environment
uses: MetaMask/action-checkout-and-setup@v1
uses: MetaMask/action-checkout-and-setup@v2
with:
is-high-risk-environment: false
node-version: ${{ matrix.node-version }}
- name: Restore "@metamask/snaps-execution-environments" build
uses: actions/download-artifact@v4
uses: actions/download-artifact@v7
with:
name: snaps-execution-environments-build-${{ runner.os }}-${{ matrix.node-version }}-${{ github.sha }}
- name: Restore build files
uses: actions/download-artifact@v4
uses: actions/download-artifact@v7
with:
name: build-source-${{ runner.os }}-${{ github.sha }}
- name: Build snap
Expand All @@ -264,7 +264,7 @@ jobs:
os: [macOS-latest, windows-latest]
steps:
- name: Checkout and setup environment
uses: MetaMask/action-checkout-and-setup@v1
uses: MetaMask/action-checkout-and-setup@v2
with:
is-high-risk-environment: false
platform-specific-caching: true
Expand Down
37 changes: 31 additions & 6 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ jobs:
name: Check workflows
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Checkout repository
uses: actions/checkout@v6
- name: Download actionlint
id: download-actionlint
run: bash <(curl https://raw.githubusercontent.com/rhysd/actionlint/7fdc9630cc360ea1a469eed64ac6d78caeda1234/scripts/download-actionlint.bash) 1.7.7
Expand All @@ -26,16 +27,40 @@ 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/
**/__fixtures__/
**/jest.config.js
**/jest.environment.js
**/mocks/
**/__mocks__/
**/test*/
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess this matches test-utils

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 }}

update-pull-request:
name: Update pull request
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish-environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
if: ${{ inputs.destination_dir == '' }}
run: exit 1
- name: Checkout and setup environment
uses: MetaMask/action-checkout-and-setup@v1
uses: MetaMask/action-checkout-and-setup@v2
with:
is-high-risk-environment: true
- name: Build dependencies
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish-github-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
if: ${{ inputs.publish_dir == '' }}
run: exit 1
- name: Checkout and setup environment
uses: MetaMask/action-checkout-and-setup@v1
uses: MetaMask/action-checkout-and-setup@v2
with:
is-high-risk-environment: true
- name: Run build script
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/publish-preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
outputs:
IS_FORK: ${{ steps.is-fork.outputs.IS_FORK }}
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6
- name: Determine whether this PR is from a fork
id: is-fork
run: echo "IS_FORK=$(gh pr view --json isCrossRepository --jq '.isCrossRepository' "${PR_NUMBER}" )" >> "$GITHUB_OUTPUT"
Expand All @@ -29,14 +29,14 @@ jobs:
if: ${{ needs.is-fork-pull-request.outputs.IS_FORK == 'false' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6
- name: Checkout pull request
run: gh pr checkout "${PR_NUMBER}"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PR_NUMBER: ${{ github.event.issue.number }}
- name: Checkout and setup environment
uses: MetaMask/action-checkout-and-setup@v1
uses: MetaMask/action-checkout-and-setup@v2
with:
is-high-risk-environment: true
- name: Get commit SHA
Expand Down
20 changes: 10 additions & 10 deletions .github/workflows/publish-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
tag: ${{ steps.get-release-tag.outputs.tag }}
steps:
- name: Checkout and setup environment
uses: MetaMask/action-checkout-and-setup@v1
uses: MetaMask/action-checkout-and-setup@v2
with:
is-high-risk-environment: true
ref: ${{ github.sha }}
Expand All @@ -51,7 +51,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout and setup environment
uses: MetaMask/action-checkout-and-setup@v1
uses: MetaMask/action-checkout-and-setup@v2
with:
is-high-risk-environment: true
ref: ${{ github.sha }}
Expand All @@ -69,7 +69,7 @@ jobs:
- name: Build test-snaps
run: yarn workspace @metamask/test-snaps build
- name: Upload build artifacts
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v6
with:
name: publish-release-artifacts-${{ github.sha }}
include-hidden-files: true
Expand All @@ -84,12 +84,12 @@ jobs:
needs: publish-release
steps:
- name: Checkout and setup environment
uses: MetaMask/action-checkout-and-setup@v1
uses: MetaMask/action-checkout-and-setup@v2
with:
is-high-risk-environment: true
ref: ${{ github.sha }}
- name: Restore build artifacts
uses: actions/download-artifact@v4
uses: actions/download-artifact@v7
with:
name: publish-release-artifacts-${{ github.sha }}
- name: Dry run publish to NPM
Expand All @@ -108,12 +108,12 @@ jobs:
- get-release-tag
steps:
- name: Checkout and setup environment
uses: MetaMask/action-checkout-and-setup@v1
uses: MetaMask/action-checkout-and-setup@v2
with:
is-high-risk-environment: true
ref: ${{ github.sha }}
- name: Restore build artifacts
uses: actions/download-artifact@v4
uses: actions/download-artifact@v7
with:
name: publish-release-artifacts-${{ github.sha }}
- name: Publish ${{ needs.get-release-tag.outputs.tag }} to NPM
Expand All @@ -130,7 +130,7 @@ jobs:
IS_ENVIRONMENT_RELEASE: ${{ steps.is-environment-release.outputs.IS_ENVIRONMENT_RELEASE }}
steps:
- name: Checkout and setup environment
uses: MetaMask/action-checkout-and-setup@v1
uses: MetaMask/action-checkout-and-setup@v2
with:
is-high-risk-environment: true
ref: ${{ github.sha }}
Expand All @@ -152,7 +152,7 @@ jobs:
version: ${{ steps.version.outputs.VERSION }}
steps:
- name: Checkout and setup environment
uses: MetaMask/action-checkout-and-setup@v1
uses: MetaMask/action-checkout-and-setup@v2
with:
is-high-risk-environment: true
ref: ${{ github.sha }}
Expand Down Expand Up @@ -219,7 +219,7 @@ jobs:
TEST_SNAPS_VERSION: ${{ steps.set-output.outputs.TEST_SNAPS_VERSION }}
steps:
- name: Checkout and setup environment
uses: MetaMask/action-checkout-and-setup@v1
uses: MetaMask/action-checkout-and-setup@v2
with:
is-high-risk-environment: true
ref: ${{ github.sha }}
Expand Down
40 changes: 0 additions & 40 deletions .github/workflows/security-code-scanner.yml

This file was deleted.

Loading
Loading