From 4f0a42285c706a67c2ce0fff8ccaa61bdeb3976d Mon Sep 17 00:00:00 2001 From: Vecko <36369090+VeckoTheGecko@users.noreply.github.com> Date: Tue, 27 Oct 2026 11:00:05 +0100 Subject: [PATCH 1/8] pre-commit: add zizmor hook --- .pre-commit-config.yaml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 50661092..f5628b68 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -13,6 +13,12 @@ repos: - id: double-quote-string-fixer exclude: \.html$ + - repo: https://github.com/zizmorcore/zizmor-pre-commit + rev: v1.31.1 + hooks: + - id: zizmor + args: ['--offline'] + - repo: https://github.com/pre-commit/mirrors-prettier rev: 'v4.0.0-alpha.8' hooks: From 6661009faeb29be8d55bb0dcf2409330cde62a6f Mon Sep 17 00:00:00 2001 From: Vecko <36369090+VeckoTheGecko@users.noreply.github.com> Date: Tue, 27 Oct 2026 11:00:14 +0100 Subject: [PATCH 2/8] ci: add zizmor GHA security analysis workflow --- .github/workflows/zizmor.yml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 .github/workflows/zizmor.yml diff --git a/.github/workflows/zizmor.yml b/.github/workflows/zizmor.yml new file mode 100644 index 00000000..8167b675 --- /dev/null +++ b/.github/workflows/zizmor.yml @@ -0,0 +1,24 @@ +name: GHA Security Analysis + +on: + push: + branches: [main] + pull_request: + branches: ['**'] + +permissions: {} + +jobs: + zizmor: + name: GHA Security Analysis using Zizmor + runs-on: ubuntu-latest + permissions: + security-events: write # Required for upload-sarif (used by zizmor-action) to upload SARIF files. + steps: + - name: Checkout repository + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + with: + persist-credentials: false + + - name: Run zizmor + uses: zizmorcore/zizmor-action@53290badfa369cb0bf7ad16342cb62c2fa47ac7b # v0.8.0 From eec3ad3e7a7ec2c8a67eb293466960dd87a73bc9 Mon Sep 17 00:00:00 2001 From: Vecko <36369090+VeckoTheGecko@users.noreply.github.com> Date: Tue, 27 Oct 2026 11:00:40 +0100 Subject: [PATCH 3/8] ci: pin actions by commit SHA --- .github/workflows/deploy.yml | 10 +++++----- .github/workflows/linkcheck.yml | 6 +++--- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index de83db35..9b440d9b 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -23,15 +23,15 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v7 + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - name: Setup Node.js - uses: actions/setup-node@v7 + uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0 with: node-version: '20' cache: 'npm' - name: Restore cache - uses: actions/cache@v6 + uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0 with: path: | .next/cache @@ -47,7 +47,7 @@ jobs: run: npm run build - name: Upload artifact - uses: actions/upload-pages-artifact@v5 + uses: actions/upload-pages-artifact@fc324d3547104276b827a68afc52ff2a11cc49c9 # v5.0.0 with: path: ./out @@ -61,4 +61,4 @@ jobs: steps: - name: Deploy to GitHub Pages id: deployment - uses: actions/deploy-pages@v5 + uses: actions/deploy-pages@368f82528645a54fb793d4d04e342629a3f51346 # v5.0.1 diff --git a/.github/workflows/linkcheck.yml b/.github/workflows/linkcheck.yml index ec4b83f6..31ec253e 100644 --- a/.github/workflows/linkcheck.yml +++ b/.github/workflows/linkcheck.yml @@ -18,11 +18,11 @@ jobs: LYCHEE_REPORT_FILE: ./lychee/out.md runs-on: ubuntu-latest steps: - - uses: actions/checkout@v7 + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - name: Link Checker id: lychee - uses: lycheeverse/lychee-action@v2.9.0 + uses: lycheeverse/lychee-action@e7477775783ea5526144ba13e8db5eec57747ce8 # v2.9.0 with: # v2 fails the step on broken links by default; keep going so the # tracking issue gets updated below. @@ -57,7 +57,7 @@ jobs: -f body='No invalid links found! 🤖' - name: Upload artifact - uses: actions/upload-artifact@v7 + uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2 with: name: lychee-report path: ${{ env.LYCHEE_REPORT_FILE }} From 3faf118ccb0e5203c950be5bb5b5c8be73902b03 Mon Sep 17 00:00:00 2001 From: Vecko <36369090+VeckoTheGecko@users.noreply.github.com> Date: Tue, 27 Oct 2026 11:00:49 +0100 Subject: [PATCH 4/8] ci: don't persist git credentials on checkout --- .github/workflows/deploy.yml | 2 ++ .github/workflows/linkcheck.yml | 2 ++ 2 files changed, 4 insertions(+) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 9b440d9b..ee76bc57 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -24,6 +24,8 @@ jobs: steps: - name: Checkout uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + with: + persist-credentials: false - name: Setup Node.js uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0 diff --git a/.github/workflows/linkcheck.yml b/.github/workflows/linkcheck.yml index 31ec253e..619ff0f0 100644 --- a/.github/workflows/linkcheck.yml +++ b/.github/workflows/linkcheck.yml @@ -19,6 +19,8 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + with: + persist-credentials: false - name: Link Checker id: lychee From 9c6d5b76b49fd98c105cd556c3c7aa8cd1da140d Mon Sep 17 00:00:00 2001 From: Vecko <36369090+VeckoTheGecko@users.noreply.github.com> Date: Tue, 27 Oct 2026 11:00:49 +0100 Subject: [PATCH 5/8] ci: scope workflow permissions to jobs (least privilege) --- .github/workflows/deploy.yml | 12 +++++++----- .github/workflows/linkcheck.yml | 6 ++++-- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index ee76bc57..8d2be977 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -7,11 +7,7 @@ on: branches: [main] workflow_dispatch: -# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages -permissions: - contents: read - pages: write - id-token: write +permissions: {} # Allow only one concurrent deployment concurrency: @@ -21,6 +17,8 @@ concurrency: jobs: build: runs-on: ubuntu-latest + permissions: + contents: read steps: - name: Checkout uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 @@ -60,6 +58,10 @@ jobs: runs-on: ubuntu-latest needs: build if: github.ref == 'refs/heads/main' + # Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages + permissions: + pages: write + id-token: write steps: - name: Deploy to GitHub Pages id: deployment diff --git a/.github/workflows/linkcheck.yml b/.github/workflows/linkcheck.yml index 619ff0f0..356fb3e8 100644 --- a/.github/workflows/linkcheck.yml +++ b/.github/workflows/linkcheck.yml @@ -8,8 +8,7 @@ on: env: LINK_TRACKING_ISSUE_NUMBER: 85 -permissions: - issues: write +permissions: {} jobs: check-urls: @@ -17,6 +16,9 @@ jobs: env: LYCHEE_REPORT_FILE: ./lychee/out.md runs-on: ubuntu-latest + permissions: + contents: read + issues: write # Required to update the link tracking issue. steps: - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: From 2cbb9168a28c0281dae9261ddf52e50d07d74b5b Mon Sep 17 00:00:00 2001 From: Vecko <36369090+VeckoTheGecko@users.noreply.github.com> Date: Tue, 27 Oct 2026 11:00:55 +0100 Subject: [PATCH 6/8] ci: avoid template expansion in linkcheck run steps --- .github/workflows/linkcheck.yml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/linkcheck.yml b/.github/workflows/linkcheck.yml index 356fb3e8..83ed5588 100644 --- a/.github/workflows/linkcheck.yml +++ b/.github/workflows/linkcheck.yml @@ -38,16 +38,18 @@ jobs: run: | EOF=$(dd if=/dev/urandom bs=15 count=1 status=none | base64) echo "FILE_CONTENT<<$EOF" >> $GITHUB_OUTPUT - echo "$(cat ${{ env.LYCHEE_REPORT_FILE }})" >> $GITHUB_OUTPUT + echo "$(cat "${LYCHEE_REPORT_FILE}")" >> $GITHUB_OUTPUT echo "$EOF" >> $GITHUB_OUTPUT - - run: echo "${{ steps.readReport.outputs.FILE_CONTENT }}" + - env: + FILE_CONTENT: ${{ steps.readReport.outputs.FILE_CONTENT }} + run: echo "${FILE_CONTENT}" - name: Update link tracking issue (update invalid links) if: steps.lychee.outputs.exit_code != 0 env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} ISSUE_BODY: ${{ steps.readReport.outputs.FILE_CONTENT }} run: | - gh api --method PATCH "repos/${{ github.repository }}/issues/${LINK_TRACKING_ISSUE_NUMBER}" \ + gh api --method PATCH "repos/${GITHUB_REPOSITORY}/issues/${LINK_TRACKING_ISSUE_NUMBER}" \ -f state=open \ -f body="${ISSUE_BODY}" @@ -56,7 +58,7 @@ jobs: env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | - gh api --method PATCH "repos/${{ github.repository }}/issues/${LINK_TRACKING_ISSUE_NUMBER}" \ + gh api --method PATCH "repos/${GITHUB_REPOSITORY}/issues/${LINK_TRACKING_ISSUE_NUMBER}" \ -f state=closed \ -f body='No invalid links found! 🤖' From 6d1ca0a655688b34d44917140db89399961a58cb Mon Sep 17 00:00:00 2001 From: Vecko <36369090+VeckoTheGecko@users.noreply.github.com> Date: Tue, 27 Oct 2026 11:00:59 +0100 Subject: [PATCH 7/8] dependabot: add 7-day cooldown --- .github/dependabot.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/dependabot.yaml b/.github/dependabot.yaml index bceabfb4..4add620a 100644 --- a/.github/dependabot.yaml +++ b/.github/dependabot.yaml @@ -7,12 +7,16 @@ updates: directory: '/' schedule: interval: 'monthly' + cooldown: + default-days: 7 # Maintain dependencies for npm - package-ecosystem: 'npm' directory: '/' schedule: interval: 'monthly' + cooldown: + default-days: 7 groups: dependencies: From 2f0b0d486249472173ee717ad4c6a4d722514da7 Mon Sep 17 00:00:00 2001 From: Vecko <36369090+VeckoTheGecko@users.noreply.github.com> Date: Tue, 27 Oct 2026 11:02:15 +0100 Subject: [PATCH 8/8] pre-commit: switch to maintained prettier mirror --- .pre-commit-config.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index f5628b68..d29b58da 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -19,8 +19,8 @@ repos: - id: zizmor args: ['--offline'] - - repo: https://github.com/pre-commit/mirrors-prettier - rev: 'v4.0.0-alpha.8' + - repo: https://github.com/rbubley/mirrors-prettier # Update mirror as official mirror is deprecated + rev: v3.9.10 hooks: - id: prettier exclude: \.html$ @@ -35,8 +35,8 @@ repos: |vue\ |yaml|yml\ )$" - - repo: https://github.com/pre-commit/mirrors-prettier - rev: 'v4.0.0-alpha.8' + - repo: https://github.com/rbubley/mirrors-prettier # Update mirror as official mirror is deprecated + rev: v3.9.10 hooks: - id: prettier