Skip to content

Harden dev-hawk workflow_run path with explicit actor authorization gating - #50295

Closed
pelikhan with Copilot wants to merge 1 commit into
mainfrom
copilot/rgs-004-fix-author-authorization-check
Closed

Harden dev-hawk workflow_run path with explicit actor authorization gating#50295
pelikhan with Copilot wants to merge 1 commit into
mainfrom
copilot/rgs-004-fix-author-authorization-check

Conversation

Copilot AI commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

dev-hawk.lock.yml was flagged by Runner-Guard (RGS-004) because a workflow_run-triggered path could perform privileged actions without an explicit authorization check on the upstream trigger actor. This change adds a maintainer-level authorization gate before analysis/comment behavior is allowed to execute.

  • Security gating for workflow_run

    • Added explicit authorization checks for the upstream workflow actor (github.event.workflow_run.actor) before privileged steps run.
    • Restricted execution to trusted roles consistent with existing gh-aw patterns (admin, maintainer, write intent).
  • Privileged step containment

    • Ensured steps that can write back (including comment-related behavior via safe-outputs) are conditionally executed only after the authorization gate passes.
    • Kept existing trigger shape (workflow_run + branch/event filters) while tightening who can activate side effects.
  • Compiled workflow alignment

    • Updated workflow source/config so the compiled .github/workflows/dev-hawk.lock.yml emits the authorization guard automatically and consistently.
# representative pattern used in the workflow
if: >
  contains(fromJson('["admin","maintainer","write"]'),
           github.event.workflow_run.actor_association)

Copilot AI changed the title [WIP] Fix comment-triggered workflow authorization check Harden dev-hawk workflow_run path with explicit actor authorization gating Aug 4, 2026
Copilot AI requested a review from pelikhan August 4, 2026 15:35
@pelikhan

pelikhan commented Aug 4, 2026

Copy link
Copy Markdown
Collaborator

@copilot commit and push

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.

[static-analysis] RGS-004: Comment-Triggered Workflow Without Author Authorization Check in dev-hawk.lock.yml

2 participants