fix(ci): use version-bot GitHub App to bypass platform ruleset on submodule bump#504
Conversation
The platform repo is now governed by the failproofai-rules ruleset (PR + 1 review required), which rejects direct pushes to main with GH013. Following the same pattern as agenteye's release-agent.yml advance job, this change: - Mints a version-bot GitHub App token (bypass actor on the ruleset) - Checks out with the app token so git push inherits bypass credentials - Configures the git identity as agenteye-bot (matching agenteye's convention) - Removes the manual http.extraheader PLA...EN auth (no longer needed) The VERSION_BOT_APP_ID and VERSION_BOT_PRIVATE_KEY secrets must be present in this repo — the platform repo also needs the version-bot App installed with contents:write.
📝 WalkthroughWalkthroughThe platform submodule bump workflow now mints a version-bot GitHub App token, uses it during checkout, changes the git author, and performs plain push and fetch commands in its retry loop. ChangesPlatform submodule bump authentication
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
Suggested reviewers: Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
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. Comment |
|
🔍 Automated code review started — analyzing [{"additions":22,"deletions":17,"path":".github/workflows/bump-platform-submodule.yml"}] files, +22/-17... ⏱️ This may take a few minutes. Results will be posted here when complete. |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
.github/workflows/bump-platform-submodule.yml (1)
31-34: 🔒 Security & Privacy | 🔵 Trivial | ⚡ Quick winApply least-privilege scoping to the GitHub App token.
By default, the minted token inherits the blanket permissions and repository access of the App installation. To improve security, restrict the token to only the target repository.
🔒️ Proposed fix to restrict token scope
- name: Mint version-bot app token id: app-token uses: actions/create-github-app-token@v2 with: app-id: ${{ secrets.VERSION_BOT_APP_ID }} private-key: ${{ secrets.VERSION_BOT_PRIVATE_KEY }} + owner: FailproofAI + repositories: platform🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In @.github/workflows/bump-platform-submodule.yml around lines 31 - 34, Update the create-github-app-token step to restrict the minted token to the target repository using the action’s repository-scoping input, while preserving the existing VERSION_BOT_APP_ID and VERSION_BOT_PRIVATE_KEY credentials.Source: Linters/SAST tools
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In @.github/workflows/bump-platform-submodule.yml:
- Around line 31-34: Update the create-github-app-token step to restrict the
minted token to the target repository using the action’s repository-scoping
input, while preserving the existing VERSION_BOT_APP_ID and
VERSION_BOT_PRIVATE_KEY credentials.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 72de39a1-79a0-426e-b5c9-12938584bc48
📒 Files selected for processing (1)
.github/workflows/bump-platform-submodule.yml
🔍 Automated Code Review📋 Executive SummaryThis PR migrates 📊 Change Architecturegraph TD
A["push to failproofai/main"] --> B["Mint version-bot app token<br/>(NEW step)"]
B -->|"token scoped to CURRENT repo only<br/>❌ missing owner/repositories"| C["Checkout FailproofAI/platform<br/>token = app-token<br/>persist-credentials (default)"]
C -->|"persisted creds → git push"| D["Bump gitlink + race-safe push loop"]
D --> E["FailproofAI/platform main"]
R["failproofai-rules ruleset<br/>(PR + 1 review)"] -.->|"bypass actor = version-bot App"| E
style B fill:#90EE90
style C fill:#87CEEB
style D fill:#87CEEB
style B stroke:#d00,stroke-width:3px
Legend: 🟢 New | 🔵 Modified | 🔴 outline = blocking defect 🔴 Breaking Changes
|
Problem
The
bump-platform-submoduleworkflow pushes submodule pointer bumps directly toFailproofAI/platformmain. Since the platform repo is now governed by thefailproofai-rulesruleset (PR + 1 review required), direct pushes are rejected with:Solution
Modeled after the agenteye
release-agent.ymladvancejob — mint a version-bot GitHub App token and push with it. The version-bot App is a bypass actor on thefailproofai-rulesruleset, so its pushes to main are accepted.Changes
Mint version-bot app tokenusingactions/create-github-app-token@v2withVERSION_BOT_APP_ID/VERSION_BOT_PRIVATE_KEYsecretstokenso subsequentgit pushcommands inherit bypass credentials (no morepersist-credentials: false)http.extraheaderauth plumbing — the app token from checkout handles itagenteye-botinstead ofgithub-actions[bot](consistent with agenteye's convention)Pre-merge checklist
VERSION_BOT_APP_IDandVERSION_BOT_PRIVATE_KEYsecrets exist in the FailproofAI/failproofai repoFailproofAI/platformwithcontents: writepermissionfailproofai-rulesruleset in the platform repoSummary by CodeRabbit