Skip to content

feat(ci): auto-merge release-please + dependabot PRs, supply-chain hardening#25

Merged
amacsmith merged 2 commits into
mainfrom
ci/auto-merge-bots
May 11, 2026
Merged

feat(ci): auto-merge release-please + dependabot PRs, supply-chain hardening#25
amacsmith merged 2 commits into
mainfrom
ci/auto-merge-bots

Conversation

@amacsmith
Copy link
Copy Markdown
Member

@amacsmith amacsmith commented May 11, 2026

Summary

  • Adds two pull_request_target workflows that auto-approve + squash-merge mechanical PRs once required checks pass: release-please Release PRs (component version bumps + changelog) and Dependabot patch / minor bumps. Major Dependabot bumps stay open with a poke comment.
  • Pins every action in .github/workflows/ to a commit SHA with a # pin: vX.Y.Z follow-on comment (was @vN on most). Includes the new and existing workflows. No more floating tag references.
  • Adds an OIDC trusted-publishing step to publish-pysdk.yml ahead of the legacy PYPI_API_TOKEN fallback, plus a docs page (docs/ops/pypi-trusted-publishing.md) describing the one-time PyPI-side setup so the maintainer can flip the switch and remove the token.
  • Adds gitleaks.yml (diff-focused secret scan) and a weekly outdated-watch.yml cron that posts (or upserts) a tracking issue when any package is at least one minor version behind across root / cli / mcp / python-sdk.
  • Extends CONTRIBUTING.md with the Conventional Commits prefix table that drives release-please.
  • Extends docs/ops/release-process.md with the new auto-merge flow, Dependabot rules, outdated-watch behaviour, and a pointer to the trusted-publishing setup doc.
  • Tag-protection ruleset created out-of-band via the rulesets API: blocks creation / deletion / non-fast-forward of refs/tags/{cli,mcp,pysdk}-v* and refs/tags/v* to anyone but admins. Existing release-please and admin workflows keep bypass.

