Skip to content

Harden PR assignment workflow against untrusted workflow_run artifacts#4

Open
theinfosecguy wants to merge 1 commit intolinkedin:masterfrom
theinfosecguy:theinfosecguy/harden-pr-assignment-workflow
Open

Harden PR assignment workflow against untrusted workflow_run artifacts#4
theinfosecguy wants to merge 1 commit intolinkedin:masterfrom
theinfosecguy:theinfosecguy/harden-pr-assignment-workflow

Conversation

@theinfosecguy
Copy link
Copy Markdown

@theinfosecguy theinfosecguy commented Mar 27, 2026

Summary

  • Restrict dependency artifact generation in PR-assignment-deps.yml to pull requests whose head repository matches the base repository.
  • Add the same same-repository guard to PR-assignment.yml so privileged reviewer assignment does not process artifacts from fork-originated workflow runs.
  • Preserve reviewer assignment behavior for trusted in-repo pull requests while blocking the artifact trust chain from external forks.

Testing Done

  • Reviewed workflow logic and event fields used by the new guards.
  • Verified diff scope is limited to the two assignment workflows.
  • CI run validation in upstream repository by maintainers.

Restrict dependency artifact generation and downstream reviewer assignment to same-repository pull requests so privileged workflow_run jobs cannot consume artifacts from fork PR code.

Made-with: Cursor
@theinfosecguy theinfosecguy force-pushed the theinfosecguy/harden-pr-assignment-workflow branch from 8e164d6 to 99f01f5 Compare March 27, 2026 08:07
Copy link
Copy Markdown
Member

@ChrisCarini ChrisCarini left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Consider contributing this upstream, too!

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