From edb8df0b903786616f74297bb3f1b895b3a329d5 Mon Sep 17 00:00:00 2001 From: Thomas Weber Date: Tue, 24 Dec 2024 19:54:04 -0600 Subject: [PATCH] Update workflows based on zizmor audit --- .github/workflows/deploy.yml | 20 ++++++++++---------- .github/workflows/validate.yml | 6 ++++-- 2 files changed, 14 insertions(+), 12 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index ec97333..28ed09b 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -6,11 +6,6 @@ on: - master workflow_dispatch: -permissions: - contents: read - pages: write - id-token: write - concurrency: group: "deploy" cancel-in-progress: true @@ -20,12 +15,14 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 + with: + persist-credentials: false - name: Setup GitHub Pages id: pages - uses: actions/configure-pages@v4 + uses: actions/configure-pages@983d7736d9b0ae728b81ab479565c72886d7745b - name: Install Node.js - uses: actions/setup-node@v4 + uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af with: node-version: 20 - name: Install dependencies @@ -33,7 +30,7 @@ jobs: - name: Build run: npm run build - name: Upload artifact - uses: actions/upload-pages-artifact@v3 + uses: actions/upload-pages-artifact@56afc609e74202658d3ffba0e8f6dda462b719fa with: path: ./build @@ -41,9 +38,12 @@ jobs: environment: name: github-pages url: ${{ steps.deployment.outputs.page_url }} + permissions: + pages: write + id-token: write runs-on: ubuntu-latest needs: build steps: - name: Deploy to GitHub Pages id: deployment - uses: actions/deploy-pages@v4 + uses: actions/deploy-pages@d6db90164ac5ed86f2b6aed7e0febac5b3c0c03e diff --git a/.github/workflows/validate.yml b/.github/workflows/validate.yml index e64f265..e2e8ee2 100644 --- a/.github/workflows/validate.yml +++ b/.github/workflows/validate.yml @@ -6,9 +6,11 @@ jobs: build: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 + with: + persist-credentials: false - name: Install Node.js - uses: actions/setup-node@v4 + uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af with: node-version: 20 - run: npm ci