Test plan

  • for f in .github/workflows/*.yml; do python3 -c "import yaml; yaml.safe_load(open('$f'))"; done -> ALL_YAML_OK
  • node --test scripts/__tests__/*.test.mjs -> 140 pass, 0 fail
  • grep -rnE 'uses: [^@]+@v[0-9]' .github/workflows/ -> no matches (every action pinned)
  • First post-merge release-please PR auto-merges once required checks pass.
  • First Dependabot patch / minor PR auto-merges once required checks pass.
  • outdated-watch Monday run posts (or no-ops) cleanly.
  • gitleaks runs on PRs without false positives blocking development.
  • (Maintainer action) Provision the PyPI Trusted Publisher per docs/ops/pypi-trusted-publishing.md, confirm the OIDC step succeeds on the next pysdk-v* release, then remove the token fallback + PYPI_API_TOKEN secret.

Anything that needs maintainer action

  • PyPI Trusted Publishing (one webform; details in docs/ops/pypi-trusted-publishing.md). The current workflow gracefully falls back to the existing token, so this can land before the PyPI side is configured.
  • Branch protection still gates merges (validate, smoke / chromium, smoke / webkit-iphone, Analyze (javascript-typescript)). The two auto-merge workflows re-check those same names as defense-in-depth.

Summary by CodeRabbit

  • New Features

    • Gitleaks secret scanning workflow added to pull requests
    • Auto-merge workflows for Dependabot and release-please PRs
    • Outdated dependency watcher for multi-ecosystem monitoring
    • PyPI Trusted Publishing (OIDC) support for Python SDK
  • Documentation

    • Added commit message conventions guide for automated releases
    • Expanded release process documentation with automation details
    • Added PyPI Trusted Publishing setup guide

Review Change Stack

…, OIDC trusted-publishing docs

Adds end-to-end automation so patch / minor releases and dependency
bumps land without manual intervention, and hardens the supply chain
along the way.

New workflows:
- auto-merge-release-please.yml: waits for required checks on the PR
  head sha, auto-approves, enables squash auto-merge. release-please
  PRs are mechanical bookkeeping; this removes the human handoff.
- auto-merge-dependabot.yml: uses dependabot/fetch-metadata@v2 (SHA-
  pinned) to identify the update-type and auto-merges patch / minor
  bumps. Major bumps get a comment and stay open for review.
- outdated-watch.yml: weekly cron that opens or updates a single
  tracking issue listing any package >= 1 minor behind across root /
  cli / mcp / python-sdk. Patch drift is filtered out (Dependabot
  handles it).
- gitleaks.yml: diff-focused secret scan on every PR + push to main.
  OSS action, no license, complements existing Socket Security check.

Supply-chain hardening:
- SHA-pinned every actions/* and third-party action across all 19
  workflows (was @vn on most). Each pin carries a "# pin: vX.Y.Z"
  comment so manual bumps are easy.
- publish-pysdk.yml gains a PyPI Trusted Publishing (OIDC) step ahead
  of the legacy PYPI_API_TOKEN fallback. Documented setup in
  docs/ops/pypi-trusted-publishing.md so the maintainer can flip the
  PyPI-side switch and remove the token entirely.

Docs:
- CONTRIBUTING.md: Conventional Commits prefix table + examples.
- docs/ops/release-process.md: extended with the new auto-merge flow,
  Dependabot rules, outdated-watch behaviour, and a pointer to the
  trusted-publishing setup doc.

Out-of-tree changes already applied:
- Tag-protection ruleset created via the rulesets API restricting
  creation / deletion / non-fast-forward on refs/tags/cli-v*,
  mcp-v*, pysdk-v*, and v* (release tag pattern). Admins keep bypass.

All workflows lint-pass yaml.safe_load. All 140 unit tests pass.
Copilot AI review requested due to automatic review settings May 11, 2026 09:33
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 11, 2026

Warning

Rate limit exceeded

@amacsmith has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 55 minutes and 30 seconds before requesting another review.

You’ve run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: e2983212-7161-4a9c-a145-2dcde41d76fa

📥 Commits

Reviewing files that changed from the base of the PR and between 35a0488 and 9079c49.

📒 Files selected for processing (1)
  • .github/workflows/secret-scan.yml
📝 Walkthrough

Walkthrough

This PR hardens the CI/CD pipeline by pinning GitHub Actions to specific commit SHAs across 14 workflows, adds four new workflows for release automation and monitoring (auto-merge-dependabot, auto-merge-release-please, gitleaks, outdated-watch), migrates PyPI publishing to OIDC trusted authentication, and documents commit conventions and operational procedures.

Changes

Security & Release Automation Infrastructure

Layer / File(s) Summary
Commit Conventions & Release Docs
CONTRIBUTING.md, docs/ops/release-process.md
Documentation establishes Conventional Commits rules for release-please, describes auto-merge bot behavior, dependency monitoring, and PyPI trusted publishing in the operational release workflow.
Release PR Auto-Merge Bots
.github/workflows/auto-merge-release-please.yml, .github/workflows/auto-merge-dependabot.yml
Two new workflows auto-merge release-please and Dependabot PRs after status checks pass. Release-please merges all PRs; Dependabot skips semver-major updates and posts comments indicating human review required for majors.
Dependency Monitoring & Outdated-Watch
.github/workflows/outdated-watch.yml, docs/ops/release-process.md
New weekly workflow collects outdated packages from npm workspaces (root, cli, mcp) and Python SDK, filters to entries at least one minor version behind (patch drift excluded), and creates/updates a GitHub issue for review.
Secret Scanning with Gitleaks
.github/workflows/gitleaks.yml
New workflow scans pull requests and main-branch pushes for exposed secrets using gitleaks-action, with full-history checkout and summary output.
PyPI Trusted Publishing (OIDC)
.github/workflows/publish-pysdk.yml, docs/ops/pypi-trusted-publishing.md, docs/ops/release-process.md
publish-pysdk migrates to OIDC-based PyPI authentication with token fallback; workflow gains id-token: write permission and two-step publish (OIDC preferred, token fallback on failure). New doc explains PyPI setup and OIDC verification; release-process doc notes the transition.
GitHub Actions Version Pinning
.github/workflows/add-from-issue.yml, .github/workflows/audit.yml, .github/workflows/auto-merge.yml, .github/workflows/codeql.yml, .github/workflows/docs-on-release.yml, .github/workflows/node-matrix.yml, .github/workflows/pages.yml, .github/workflows/publish-cli.yml, .github/workflows/publish-mcp.yml, .github/workflows/release-please.yml, .github/workflows/render.yml, .github/workflows/smoke.yml, .github/workflows/sync.yml, .github/workflows/validate.yml
All workflows pin actions/checkout, actions/setup-node, actions/setup-python, actions/upload-artifact, github/codeql-action/*, googleapis/release-please-action, and softprops/action-gh-release to fixed commit SHAs, removing floating major-version tags (@v4, @v5, @v6, @v7) across 14 workflows.

🎯 4 (Complex) | ⏱️ ~45 minutes

🐰 A brave bunny hops through the CI/CD warren,
Pinning each action down (no more version erring!),
Secrets now guarded by gitleaks' keen sight,
PyPI trusts tokens no more—OIDC's might!
Release bots auto-merge with watchful precision,
The pipeline's secure with this thoughtful decision. 🔐

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main changes: auto-merge automation for release-please and dependabot PRs, and supply-chain hardening through SHA-pinning of GitHub Actions.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch ci/auto-merge-bots

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

…a paid license for org-owned repos

The OSS gitleaks-action exits with `missing gitleaks license` when run
in an org-owned repo (per the action's recent breaking change). The
constraint here is free-tier compatibility, so swap to trufflesecurity/
trufflehog — same diff-focused secret-scan use case, no license check.

Renamed the workflow file gitleaks.yml -> secret-scan.yml so the name
no longer implies the underlying tool.
@amacsmith amacsmith force-pushed the ci/auto-merge-bots branch from 5eba05d to 9079c49 Compare May 11, 2026 09:35
@amacsmith amacsmith merged commit 66a287b into main May 11, 2026
12 of 14 checks passed
@amacsmith amacsmith deleted the ci/auto-merge-bots branch May 11, 2026 09:36
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR hardens and automates the repository’s release/dependency maintenance pipeline by (a) adding bot PR auto-merge workflows, (b) pinning all GitHub Actions to SHAs, and (c) improving supply-chain and publishing security (PyPI OIDC + secret scanning + outdated dependency tracking), with accompanying ops/docs updates.

Changes:

  • Add pull_request_target workflows to auto-approve + squash-auto-merge release-please PRs and Dependabot patch/minor PRs (major bumps get a reminder comment).
  • Pin GitHub Actions across .github/workflows/ to commit SHAs and introduce gitleaks.yml plus outdated-watch.yml.
  • Add PyPI Trusted Publishing (OIDC) preferred-path in publish-pysdk.yml with documentation, and expand contributor/release-process docs.

Reviewed changes

Copilot reviewed 22 out of 22 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
docs/ops/release-process.md Documents auto-merge behavior, Dependabot policy, outdated-watch, and PyPI trusted publishing flow.
docs/ops/pypi-trusted-publishing.md New guide for one-time PyPI Trusted Publisher setup and token fallback removal.
CONTRIBUTING.md Adds Conventional Commits guidance aligned with release-please usage.
.github/workflows/validate.yml Pins checkout/setup-node actions to SHAs.
.github/workflows/sync.yml Pins checkout/setup-node actions to SHAs.
.github/workflows/smoke.yml Pins checkout/setup-node/upload-artifact actions to SHAs.
.github/workflows/render.yml Pins checkout/setup-node actions to SHAs.
.github/workflows/release-please.yml Pins release-please action to a SHA.
.github/workflows/publish-pysdk.yml Adds OIDC trusted publishing step + token fallback; pins actions to SHAs.
.github/workflows/publish-mcp.yml Pins checkout/setup-node actions to SHAs.
.github/workflows/publish-cli.yml Pins checkout/setup-node actions to SHAs.
.github/workflows/pages.yml Pins checkout/upload-pages-artifact/deploy-pages actions to SHAs.
.github/workflows/outdated-watch.yml New weekly workflow to open/update an “outdated deps” tracking issue.
.github/workflows/node-matrix.yml Pins checkout/setup-node actions to SHAs.
.github/workflows/gitleaks.yml New secret-scanning workflow (diff-focused on PRs).
.github/workflows/docs-on-release.yml Pins checkout/setup-node actions to SHAs.
.github/workflows/codeql.yml Pins checkout/codeql actions to SHAs.
.github/workflows/auto-merge.yml Pins checkout action to a SHA.
.github/workflows/auto-merge-release-please.yml New workflow to auto-approve + enable squash auto-merge for release-please PRs.
.github/workflows/auto-merge-dependabot.yml New workflow to auto-approve + enable squash auto-merge for Dependabot patch/minor PRs.
.github/workflows/audit.yml Pins checkout/setup-node actions to SHAs.
.github/workflows/add-from-issue.yml Pins checkout/setup-node actions to SHAs.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.


permissions:
contents: read
pull-requests: write
Comment on lines +61 to +66
# The four required checks (validate is a check-run, smoke has
# two matrix jobs, codeql is the security analysis). If any of
# these is still pending after the timeout we exit non-zero so
# the workflow re-runs on the next sync event.
required=("validate" "smoke / chromium" "smoke / webkit-iphone" "Analyze (javascript-typescript)")
deadline=$(( $(date +%s) + 15 * 60 ))
pull_request_target:
types: [opened, reopened, synchronize, labeled, ready_for_review]

permissions:
Comment on lines +44 to +46
required status checks (`validate`, `smoke / chromium`,
`smoke / webkit-iphone`, `Analyze (javascript-typescript)`) to land
green, then auto-approves the PR and enables **squash auto-merge**.
Comment on lines +3 to +7
# Nightly nudge for transitively-outdated deps that Dependabot's grouping
# might paper over. Posts (or updates) a single tracking issue summarising
# what's behind in each of the four package manifests. Fail-soft: a
# network blip or empty `npm outdated` result is not a failure, just a
# no-op run.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants