Skip to content

Restrict retro agent target_repo to known-valid destinations #978

@ralphbean

Description

@ralphbean

What happens

The retro agent's post-retro.sh accepts any target_repo value from agent output as long as it matches the owner/repo regex format. There's no validation that the target is a repo the agent should be filing in. If the agent hallucinates or is prompt-injected, it could file issues in any repo the token has access to within the org.

The token scoping (org-bounded) limits blast radius, but within the org the agent has unsupervised control over where issues land.

What should happen

target_repo should be validated against a closed set of known-valid destinations:

  1. The source repo — the repo whose PR triggered the retro
  2. The org's .fullsend repo — for org-level configuration improvements
  3. fullsend-ai/fullsend — for upstream platform improvements (pending cross-org authorization from Retro agent post-script needs cross-org issue filing with authorization #672)

Any other target_repo value should be rejected by the post-script before attempting gh issue create.

Context

Split out from #672, which is now focused on the cross-org authorization mechanism. This issue covers the complementary concern: even within authorized orgs, the agent shouldn't have free rein over which repos it targets.

Related: #672, #833

Metadata

Metadata

Assignees

No one assigned

    Labels

    agent/retroRetro agentsecuritySecurity threat model and related concernstriaged

    Type

    No type

    Projects

    Status

    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions