Skip to content

ci: add zizmor workflow audit - #1595

Open
oc-tmueller wants to merge 3 commits into
owncloud:masterfrom
oc-tmueller:ci/zizmor
Open

oc-tmueller wants to merge 3 commits into
owncloud:masterfrom
oc-tmueller:ci/zizmor

Conversation

@oc-tmueller

Copy link
Copy Markdown
Contributor

Adds a zizmor audit of this repository's GitHub Actions workflows and Dependabot config, through the reusable owncloud/reusable-workflows/.github/workflows/zizmor.yml. It's part of an org-wide rollout (pilot: owncloud/notes#577, merged). Once the repo PRs have landed, Zizmor / Zizmor becomes a required check through owncloud/admin.

  • Behaviour: any finding, at any severity, fails the check, with an annotation on the offending line. The check runs on every PR, on pushes to the default branch and weekly.
  • Permissions: contents: read only, so it also works on fork PRs.
  • Config: owncloud/* references may stay on @main. Everything else must be SHA-pinned.

Existing findings fixed (separate commits)

  • excessive-permissions: this repository's default token is read/write. build-and-analyze and push-transifex now declare contents: read. generate-sbom dropped its workflow-level contents: write, because its GITHUB_TOKEN only reaches cdxgen's read-only license lookup and the PR is opened with the SBOM App token.
  • github-app: the four App tokens request only what their step needs: contents + pull-requests write for create-pull-request (SBOM, translations), and contents: write for the two verified-api-commit callers.
  • artipacked: checkouts do not persist credentials.
  • self-repository: the local verified-api-commit action is called as $/.github/actions/verified-api-commit instead of ./....

For the maintainers:

  • configuration-documentation and pull-ocis-icons mint their App token but never pass it to verified-api-commit (no github-token: input), so those commits are made with GITHUB_TOKEN under the job's contents: write. Wiring the App token in would change who authors the commit, and whether it triggers workflows, so it is left as is.
  • $/ for a step-level local action is not exercised by this PR's CI. Both workflows only run on pushes to fix/* / feature/* / release/*. The syntax is proven for reusable-workflow calls (reusable-workflows#104), and GitHub documents it for actions too. The first run on one of those branches will confirm it.

Not exercised by this PR's CI: generate-sbom, pull-transifex, push-transifex, configuration-documentation and pull-ocis-icons (push/dispatch only).

zizmor 1.31.1 reports no findings on this branch.

🤖 Generated with Claude Code

oc-tmueller and others added 3 commits October 26, 2026 14:33
Runs zizmor over this repository's workflows and Dependabot config on
every pull request, on pushes to the default branch and weekly, through
owncloud/reusable-workflows' zizmor.yml. Any finding fails the check.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Thomas Müller <323649642+oc-tmueller@users.noreply.github.com>
- excessive-permissions: build-and-analyze and push-transifex ran with
  the repository's read/write default token; both declare contents:
  read now. Neither uses the token beyond the checkout.
- github-app: the four App tokens request only what their step uses:
  contents: write for verified-api-commit's createCommitOnBranch,
  contents + pull-requests write for create-pull-request.
- artipacked: checkouts do not persist credentials.
- self-repository: the local verified-api-commit action is called as
  $/.github/actions/... instead of ./... .
- ref-version-mismatch: a checkout version comment lacked the v.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Thomas Müller <323649642+oc-tmueller@users.noreply.github.com>
…guarantees

- generate-sbom granted contents: write at workflow level, but its
  GITHUB_TOKEN only reaches cdxgen's read-only license lookup; the PR
  is opened with the SBOM App token. It is contents: read now.
- The zizmor caller comment no longer claims non-PR runs are never
  displaced: GitHub still replaces a queued run with a newer one.

Correction to the previous commit's message: configuration-documentation
and pull-ocis-icons mint their App token but never pass it to
verified-api-commit, which therefore commits with GITHUB_TOKEN under the
job's contents: write. The new permission-contents: write only limits
that unused token.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Thomas Müller <323649642+oc-tmueller@users.noreply.github.com>
@oc-tmueller
oc-tmueller requested a review from a team as a code owner October 26, 2026 13:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant