ci: install safe-paths auto-merge#6
Conversation
Adds the safe-paths auto-merge caller from topcoder1/ci-workflows. PRs whose diff touches only docs/**, tests/**, test_*.py, *_test.*, *.test.*, *.spec.*, or **/__tests__/** get gh pr merge --auto --squash called automatically — any author. All-or-nothing: any one unsafe path defers to claude-author-automerge.yml or manual click. Branch protection's required-status-checks still apply. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
Auto-merge blocked — risk-tier paths touched. This Claude-authored PR modifies files matching the risk-tier patterns Matched files: |
| uses: topcoder1/ci-workflows/.github/workflows/safe-paths-automerge.yml@main | ||
| secrets: inherit |
There was a problem hiding this comment.
Supply-chain risk: floating @main ref + secrets: inherit
@main is a mutable pointer. If topcoder1/ci-workflows is ever compromised (or its main branch is force-pushed), this workflow silently changes behavior in this repo with no review gate — and because secrets: inherit passes all repository secrets, the attacker immediately has read access to every secret plus the contents: write / pull-requests: write permissions declared at the caller level.
Pin to a specific commit SHA instead:
| uses: topcoder1/ci-workflows/.github/workflows/safe-paths-automerge.yml@main | |
| secrets: inherit | |
| uses: topcoder1/ci-workflows/.github/workflows/safe-paths-automerge.yml@<SHA> | |
| secrets: inherit |
Update the SHA on each intentional upgrade. This is the standard mitigation for reusable-workflow supply-chain attacks and is enforced by GitHub's own security hardening guide (pin-actions / pin-reusable-workflows).
|
Flagged 1 issue inline: floating |
Adds the safe-paths auto-merge caller from
topcoder1/ci-workflows.What this enables:
docs/**,tests/**,test_*.py,*_test.*,*.test.*,*.spec.*,**/__tests__/**) getgh pr merge --auto --squashcalled automatically — any author.claude-author-automerge.ymlor manual click.Why this is safe:
Auto-merge rationale: workflow file → manual click-merge per CLAUDE.md. The whole point of the workflow being installed is to handle future docs/tests-only PRs — not this one.
🤖 Auto-installed via install-safe-paths-automerge.sh
Co-Authored-By: Claude Opus 4.7 (1M context) noreply@anthropic.com