SECURITY: builder agent holds the Forgejo admin PAT (3 channels) -> prompt-injected agent can exfiltrate ALL production secrets #16
Labels
No labels
bug
discussion
duplicate
enhancement
goal
help wanted
horizon:backlog
horizon:governance
horizon:mvp
invalid
operator-decision
question
roadmap
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
open-platform/mitosis#16
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Severity: high. The in-cluster builder agent runs Claude Code with --dangerously-skip-permissions and reads attacker-influenceable input (issue/PR text). It currently holds the Forgejo ADMIN PAT (PLAT_TOKEN, dispatcher.ts:54) through THREE channels (verified in agents/src/runner.ts):
Impact: with the admin token a prompt-injected agent can overwrite/read secrets, rewrite branch protection, and — worst — author a pull_request workflow that emits ${{ toJSON(secrets) }} to EXFILTRATE EVERY PRODUCTION SECRET (confirmed: _app-template/.forgejo/workflows/preview.yml runs on: pull_request and already consumes secrets.*; Forgejo populates secrets for same-repo non-fork PR workflows).
Fix (Phase 0 of the secret-scoping design #15 — must ship first):
One change (drop the agent admin; give it a scoped non-admin push credential) makes scope-in-Variables real, makes branch protection bind, and closes the exfil. Highest-value security fix on its own; blocks #15 Phase 1.