zizmor fixes - #86
Open
Loïc Minier (lool) wants to merge 2 commits into
Open
zizmor fixes#86Loïc Minier (lool) wants to merge 2 commits into
Loïc Minier (lool) wants to merge 2 commits into
Conversation
Deny all permissions at the workflow level and grant each job only what it uses. This always calls debusine.yml with release: false, so the release job — the only one requiring contents: write and deployments: write — is skipped; the jobs that run need only contents: read + packages: read. The local set-final-status job needs just statuses: write to report the Debusine CI result. This resolves zizmor's "overly broad permissions" findings for the contents and deployments scopes, and matches the per-job permissions pattern already used in debusine-daily.yml and debusine-release.yml. Fixes: #84 Assisted-by: Claude Code:claude-opus-4-8 Signed-off-by: Loïc Minier <loic.minier@oss.qualcomm.com>
The workflow_run trigger is intentional and required: the Debusine PR Hook runs in the untrusted pull_request context, which has no access to secrets on forks. The privileged CI work and commit-status updates must therefore run from this separate, trusted workflow. The head SHA is read from the trusted workflow_run payload rather than attacker-controlled PR data, and no job is granted write access to repository contents, so the usual workflow_run privilege-escalation risk does not apply. Add an inline zizmor ignore with rationale so this expected finding no longer fails the security check. Fixes: #84 Assisted-by: Claude Code:claude-opus-4-8 Signed-off-by: Loïc Minier <loic.minier@oss.qualcomm.com>
Contributor
|
Thanks! I have some testing I can do. |
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.
Fix zizmor issues reported in #84