Skip to content

zizmor fixes - #86

Open
Loïc Minier (lool) wants to merge 2 commits into
mainfrom
zizmor-fixes
Open

Loïc Minier (lool) wants to merge 2 commits into
mainfrom
zizmor-fixes

Conversation

@lool

Copy link
Copy Markdown
Contributor

Fix zizmor issues reported in #84

  • Scope debusine-pr-check.yml permissions per job
  • Suppress zizmor dangerous-triggers in workflow_run

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>
@basak-qcom

Copy link
Copy Markdown
Contributor

Thanks! I have some testing I can do.

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.

2 participants