Skip to content

ci: add zizmor workflow audit - #5036

Merged
jesmrec merged 3 commits into
owncloud:masterfrom
oc-tmueller:ci/zizmor
Oct 27, 2026
Merged

jesmrec merged 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 (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 master 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)

  • template-injection: build-apk passes the build_variant input to its scripts through env: instead of expanding it into the script text.
  • github-app: the SBOM App token requests only contents: write + pull-requests: write, which peter-evans/create-pull-request (with sign-commits) needs. It no longer inherits every permission of the installation. This flow already pushes the branch and opens the PR with that token today, so the installation should grant both. The token step only runs when the SBOM changes, though, so this PR's CI doesn't exercise it.
  • excessive-permissions (found in review): the SBOM workflow's GITHUB_TOKEN drops from contents: write to contents: read. Everything that writes uses the App token, and the job runs third-party Gradle plugins.
  • artipacked: checkouts do not persist credentials. No job runs an authenticated git operation after checkout.
  • dependabot-cooldown: gradle updates wait 7 days, as github-actions already does.

Noticed but not changed: on a workflow_dispatch run of the SBOM workflow from a branch other than master, the compare step's origin/master:sbom.json fallback can't resolve in the shallow checkout.

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:39
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>
- template-injection: build-apk passes the build_variant input to its
  scripts through env: instead of expanding it into the script text.
- github-app: the SBOM App token requests only contents and
  pull-requests write, which peter-evans/create-pull-request needs to
  push the signed branch and open the PR, instead of inheriting every
  permission of the installation.
- artipacked: checkouts do not persist credentials. No job runs an
  authenticated git operation after checkout; the SBOM PR is pushed by
  create-pull-request with the App token.
- dependabot-cooldown: gradle updates wait 7 days, as github-actions
  already does.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Thomas Müller <323649642+oc-tmueller@users.noreply.github.com>
The SBOM branch and PR are pushed and opened with the App token, and the
remaining git calls are anonymous reads of this public repository, so the
GITHUB_TOKEN no longer needs write access. The job runs third-party
Gradle plugins, which could otherwise use it to push.

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:41
@jesmrec
jesmrec merged commit e2cbe7a into owncloud:master Oct 27, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants