Repository navigation
Description
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.gitfile 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.mdandsecurity-overview.mdto 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.
- 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_tokensand read-only permissions:contents: read,issues: read,pull_requests: read,metadata: read, pluschecks: readandactions: readif agents use them. Don't pass arepositoriesfilter, so the token keeps read access to every repository the installation covers.gh, API reads andgit clone/fetchof 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: writeandpull_requests: writewithoutcontents: write, if the orchestrate flow never needs to push; that's an open question for this issue.
- 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.
- Read-only git metadata, as direct goals already do. Mount the task worktree read-write, and
.gitplus the rest of/tmp/git-processorread-only, reusing theworkerOwnedGoalGitmount 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 rungit addorgit 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 viewandgh pr checkssucceed. - 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.mdandsecurity-overview.mddescribe 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
[-]Scope agent GitHub credentials and mounts to the task's repository[/-][+]Make agent GitHub access read-only while keeping cross-repo context[/+][-]Make agent GitHub access read-only while keeping cross-repo context[/-][+]Give implementation runs read-only GitHub access (goals unchanged)[/+][-]Give implementation runs read-only GitHub access (goals unchanged)[/-][+]Give implementation runs and direct goals a read-only GitHub token[/+]propr-dev commentedon Sep 30, 2026
🤖 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:
codexgpt-6-astra2658/gpt-6-astra-give-implementation-runs--20260930-2350-o7rmainissue-2658-20260930-2350-gpt-6-astra-o7r🔍 Track Task Execution
fix(ai): Resolve issue #2658 - Give implementation runs and direct go…