Skip to content

ci: add zizmor workflow audit - #328

Merged
LukasHirt merged 3 commits into
owncloud:mainfrom
oc-tmueller:ci/zizmor
Oct 26, 2026
Merged

LukasHirt merged 3 commits into
owncloud:mainfrom
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 (owncloud/reusable-workflows#104). It's part of an org-wide rollout. 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 main and weekly, because online audits such as known-vulnerable actions can start failing without a code change.
  • 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: ci.yml ran with the repository default, which is read/write. It now defaults to contents: read.
    • Only the docs job gets contents: write, for peaceiris/actions-gh-pages pushing the docs and docs-hugo branches.
    • COMPOSER_TOKEN (the GITHUB_TOKEN) only needs read.
    • Sonar uses SONAR_TOKEN. The build-ocis curl/git clone calls are unauthenticated.
  • artipacked: checkouts do not persist credentials. The gh-pages pushes authenticate through the action's github_token input.
  • ref-version-mismatch: setup-php's tag is 2.40.0, without a v.
  • cache-poisoning:
    • setup-go (cache: false) and setup-node (package-manager-cache: false) in build-ocis no longer cache.
    • The actions/cache steps for composer and the ocis binaries are suppressed inline: they only feed the tests, and the docs job publishes from source without them. zizmor's auto-fix would have set lookup-only: true, which never restores, so on a cache hit build-ocis would skip the build and upload no binaries. It was rejected.
  • adhoc-packages: suppressed inline, since pnpm is version-pinned (9.15.9).
  • dependabot-cooldown: composer updates wait 7 days.

Not exercised by this PR's CI: the gh-pages publish steps, which only run on pushes to main and tags.

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>
- dependabot-cooldown: composer updates wait 7 days, as github-actions
  already does elsewhere in the org.
- excessive-permissions: ci.yml ran with the repository default, which
  is read/write. It now defaults to contents: read; only the docs job
  gets contents: write, for peaceiris/actions-gh-pages pushing the docs
  and docs-hugo branches. COMPOSER_TOKEN only needs read.
- artipacked: checkouts do not persist credentials. The gh-pages
  pushes authenticate through the action's github_token input, not the
  checkout's credentials.
- ref-version-mismatch: setup-php's tag is 2.40.0, without the v.
- cache-poisoning: setup-go (cache: false) and setup-node
  (package-manager-cache: false) in build-ocis do not cache. The
  actions/cache steps for composer and the ocis binaries are suppressed
  inline: they only feed the tests, and the docs job publishes from
  source without them.
- adhoc-packages: suppressed inline, pnpm is version-pinned (9.15.9).
- ci.yml now ends with a newline.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Thomas Müller <323649642+oc-tmueller@users.noreply.github.com>
GitHub keeps one pending run per concurrency group whatever
cancel-in-progress says, so a queued push run can still be replaced by a
newer one; only the weekly run is fully protected by the per-event
group. Same wording as owncloud/reusable-workflows#105.

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:49
@kw-security

Copy link
Copy Markdown

✅ Snyk checks have passed. No issues have been found so far.

Status Scan Engine Critical High Medium Low Total (0)
✅ Code Security 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

@LukasHirt
LukasHirt merged commit 2e0955e into owncloud:main Oct 26, 2026
15 of 16 checks passed
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.

3 participants