fix(policies): allow POST /graphql in agent sandbox policies - #173
Conversation
|
🤖 Review · Started 9:07 AM UTC |
PR Summary by QodoAllow POST /graphql for gh CLI in retro/review sandbox network policies
AI Description
Diagram
High-Level Assessment
Files changed (2)
|
f56acb2 to
80b3885
Compare
Code Review by Qodo
Context used✅ Compliance rules (platform):
55 rules 1. Protected policies/ files modified
|
|
🤖 Finished Review · ✅ Success · Started 9:12 AM UTC · Completed 9:22 AM UTC |
80b3885 to
bf4dfb1
Compare
Review — commentSummaryThis PR adds One medium-severity finding carries forward from the prior review (unchanged code pattern, severity anchored). Agents with Findings1. Novel
|
| Prior finding | Status |
|---|---|
Novel protocol: graphql lacks validation (medium, consumer-completeness) |
⏳ Carried forward — unchanged code pattern, severity anchored at medium |
| Documentation omits enforcement mechanism (low, incorrect-doc) | ⏳ Carried forward — unchanged, severity anchored at low |
| Permission expansion (low, permission-expansion) | ⏳ Carried forward — unchanged, severity anchored at low |
Previous run
Review — comment (b59276c)
Three findings: novel protocol: graphql lacks validation (medium, carried forward), documentation partially omits enforcement mechanism (low, carried forward), permission expansion (low, carried forward).
Previous run
Review — comment
Summary
This PR adds protocol: graphql endpoint entries to four read-only agent sandbox policies (code, fix, retro, review), fixing a documented failure where the gh CLI's POST /graphql requests were blocked by access: read-only on protocol: rest endpoints. The agents/review.md documentation is updated to reflect the new GraphQL capability, replacing stale REST-only guidance with accurate REST+GraphQL instructions. The change is well-scoped, uses least-privilege access (read-only, path-scoped to /graphql, enforcement: enforce), and traces to a linked issue (fullsend-ai/fullsend#4934).
One medium-severity finding carries forward from the prior review (unchanged code pattern, severity anchored). All REST API examples in agents/review.md are preserved; the doc update adds GraphQL examples alongside them. Agents with access: read-write (triage, prioritize) are correctly excluded — their existing policies already permit POST /graphql. Scribe has no GitHub API entry and is also correctly excluded.
Defense-in-depth: the code and fix agents additionally ban Bash(gh api *) via disallowedTools, making the GraphQL endpoint unreachable at the tool layer for those two agents regardless of the network policy. The retro and review agents rely on the proxy's protocol: graphql enforcement as the primary control.
Findings
1. Novel protocol: graphql and endpoint-level path field lack in-repo validation
Severity: medium · Category: consumer-completeness · Files: policies/code.yaml, policies/fix.yaml, policies/retro.yaml, policies/review.yaml
protocol: graphql is introduced for the first time across all policy files — every existing endpoint entry uses protocol: rest. The endpoint-level path field is also novel; all existing path: fields appear under binaries: sections only. Since the consuming proxy lives in another repository (fullsend-ai/fullsend), this repo has no schema, validation test, or documentation confirming:
- The proxy recognizes
protocol: graphqlas a valid protocol type - The proxy supports endpoint-level
pathmatching - The proxy's failure mode for unrecognized values (fail-open vs. fail-closed)
- The AST-level mutation blocking claimed in the inline comments is implemented
The PR's root cause evidence (POST /graphql denied at L7) demonstrates the proxy does enforce protocol-level filtering, which indirectly supports the claim. However, the correctness of protocol: graphql as a recognized value and the AST-level mutation blocking behavior remain unverifiable from this repository alone.
If the proxy does not recognize protocol: graphql and falls through to a permissive default, the retro agent is the highest-risk case — its sandbox token has issues:write and pull_requests:write scopes, and it does not have Bash(gh api *) in its disallowedTools (unlike code and fix).
Remediation: Confirm the fullsend proxy supports protocol: graphql and endpoint-level path in a released version. Consider adding a policy schema to schemas/ so future structural changes are validated in CI.
2. Documentation partially omits enforcement mechanism detail
Severity: low · Category: incorrect-doc · File: agents/review.md
The updated text now correctly states "GraphQL mutations are blocked by the sandbox proxy," identifying the trust boundary. However, it does not mention that enforcement uses AST-level query/mutation discrimination, which is the mechanism referenced in the policy YAML comments. Future maintainers may not know where to investigate if mutation blocking behavior changes.
Remediation: Consider adding "via AST-level query analysis" or linking to proxy documentation.
3. Permission expansion — four read-only agents
Severity: low · Category: permission-expansion · Files: policies/code.yaml, policies/fix.yaml, policies/retro.yaml, policies/review.yaml
Adding GraphQL access is a permission expansion for four agents. All entries use access: read-only with enforcement: enforce and path scoping to /graphql. The change is authorized by the linked issue. Agent-specific risk:
- code/fix:
Bash(gh api *)banned viadisallowedTools— GraphQL endpoint unreachable at the tool layer; policy entry is defense-in-depth documentation of intent - review: No write-scoped token — mutations would fail at GitHub's end regardless
- retro: Token has
issues:writeandpull_requests:writescopes, making it the highest-risk case; AST-level mutation blocking is the critical control; incremental risk is low given layered controls (read-only access, enforce mode, no curl in binary allowlist)
Prior review resolution
| Prior finding | Status |
|---|---|
Novel protocol: graphql lacks validation (medium, consumer-completeness) |
⏳ Carried forward — unchanged code pattern, severity anchored at medium |
| Documentation omits enforcement mechanism (low, incorrect-doc) | ⏳ Carried forward — unchanged, severity anchored at low |
| Permission expansion (low, permission-expansion) | ⏳ Carried forward — unchanged, severity anchored at low |
Previous run (2)
Review — comment (855ce38)
Three findings: novel protocol: graphql lacks validation (medium, carried forward), documentation partially omits enforcement mechanism (low, carried forward), permission expansion (low, carried forward).
Previous run (3)
Review — comment
Summary
This PR adds protocol: graphql endpoint entries to four read-only agent sandbox policies (code, fix, retro, review), fixing a documented failure where the gh CLI's POST /graphql requests were blocked by access: read-only on protocol: rest endpoints. The agents/review.md documentation is updated to reflect the new GraphQL capability, replacing stale REST-only guidance with accurate REST+GraphQL instructions. The change is well-scoped, uses least-privilege access (read-only, path-scoped to /graphql, enforcement: enforce), and traces to a linked issue (fullsend-ai/fullsend#4934).
One medium-severity finding carries forward from the prior review (unchanged code pattern, severity anchored). All REST API examples in agents/review.md are preserved; the doc update adds GraphQL examples alongside them. Agents with access: read-write (triage, prioritize) are correctly excluded — their existing policies already permit POST /graphql. Scribe has no GitHub API entry and is also correctly excluded.
Defense-in-depth: the code and fix agents additionally ban Bash(gh api *) via disallowedTools, making the GraphQL endpoint unreachable at the tool layer for those two agents regardless of the network policy. The retro and review agents rely on the proxy's protocol: graphql enforcement as the primary control.
Findings
1. Novel protocol: graphql and endpoint-level path field lack in-repo validation
Severity: medium · Category: consumer-completeness · Files: policies/code.yaml, policies/fix.yaml, policies/retro.yaml, policies/review.yaml
protocol: graphql is introduced for the first time across all policy files — every existing endpoint entry uses protocol: rest. The endpoint-level path field is also novel; all existing path: fields appear under binaries: sections only. Since the consuming proxy lives in another repository (fullsend-ai/fullsend), this repo has no schema, validation test, or documentation confirming:
- The proxy recognizes
protocol: graphqlas a valid protocol type - The proxy supports endpoint-level
pathmatching - The proxy's failure mode for unrecognized values (fail-open vs. fail-closed)
- The AST-level mutation blocking claimed in the inline comments is implemented
The PR's root cause evidence (POST /graphql denied at L7) demonstrates the proxy does enforce protocol-level filtering, which indirectly supports the claim. However, the correctness of protocol: graphql as a recognized value and the AST-level mutation blocking behavior remain unverifiable from this repository alone.
If the proxy does not recognize protocol: graphql and falls through to a permissive default, the retro agent is the highest-risk case — its sandbox token has issues:write and pull_requests:write scopes, and it does not have Bash(gh api *) in its disallowedTools (unlike code and fix).
Remediation: Confirm the fullsend proxy supports protocol: graphql and endpoint-level path in a released version. Consider adding a policy schema to schemas/ so future structural changes are validated in CI.
2. Documentation partially omits enforcement mechanism detail
Severity: low · Category: incorrect-doc · File: agents/review.md
The updated text now correctly states "GraphQL mutations are blocked by the sandbox proxy," identifying the trust boundary (this addresses the prior review's remediation suggestion). However, it does not mention that enforcement uses AST-level query/mutation discrimination, which is the mechanism referenced in the policy YAML comments. Future maintainers may not know where to investigate if mutation blocking behavior changes.
Remediation: Consider adding "via AST-level query analysis" or linking to proxy documentation.
3. Permission expansion — four read-only agents
Severity: low · Category: permission-expansion · Files: policies/code.yaml, policies/fix.yaml, policies/retro.yaml, policies/review.yaml
Adding GraphQL access is a permission expansion for four agents. All entries use access: read-only with enforcement: enforce and path scoping to /graphql. The change is authorized by the linked issue. Agent-specific risk:
- code/fix:
Bash(gh api *)banned viadisallowedTools— GraphQL endpoint unreachable at the tool layer; policy entry is defense-in-depth documentation of intent - review: No write-scoped token — mutations would fail at GitHub's end regardless
- retro: Token has
issues:writeandpull_requests:writescopes, making it the highest-risk case; AST-level mutation blocking is the critical control; incremental risk is low given layered controls (read-only access, enforce mode, no curl in binary allowlist)
Prior review resolution
| Prior finding | Status |
|---|---|
Novel protocol: graphql lacks validation (medium, consumer-completeness) |
⏳ Carried forward — unchanged code pattern, severity anchored at medium |
| Documentation omits enforcement mechanism (low, incorrect-doc) | ⏳ Carried forward (partially addressed — text now includes "by the sandbox proxy") |
| Permission expansion (low, permission-expansion) | ⏳ Carried forward — unchanged, severity anchored at low |
Previous run (4)
Review — comment (d8d4fad)
Three findings: novel protocol: graphql lacks validation (medium, carried forward), documentation omits enforcement mechanism (low, carried forward), permission expansion (low, carried forward).
Previous run (5)
Review — comment
Summary
This PR adds protocol: graphql endpoint entries to four read-only agent sandbox policies (code, fix, retro, review), fixing a documented failure where the gh CLI's POST /graphql requests were blocked by access: read-only on protocol: rest endpoints. The scope has expanded since the prior review to include policies/code.yaml and policies/fix.yaml alongside the previously reviewed policies/retro.yaml and policies/review.yaml. The agents/review.md documentation is updated to reflect the new GraphQL capability, replacing stale "REST-only" guidance. The change is well-scoped, uses least-privilege access (read-only, path-scoped to /graphql, enforcement: enforce), and traces to a linked issue (fullsend-ai/fullsend#4934).
One medium-severity finding carries forward from the prior review (unchanged code pattern, severity anchored). The scope expansion to code.yaml and fix.yaml is justified — both agents have read-only GitHub API access and the same root cause applies. Agents with access: read-write (triage, prioritize) are correctly excluded, as are agents with no GitHub API entry (scribe).
Findings
1. Novel protocol: graphql and endpoint-level path field lack in-repo validation
Severity: medium · Category: consumer-completeness · Files: policies/code.yaml, policies/fix.yaml, policies/retro.yaml, policies/review.yaml
protocol: graphql is introduced for the first time across all policy files — every existing endpoint entry uses protocol: rest. The endpoint-level path field is also novel; all existing path: fields appear under binaries: sections only. Since the consuming proxy lives in another repository (fullsend-ai/fullsend), this repo has no schema, validation test, or documentation confirming:
- The proxy recognizes
protocol: graphqlas a valid protocol type - The proxy supports endpoint-level
pathmatching - The proxy's failure mode for unrecognized values (fail-open vs. fail-closed)
- The AST-level mutation blocking claimed in the inline comments is implemented
The PR's root cause evidence (POST /graphql denied at L7) demonstrates the proxy does enforce protocol-level filtering, which indirectly supports the claim. However, the correctness of protocol: graphql as a recognized value and the AST-level mutation blocking behavior remain unverifiable from this repository.
Remediation: Confirm the fullsend proxy supports protocol: graphql and endpoint-level path in a released version. Consider adding a policy schema to schemas/ so future structural changes are validated in CI.
2. Documentation omits enforcement mechanism for mutation blocking
Severity: low · Category: incorrect-doc · File: agents/review.md
The updated text states "GraphQL mutations are blocked" without clarifying that enforcement is delegated to the external sandbox proxy's AST-level analysis. The policy YAML comments reference "AST level" blocking, but nothing in this repository implements or tests it. Future maintainers may not know where to investigate if mutation blocking behavior changes.
Remediation: Consider qualifying with "by the sandbox proxy" to make the trust boundary explicit.
3. Permission expansion — four read-only agents
Severity: low · Category: permission-expansion · Files: policies/code.yaml, policies/fix.yaml, policies/retro.yaml, policies/review.yaml
Adding GraphQL access is a permission expansion for four agents. All entries use access: read-only with enforcement: enforce and path scoping to /graphql. The change is authorized by the linked issue. Agent-specific risk assessment:
- review: No write-scoped token — mutations would fail at GitHub's end regardless
- retro: Token has
issues:writeandpull_requests:writescopes, making it the highest-risk case. AST-level mutation blocking is the critical control. Incremental risk is low given layered controls (read-only access, enforce mode, no curl in binary allowlist) - code/fix: Read-only token scopes;
Bash(gh api *)is additionally banned viadisallowedTools, so onlyghCLI subcommands like--json(which internally use POST /graphql) benefit from this change
Prior review resolution
| Prior finding | Status |
|---|---|
Novel protocol: graphql lacks validation (medium, consumer-completeness) |
⏳ Carried forward — unchanged code pattern, severity anchored at medium; scope expanded to code.yaml and fix.yaml |
| Documentation omits enforcement mechanism (low, incorrect-doc) | ⏳ Carried forward — unchanged, severity anchored at low |
| Permission expansion retro/review (low, permission-expansion) | ⏳ Carried forward — unchanged, consolidated with new code/fix expansion |
Labels: PR scope expanded to modify code and fix agent sandbox policies in addition to retro and review
Previous run (6)
Review — comment (bc86827)
Four findings: novel protocol: graphql lacks validation (medium, carried forward), documentation omits enforcement mechanism (low, carried forward), permission expansion retro (low, carried forward), permission expansion review (low, carried forward). Prior stale-docs finding resolved.
Previous run (7)
Review — comment
Summary
This PR adds protocol: graphql endpoint entries to the retro and review sandbox policies, fixing a documented failure where the gh CLI's POST /graphql requests were blocked by access: read-only on protocol: rest endpoints. The L7 proxy correctly denied POST requests under the read-only REST policy — agents with access: read-write (triage, prioritize, code, fix) were unaffected. The fix adds a separate protocol: graphql entry with access: read-only and path: "/graphql", which allows GraphQL queries while blocking mutations at the AST level. The agents/review.md documentation is updated to reflect the new capability, replacing the stale REST-only guidance.
The change is well-scoped, uses least-privilege access, and traces to a linked issue (fullsend-ai/fullsend#4934). One medium-severity finding carries forward from the prior review (unchanged code, severity anchored).
Findings
1. Novel protocol: graphql and endpoint-level path field lack in-repo validation
Severity: medium · Category: consumer-completeness · Files: policies/retro.yaml, policies/review.yaml
protocol: graphql is introduced for the first time across all 7 policy files — every existing endpoint entry uses protocol: rest. The endpoint-level path field is also novel; all existing path: fields appear under binaries: sections only. Since the consuming proxy lives in another repository (fullsend-ai/fullsend), this repo has no schema, validation test, or documentation confirming:
- The proxy recognizes
protocol: graphqlas a valid protocol type - The proxy supports endpoint-level
pathmatching - The proxy's failure mode for unrecognized values (fail-open vs. fail-closed)
The PR's root cause evidence (POST /graphql denied at L7) demonstrates the proxy does enforce protocol-level filtering, which indirectly supports the claim. However, the correctness of protocol: graphql as a recognized value and the AST-level mutation blocking behavior remain unverifiable from this repository.
Remediation: Confirm the fullsend proxy supports protocol: graphql and endpoint-level path in a released version. Consider adding a policy schema to schemas/ so future structural changes are validated in CI.
2. Documentation omits enforcement mechanism for mutation blocking
Severity: low · Category: incorrect-doc · File: agents/review.md
The updated text states "GraphQL mutations are blocked" without clarifying that enforcement is delegated to the external sandbox proxy. The policy YAML comments reference "AST level" blocking, but nothing in this repository implements or tests it. Future maintainers may not know where to investigate if mutation blocking behavior changes.
Remediation: Consider qualifying with "by the sandbox proxy" to make the trust boundary explicit.
3. Permission expansion — retro agent
Severity: low · Category: permission-expansion · File: policies/retro.yaml
Adding GraphQL access is a permission expansion. The retro agent's sandbox token has issues:write and pull_requests:write scopes. The policy correctly uses access: read-only and enforcement: enforce, and the linked issue authorizes the change. The AST-level mutation blocking is the critical control — if bypassed, the token scopes would permit mutations. The incremental risk is low given the layered controls (read-only access, enforce mode, no curl in binary allowlist).
4. Permission expansion — review agent
Severity: low · Category: permission-expansion · File: policies/review.yaml
Same configuration as retro. The review agent's token has no write scopes (per the policy header: "No write access to GitHub"), making the mutation-blocking concern lower here than for the retro agent.
Prior review resolution
| Prior finding | Status |
|---|---|
Novel protocol: graphql lacks validation (medium, consumer-completeness) |
⏳ Carried forward — unchanged code, severity anchored at medium |
| Documentation omits enforcement mechanism (low, incorrect-doc) | ⏳ Carried forward — unchanged code, severity anchored at low |
| Permission expansion (low, permission-expansion) | ⏳ Carried forward — unchanged code, severity anchored at low |
Previous run (8)
Review — comment (c71b59d)
Four findings: novel protocol: graphql lacks validation (medium, carried forward), documentation omits enforcement mechanism (low, carried forward), permission expansion retro (low, carried forward), permission expansion review (low, carried forward). Prior stale-docs finding resolved.
Previous run (9)
Review — comment (bf4dfb1)
Three findings: stale docs in agents/review.md (medium, resolved), novel protocol: graphql lacks validation (medium, carried forward), permission expansion (low, carried forward).
Previous run (10)
Review — comment
Summary
This PR adds protocol: graphql endpoint entries to the retro and review sandbox policies, fixing a documented failure where the gh CLI's POST /graphql requests were blocked by the REST-only network policies. The new commit also updates agents/review.md to reflect the new GraphQL capability, fully addressing the prior review's stale-documentation finding. The change is well-scoped, uses least-privilege access (access: read-only, path-scoped to /graphql), and traces to a linked issue (fullsend-ai/fullsend#4934). The YAML structure and style are consistent with existing policy files.
One medium-severity finding carries over from the prior review (unchanged code, severity anchored). Several low-severity observations are noted for the record.
Findings
1. Novel protocol: graphql and endpoint-level path field lack in-repo validation
Severity: medium · Category: consumer-completeness · Files: policies/retro.yaml, policies/review.yaml
protocol: graphql is introduced for the first time across all 7 policy files — every existing endpoint entry uses protocol: rest. The endpoint-level path field is also novel; all existing path: fields appear under binaries: sections only. Since the consuming proxy lives in another repository (fullsend-ai/fullsend), this repo has no schema, validation test, or documentation confirming:
- The proxy recognizes
protocol: graphqlas a valid protocol type - The proxy supports endpoint-level
pathmatching - The proxy's failure mode for unrecognized values (fail-open vs. fail-closed)
Notably, other agents (triage, prioritize) already successfully use gh commands that invoke GraphQL (e.g., gh pr view --json, gh issue view --json) under policies with only protocol: rest, suggesting the proxy may already pass GraphQL traffic under the rest protocol. If so, these new entries may be declarative (documenting intent) rather than functionally enforcing, and the comment claiming AST-level mutation blocking may overstate what is actually enforced.
Remediation: Confirm the fullsend proxy supports protocol: graphql and endpoint-level path in a released version. Consider adding a policy schema to schemas/ so future structural changes are validated in CI.
2. Documentation omits enforcement mechanism for mutation blocking
Severity: low · Category: incorrect-doc · File: agents/review.md
The updated text states "GraphQL mutations are blocked" without clarifying that enforcement is delegated to the external sandbox proxy. The policy YAML comments reference "AST level" blocking, but nothing in this repository implements or tests it. Future maintainers may not know where to investigate if mutation blocking behavior changes.
Remediation: Consider qualifying with "by the sandbox proxy" to make the trust boundary explicit.
3. Permission expansion — retro agent
Severity: low · Category: permission-expansion · File: policies/retro.yaml
Adding GraphQL access is a permission expansion. The retro agent's sandbox token has issues:write and pull_requests:write scopes. The policy correctly uses access: read-only and enforcement: enforce, and the linked issue authorizes the change. The incremental risk is low because the existing protocol: rest endpoint already enforces access: read-only for the same host — the security posture for write operations is unchanged.
4. Permission expansion — review agent
Severity: low · Category: permission-expansion · File: policies/review.yaml
Same configuration as retro. The review agent's token reportedly lacks write scopes entirely (per the policy header: "No write access to GitHub"), making the mutation-blocking concern lower here than for the retro agent.
Prior review resolution
| Prior finding | Status |
|---|---|
Stale documentation in agents/review.md (medium, docs-currency) |
✅ Resolved — new commit updates the GitHub API section to reflect GraphQL capability |
Novel protocol: graphql lacks validation (medium, consumer-completeness) |
⏳ Carried forward — unchanged code, severity anchored at medium |
| Permission expansion (low, permission-expansion) | ⏳ Carried forward — unchanged code, severity anchored at low |
Previous run (11)
Review — comment (bf4dfb1)
Three findings: stale docs in agents/review.md (medium, resolved), novel protocol: graphql lacks validation (medium, carried forward), permission expansion (low, carried forward).
Previous run (12)
Review — comment
Summary
This PR adds protocol: graphql endpoint entries to the retro and review sandbox policies, fixing a documented failure where the gh CLI's POST /graphql requests were blocked by the REST-only, read-only network policies. The change is well-scoped (two files, identical 8-line blocks), uses least-privilege access (read-only, path-scoped to /graphql), and traces to a linked issue (fullsend-ai/fullsend#4934). The YAML structure is valid and insertion point is correct.
Two medium-severity findings and one low-severity finding warrant attention:
Findings
1. Stale documentation in agents/review.md contradicts this policy change
Severity: medium · Category: docs-currency · File: agents/review.md:201–204
Lines 201–204 explicitly state:
The review token only has REST API permissions. Always use
gh apiREST endpoints to fetch PR and repository data. Do not usegh pr view --jsonor other--jsonsubcommands — they use the GraphQL API and will fail with HTTP 403.
This PR enables GraphQL in the review agent's sandbox policy but does not update these instructions. This creates two issues:
- The review agent will not benefit from this change — it reads these instructions and will continue using only REST endpoints, making the
review.yamlpolicy expansion effectively dead configuration. - Documentation accuracy — the claim that GraphQL "will fail with HTTP 403" becomes incorrect after this PR merges.
Remediation: Update agents/review.md to reflect the new capability. If GraphQL is now permitted, remove the prohibition and update the examples. If the review agent should continue using REST only and the review.yaml change is future-proofing, document that rationale in the PR description.
2. Novel protocol: graphql and path field values lack in-repo validation
Severity: medium · Category: consumer-completeness · File: policies/retro.yaml, policies/review.yaml
protocol: graphql is introduced for the first time across all 7 policy files — every existing endpoint entry (46 total) uses protocol: rest. The path field on an endpoint entry is also novel; no existing endpoint uses it. Since the consuming proxy lives in another repository (fullsend-ai/fullsend), this repo has no schema definition, validation test, or documentation confirming:
- The proxy recognizes
protocol: graphqlas a valid protocol type - The proxy implements AST-level mutation blocking as the inline comments claim
- The proxy supports
path-based endpoint matching - The proxy's failure mode for unrecognized values (fail-open vs. fail-closed)
The PR author likely has platform context, but the correctness of this change is unverifiable from this repository alone.
Remediation: Confirm the fullsend proxy supports protocol: graphql and path matching in a released version. Consider linking the upstream implementation in the PR description or adding a brief comment referencing it.
3. Permission expansion — properly scoped
Severity: low · Category: permission-expansion · File: policies/retro.yaml, policies/review.yaml
Adding GraphQL access is a permission expansion for two read-only agents. The expansion is justified by the linked issue, uses access: read-only (claimed to block mutations at the AST level), and is path-scoped to /graphql. The retro agent's token carries issues:write and pull_requests:write scopes, but the read-only access level should prevent GraphQL mutations. This is the least-privilege approach for enabling GraphQL queries on these agents.
No immediate action required — noting for the record that this is an intentional, authorized permission expansion.
Labels: PR modifies sandbox policies for retro and review agents to fix a GraphQL access bug
Previous run (13)
Review
Reason: stale-head
The review agent reviewed commit 80b3885da570f9047c71f5101c2c976a4d4dc73e but the PR HEAD is now bf4dfb12b05342b43fa77d84943c6434efb1eaca. This review was discarded to avoid approving unreviewed code.
|
/fs-review |
|
🤖 Finished Review · ✅ Success · Started 9:23 AM UTC · Completed 9:33 AM UTC |
d8d4fad to
855ce38
Compare
|
🤖 Finished Review · ✅ Success · Started 3:05 PM UTC · Completed 3:15 PM UTC |
855ce38 to
b59276c
Compare
|
🤖 Review · ❌ Terminated · Started 3:22 PM UTC · Ended 3:30 PM UTC |
|
@maruiz93 I applied the change to code and fix as well |
…ndboxes The gh CLI uses POST /graphql for all operations, including reads. The github_api policy had access: read-only on a REST endpoint, so the L7 proxy blocked every POST. Add a separate graphql-protocol endpoint scoped to /graphql with read-only access, which allows queries but blocks mutations at the AST level. Applied to code, fix, retro, and review policies. Prioritize, triage, and scribe already use read-write access or have no GitHub API entry. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Hector Martinez <hemartin@redhat.com>
b59276c to
055af2f
Compare
|
🤖 Finished Review · ✅ Success · Started 6:29 AM UTC · Completed 6:35 AM UTC |
|
🤖 Finished Retro · ✅ Success · Started 8:26 AM UTC · Completed 8:34 AM UTC |
Retro: PR #173 — allow POST /graphql in agent sandbox policiesTimeline: PR created 2026-07-15 by rh-hemartin to fix fullsend-ai/fullsend#4934. Root cause: the Key events:
Review quality: The automated reviews caught real issues — qodo flagged the security concern about a read-write graphql endpoint (resolved by switching to read-only), and fullsend-ai-review identified the Rework: One iteration of rework, adding ~1 day to the timeline. The 4 files changed in the final PR are identical 8-line blocks; the scope gap was mechanical, not conceptual. Existing issue overlap: Issue #106 already covers the repeated-findings pattern (the same consumer-completeness finding was re-raised across 13 review cycles on 8 commits). Issue #130 covers distinguishing PR-introduced vs pre-existing findings. No proposal filed for those. Note on triage/prioritize: These agents lack a Proposals filed
|
Summary
ghCLI usesPOST /graphqlfor all operations, including reads. Agent sandbox policies withaccess: read-onlyon aprotocol: restendpoint caused the L7 proxy to block every POST to/graphql.protocol: graphqlendpoint entry scoped topath: "/graphql"withaccess: read-onlyincode.yaml,fix.yaml,retro.yaml, andreview.yaml. This allows GraphQL queries but blocks mutations at the AST level. REST endpoints are unchanged.prioritize,triage) already useaccess: read-writeand were unaffected.scribehas no GitHub API entry.Root cause
Transcript analysis of run 29399089230 (retro for konflux-ci/konflux-ci#8189) shows two
POST /graphqlrequests denied at L7 with reasonPOST /graphql not permitted by policy. The agent then triedcurl(binary not in allowlist) andgit clone(same) as fallbacks, all denied. The token was valid; the proxy killed the connection before it reached GitHub.Test plan
gh pr viewcalls succeed in sandboxgh pr view --jsonfor read operationsCloses fullsend-ai/fullsend#4934
🤖 Generated with Claude Code