Skip to content

Give implementation runs and direct goals a read-only GitHub token #2658

Closed

Description

@integry

Problem

How much GitHub and git access an agent container gets depends on the run type (code on main):

Run type GitHub token in container .git / /tmp/git-processor mount
Goal, direct strategy (workerOwnedGoalGit) none read-only
Goal, orchestrate strategy installation token (write) read-write
Implementation / follow-up / review fix installation token (write) read-write
  • Where it's set: dockerArgsBuilder.ts:143-150 (Claude), codexDockerArgsBuilder.ts:165-194, antigravityDockerArgsBuilder.ts:53-66, openCodeUtils.ts:132-134.
  • Direct goals are locked down, but too far. ProPR owns every commit and push there, which is right. They also get no token, so they can't read issues, PRs or related repositories for context.
  • Orchestrate goals legitimately need write access. The agent creates GitHub issues and epic PRs itself (goals.ts:70-71, 104).
  • Normal implementation runs have no such need, yet they get both. They receive a token with every installation permission, plus a read-write mount of every repository's clone, including the .git/worktrees/<name> metadata the worktree's .git file points to. "The agent doesn't push" is therefore an instruction rather than a boundary: git push https://x-access-token:[email protected]/... works, and so do API writes (merge, label, comment) on any repository in the installation.
  • Docs: the 0.9.0 docs sweep (docs: accuracy sweep against current code #2655) updated execution-safety.md and security-overview.md to describe this. The fix belongs in the product.

OpenAI's Symphony treats tracker credentials differently. It strips tracker tokens from the agent's environment and exposes tracker operations as tools that run on the host with the real credential, so the agent receives results and never the token.

Proposal

Cross-repository reads are useful and stay: agents look up related repositories, shared libraries and sibling services for context. The risk is write access (push, merge, issue and PR mutation) and write access to other repositories' working copies. Keep the reach and remove the write capability.

  1. Read-only token for implementation runs and direct goals. Implementation, follow-up and review-fix runs, and direct-strategy goals, get a token minted with POST /app/installations/{id}/access_tokens and read-only permissions: contents: read, issues: read, pull_requests: read, metadata: read, plus checks: read and actions: read if agents use them. Don't pass a repositories filter, so the token keeps read access to every repository the installation covers.
    • gh, API reads and git clone/fetch of related repositories keep working.
    • Push, merge, labeling and commenting are refused.
    • ProPR's own git and GitHub operations keep using the full installation token on the worker side.
    • Direct goals gain this token. Today they get none. They keep their read-only git mounts, so ProPR still owns every commit and push.
    • Orchestrate goals keep write access, because they create issues and epic PRs. Consider narrowing orchestrate goals to issues: write and pull_requests: write without contents: write, if the orchestrate flow never needs to push; that's an open question for this issue.
  2. Optional per-repository narrowing. A repository setting such as "Context repositories: all / listed / none" lets sensitive installations restrict agent reads to the task repository plus an explicit list. This aligns with the planner's existing supporting-repository concept. The default stays "all", which matches today's read reach.
  3. Read-only git metadata, as direct goals already do. Mount the task worktree read-write, and .git plus the rest of /tmp/git-processor read-only, reusing the workerOwnedGoalGit mount path for implementation runs. The agent edits files, and ProPR stages, commits and pushes on the worker side. Confirm that nothing in the implementation flow expects the agent to run git add or git commit. Agents can still read local clones of related repositories, but can't modify git state or other repositories' working copies. Apply this to every agent adapter.

Acceptance criteria

  • A token taken from any implementation container can read other repositories in the installation (gh repo view, gh api, git clone). Every write is refused: push, PR merge, label change and comment. Enforce this with an integration test.
  • With "Context repositories" set to a list, reads outside the task repository and that list are refused.
  • Other repositories' clones are visible read-only inside the container; writes to them fail.
  • Implementation, follow-up and review runs still work for all five agents; gh issue view, gh pr view and gh pr checks succeed.
  • Direct goals can read issues, PRs and related repositories with the read-only token, and still can't push; their git mounts stay read-only. Orchestrate goals can still create issues and epic PRs.
  • execution-safety.md and security-overview.md describe the new boundary. The site's trust page claims ("ProPR makes every branch, commit, push…", "the main checkout stays untouched") become true.

Out of scope

The optional allowlist firewall. It allows only api.anthropic.com for model traffic, so enabling it breaks the other agents; that needs its own issue.

Activity

  1. changed the title [-]Scope agent GitHub credentials and mounts to the task's repository[/-] [+]Make agent GitHub access read-only while keeping cross-repo context[/+] on Sep 30, 2026
  2. changed the title [-]Make agent GitHub access read-only while keeping cross-repo context[/-] [+]Give implementation runs read-only GitHub access (goals unchanged)[/+] on Sep 30, 2026
  3. changed the title [-]Give implementation runs read-only GitHub access (goals unchanged)[/-] [+]Give implementation runs and direct goals a read-only GitHub token[/+] on Sep 30, 2026
  4. propr-dev commented on Sep 30, 2026

    @propr-dev
    Contributor

    🤖 AI processing has started for this issue using codex agent with gpt-6-astra model.

    I'll analyze the problem and work on a solution. This may take a few minutes.

    Processing Details:

    • Agent: codex
    • Model: gpt-6-astra
    • Branch: 2658/gpt-6-astra-give-implementation-runs--20260930-2350-o7r
    • Base Branch: main
    • Worktree: issue-2658-20260930-2350-gpt-6-astra-o7r

    🔍 Track Task Execution

  5. added a commit that references this issue on Oct 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions