Repository navigation
ci: add zizmor workflow audit - #89
Open
oc-tmueller wants to merge 2 commits into
Open
oc-tmueller wants to merge 2 commits into
oc-tmueller wants to merge 2 commits into
Conversation
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>
- github-app: each codesign-bot App token requests only what its binary uses, instead of inheriting every permission of the installation: issuer and revoker read/close/comment on/label request issues and write the ledger (contents + issues write); privrevoke only reads and writes the ledger, and crlgen the CRL (contents write). The issuer's org-wide owner: scope stays, suppressed inline: target app repos are only known at runtime (issue #35). - dangerous-triggers: crl's workflow_run trigger is suppressed inline. It re-runs main's own crlgen after a revocation and reads no artifact, ref or input from the triggering run. - artipacked: checkouts do not persist credentials. Nothing runs git after checkout; ledger and CRL writes go through the Contents API. - dependabot-cooldown: gomod 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>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 / Zizmorbecomes a required check through owncloud/admin.mainand weekly, because online audits such as known-vulnerable actions can start failing without a code change.contents: readonly, so it also works on fork PRs.owncloud/*references may stay on@main. Everything else must be SHA-pinned.Existing findings fixed (separate commits)
internal/ghclient/rest,internal/enroll,internal/revoke,cmd/*). Before, each inherited every permission of the installation.issuerandrevoker:contents: write+issues: write. They list, comment on, label and close request issues, and write the ledger through the Contents API.privrevoke:contents: write, for the ledger only.crlgen:contents: write, for the CRL only.GET /repos/{r}) needs onlymetadata: read, which every scoped App token gets automatically.owner:), suppressed inline: the issuer token stays org-wide because the target app repos are only known at runtime ([cert] files_classifier #35).workflow_runre-runsmain's own crlgen after a revocation and reads no artifact, ref or input from the triggering run.gitafter checkout. Ledger and CRL writes go through the Contents API, andgo runneeds only public modules.The App-token steps only run on the schedule, issue events or dispatch, so this PR's CI doesn't exercise them. Every requested permission is one the bots already use today.
For the maintainers (pre-existing, not changed here)
contents: write+issues: writeon every repo the App is installed on. It is handed to a bot that parses issue bodies. Two tokens would bound that: a repo-scoped one with write on this repo, and an owner-scoped one with onlypermission-contents: readfor target-repo reads. That split needs a change incmd/issuer.mainholds about 7.7k "chore: regenerate crl/developers.crl" commits. Gating on an actual ledger change would cut the Vault signing operations and commits. So would droppingworkflow_runand regenerating inline after a revocation.workflow_runhas nobranches: [main]filter. A privileged-revocation dispatched from a feature branch therefore also triggers a production CRL publish.zizmor 1.31.1 reports no findings on this branch.
🤖 Generated with Claude Code