From f85265b73abf56b445e19f7d99d85fcc9d8c1bfb Mon Sep 17 00:00:00 2001 From: Martijn Laarman Date: Wed, 11 Nov 2026 15:34:27 +0100 Subject: [PATCH] Pin the Pages actions by SHA and check the workflows with zizmor The deploy job now holds the Pages permissions itself, its checkout keeps no credentials, and a ci workflow runs nullean/.github's zizmor on every PR. Dependabot keeps the action pins current, and `mise run check` runs zizmor locally. The pr skill is the template's, which asks for a release label. Co-Authored-By: Claude Opus 5.5 --- .claude/skills/pr/SKILL.md | 28 +++++++++++++++------------- .github/dependabot.yml | 12 ++++++++++++ .github/workflows/ci.yml | 19 +++++++++++++++++++ .github/workflows/pages.yml | 20 ++++++++++++-------- mise.toml | 9 +++++++++ 5 files changed, 67 insertions(+), 21 deletions(-) create mode 100644 .github/dependabot.yml create mode 100644 .github/workflows/ci.yml create mode 100644 mise.toml diff --git a/.claude/skills/pr/SKILL.md b/.claude/skills/pr/SKILL.md index 7e9f2bf..69c031b 100644 --- a/.claude/skills/pr/SKILL.md +++ b/.claude/skills/pr/SKILL.md @@ -76,19 +76,21 @@ Conditional add-ons — each is one or two sentences with a bold lead-in, no hea **Do not** include bullet lists of changed files. Do not summarize what the diff already states plainly. -### 6. Apply labels - -Apply the labels this repo uses. Common defaults: - -| Label | Use when | -|---|---| -| `bug` | A defect in existing behaviour is fixed | -| `enhancement` or `feature` | A capability is added or improved | -| `chore` | Cleanup, refactor, internal restructure — no user-visible change | -| `documentation` | Docs-only change | -| `dependencies` | Dependency version bumps | - -Check `.github/workflows/` or the repo's CONTRIBUTING guide for any enforced label policy before creating the PR. +### 6. Apply exactly one release label + +The `pr-labels` check fails a PR without exactly one of these, and release-drafter turns them into the next version: + +| Label | Use when | Version | +|---|---|---| +| `breaking` | A consumer must change something after upgrading (see [breaking-changes](../breaking-changes/SKILL.md)) | 0.x: minor, 1.x+: major | +| `feature` | A new capability | minor | +| `enhancement` | An existing capability improved | minor | +| `bug` / `fix` | A defect in existing behaviour is fixed | patch | +| `documentation` | Docs only | patch | +| `chore` | Cleanup, refactor, internal restructure; no user-visible change | patch | +| `dependencies` | Dependency version bumps | patch | +| `ci` | Build and automation | patch | +| `changelog:skip` | Should not appear in the release notes | patch | ### 7. Check whether a PR already exists diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..a0ed241 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,12 @@ +version: 2 +updates: + - package-ecosystem: github-actions + directory: / + schedule: + interval: weekly + cooldown: + default-days: 7 + labels: [dependencies] + groups: + actions: + patterns: ["*"] diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..963cd0a --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,19 @@ +name: ci + +on: + pull_request: + push: + branches: [main] + workflow_dispatch: + +permissions: {} + +concurrency: + group: ci-${{ github.ref }} + cancel-in-progress: ${{ github.event_name == 'pull_request' }} + +jobs: + zizmor: + uses: nullean/.github/.github/workflows/zizmor.yml@83ef343759c443afe1964e9c33327527f8677b05 # v1.3.0 + permissions: + contents: read diff --git a/.github/workflows/pages.yml b/.github/workflows/pages.yml index 1228397..c3abfac 100644 --- a/.github/workflows/pages.yml +++ b/.github/workflows/pages.yml @@ -5,10 +5,7 @@ on: branches: [main] workflow_dispatch: -permissions: - contents: read - pages: write - id-token: write +permissions: {} concurrency: group: pages @@ -20,11 +17,18 @@ jobs: name: github-pages url: ${{ steps.deployment.outputs.page_url }} runs-on: ubuntu-latest + timeout-minutes: 10 + permissions: + contents: read + pages: write # publish to GitHub Pages + id-token: write # deploy-pages proves the deployment came from this workflow steps: - - uses: actions/checkout@v4 - - uses: actions/configure-pages@v5 - - uses: actions/upload-pages-artifact@v3 + - uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0 + with: + persist-credentials: false + - uses: actions/configure-pages@983d7736d9b0ae728b81ab479565c72886d7745b # v5.0.0 + - uses: actions/upload-pages-artifact@56afc609e74202658d3ffba0e8f6dda462b719fa # v3.0.1 with: path: '.' - id: deployment - uses: actions/deploy-pages@v4 + uses: actions/deploy-pages@d6db90164ac5ed86f2b6aed7e0febac5b3c0c03e # v4.0.5 diff --git a/mise.toml b/mise.toml new file mode 100644 index 0000000..4f249be --- /dev/null +++ b/mise.toml @@ -0,0 +1,9 @@ +# Bootstraps the toolchain and is the one entry point: `mise run `, the same task names in every nullean repo. +# This is a static site: there is no .NET to install, only the workflow checks. + +[tools] +zizmor = "1" + +[tasks.check] +description = "Fail on workflow findings (zizmor)" +run = "zizmor --min-severity medium ."