Skip to content

ci: install safe-paths auto-merge#6

Merged
topcoder1 merged 1 commit into
mainfrom
ci/install-safe-paths-automerge-1777778894
May 3, 2026
Merged

ci: install safe-paths auto-merge#6
topcoder1 merged 1 commit into
mainfrom
ci/install-safe-paths-automerge-1777778894

Conversation

@topcoder1
Copy link
Copy Markdown
Owner

Adds the safe-paths auto-merge caller from topcoder1/ci-workflows.

What this enables:

  • PRs whose diff touches only safe paths (docs/**, tests/**, test_*.py, *_test.*, *.test.*, *.spec.*, **/__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 still applies — required checks must pass before auto-merge fires.

Why this is safe:

  • Docs have zero runtime impact.
  • Tests cannot break runtime (failing tests do not ship; passing tests do not change behavior).
  • Maintainers click-merging typo fixes and test additions is alarm-fatigue-by-design — the path classification IS the safety argument.

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

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>
@topcoder1 topcoder1 enabled auto-merge (squash) May 3, 2026 03:28
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 3, 2026

Auto-merge blocked — risk-tier paths touched.

This Claude-authored PR modifies files matching the risk-tier patterns
defined in the global CLAUDE.md policy (auth / secrets / migrations /
billing / production infra). Manual click-merge required.

Matched files:

.github/workflows/safe-paths-automerge.yml (matched: ^\.github/workflows/.*)```

Override only after review: add the `auto-merge` label. The risk-tier check
still runs — override does not bypass it. If a path is misclassified, fix it
in `topcoder1/ci-workflows/.github/workflows/claude-author-automerge.yml`.

Comment on lines +27 to +28
uses: topcoder1/ci-workflows/.github/workflows/safe-paths-automerge.yml@main
secrets: inherit
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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:

Suggested change
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).

@claude
Copy link
Copy Markdown

claude Bot commented May 3, 2026

Flagged 1 issue inline: floating @main ref combined with secrets: inherit is a supply-chain risk — pin the reusable workflow call to a commit SHA.

@topcoder1 topcoder1 merged commit e583ec0 into main May 3, 2026
7 checks passed
@topcoder1 topcoder1 deleted the ci/install-safe-paths-automerge-1777778894 branch May 3, 2026 03:29
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