Skip to content

security: harden external PR replay workflow with actor gate and pre-scan (#144)#170

Merged
Daliys merged 2 commits into
developmentfrom
daliys/issue-144-external-pr-replay-gate
Jul 22, 2026
Merged

security: harden external PR replay workflow with actor gate and pre-scan (#144)#170
Daliys merged 2 commits into
developmentfrom
daliys/issue-144-external-pr-replay-gate

Conversation

@Daliys

@Daliys Daliys commented Jul 22, 2026

Copy link
Copy Markdown
Member

Summary

Hardens the external PR replay workflow (approve-external-pr.yml) by introducing in-workflow actor authorization checks and a PR content security pre-scan to prevent unauthorized execution and flag critical CI modifications on self-hosted runners.

Fixes #144

Changes

  • Added maintainer authorization check (Verify maintainer authorization) in approve-external-pr.yml to verify actor permissions against @Daliys or admin/write collaborator status.
  • Added PR content security pre-scan (Run security pre-scan on PR files) in approve-external-pr.yml to inspect modified files and alert maintainers if critical CI files (.github/workflows/*, .githooks/*, scripts/*) are touched.
  • Updated CHANGELOG.md under [Unreleased] / Security.

Validation

  • PYTHONDONTWRITEBYTECODE=1 scripts/prepush-validate.sh --static-only passed.

The content pre-scan added in #144 only logged a warning, so a fork PR
editing .github/workflows/*, .githooks/*, or scripts/* still got force-
pushed into a trusted branch and executed on the self-hosted runner
unattended. Make it a required checkpoint: fail the job unless the
maintainer explicitly re-runs with acknowledge_critical_files: true
after reviewing the diff. Also fix word-splitting on filenames in the
scan loop.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@Daliys
Daliys merged commit d7915e0 into development Jul 22, 2026
6 checks passed
@Daliys
Daliys deleted the daliys/issue-144-external-pr-replay-gate branch July 22, 2026 23:42
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.

1 participant