Skip to content

fix(#7014): add GraphQL endpoint to scaffold GitHub RO profile - #7016

Open
fullsend-ai-coder[bot] wants to merge 2 commits into
mainfrom
agent/7014-scaffold-graphql-endpoint
Open

fix(#7014): add GraphQL endpoint to scaffold GitHub RO profile#7016
fullsend-ai-coder[bot] wants to merge 2 commits into
mainfrom
agent/7014-scaffold-graphql-endpoint

Conversation

@fullsend-ai-coder

Copy link
Copy Markdown
Contributor

Summary

Add the missing GraphQL endpoint to the scaffold fullsend-github-ro.yaml profile, matching the fleet copy in fullsend-ai/agents. Without this endpoint, every agent generated via fullsend agent new is blocked at egress on gh --json, gh pr view, gh issue view, and anything else that uses api.github.com/graphql.

Changes

Testing

  • New test TestScaffoldGitHubROProfile_GraphQLEndpoint verifies the GraphQL endpoint is present with correct host, protocol, path, and access level
  • All existing scaffold tests pass (go test ./internal/scaffold/...)
  • go vet passes
  • Secret scan passes

Closes #7014

Post-script verification

  • Branch is not main/master (agent/7014-scaffold-graphql-endpoint)
  • Secret scan passed (gitleaks — fecb2f0809b7843ed188d99f8dba98fc4a0beb55..HEAD)
  • PR body secret scan passed (gitleaks — no-git)

The scaffold fullsend-github-ro.yaml profile was missing a GraphQL
endpoint for api.github.com, while the fleet copy in fullsend-ai/agents
included one. This caused agents generated via `fullsend agent new` to
fail on any `gh` command using GraphQL (--json, pr view, issue view)
with an egress policy denial.

Add the missing GraphQL endpoint block and a test that pins the
endpoint presence and configuration to catch future scaffold-fleet
drift, following the same pattern as #6971 and #6981.

Note: pre-commit hooks were not run via pre-commit (infrastructure
failure: network-restricted sandbox). Hooks were run directly: gofmt,
go vet, check-yaml, trailing-whitespace, end-of-file all passed.

Closes #7014
@fullsend-ai-coder
fullsend-ai-coder Bot requested a review from a team as a code owner September 4, 2026 16:06
@fullsend-ai-coder fullsend-ai-coder Bot added the ready-for-review Triggers review agent dispatch label Sep 4, 2026
@fullsend-ai-review

fullsend-ai-review Bot commented Sep 4, 2026

Copy link
Copy Markdown

🤖 Finished Review · ✅ Success · Started 4:08 PM UTC · Completed 4:27 PM UTC

Commit: 8137ad0 · View workflow run →

Runtime: claude · Model: opus → claude-opus-4-6 · Effort: high · Cost: $4.76

@codecov

codecov Bot commented Sep 4, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@fullsend-ai-review fullsend-ai-review Bot added the risk/low PR risk: low label Sep 4, 2026
@fullsend-ai-review

fullsend-ai-review Bot commented Sep 4, 2026

Copy link
Copy Markdown

Risk Assessment: low (1/5)

Details

Minimal, well-scoped bug fix adding a missing GraphQL endpoint to the scaffold GitHub RO profile with matching test. Two files changed, 44 lines, perfect test ratio, no protected or security-sensitive paths touched, bot author.

Previous run

Risk Assessment: low (1/5)

Details

Minimal, well-scoped bug fix adding a missing GraphQL endpoint to a scaffold profile with a matching test. Two files changed, 41 lines, perfect test ratio, no protected or sensitive paths touched.

@fullsend-ai-review

fullsend-ai-review Bot commented Sep 4, 2026

Copy link
Copy Markdown

Review

Findings

Low

  • [fail-open-risk] internal/scaffold/fullsend-repo/profiles/fullsend-github-ro.yaml:14 — The combination of protocol: graphql with access: read-only is novel in the scaffold profile set — no other profile uses protocol: graphql. For REST endpoints, read-only enforcement is straightforward (allow GET, block POST/PUT/DELETE). For GraphQL, all operations use HTTP POST to the same /graphql path, so enforcing read-only requires the OpenShell gateway to introspect the GraphQL request body and distinguish queries from mutations. If the gateway does not have GraphQL-aware enforcement, the access: read-only setting could either fail-closed (block all POST including legitimate queries) or fail-open (permit mutations). Within this repo, uninspectedEndpointRules (internal/cli/run_openai.go:619) correctly treats graphql as an L7-inspected protocol, but whether the L7 layer distinguishes queries from mutations is external. The profile matches the fleet copy, so the risk is accepted upstream.
Previous run

Review

Findings

Low

  • [fail-open-risk] internal/scaffold/fullsend-repo/profiles/fullsend-github-ro.yaml:14 — The combination of protocol: graphql with access: read-only is novel in the scaffold profile set — no other profile uses protocol: graphql. For REST endpoints, read-only enforcement is straightforward (allow GET, block POST/PUT/DELETE). For GraphQL, all operations use HTTP POST to the same /graphql path, so enforcing read-only requires the openshell gateway to introspect the GraphQL request body and distinguish queries from mutations. If the gateway does not have GraphQL-aware enforcement, the access: read-only setting could either fail-closed (block all POST including legitimate queries) or fail-open (permit mutations).
    Remediation: Verify that the openshell gateway version in use supports protocol: graphql with read-only enforcement that blocks mutation operations.

  • [test-adequacy] internal/scaffold/scaffold_test.go:1021 — The test validates the endpoint's host, protocol, path, and access fields but does not assert enforcement: enforce. A future change that removes or alters the enforcement value would not be caught by this test. Note: no existing profile endpoint test in this file asserts enforcement either, so this is consistent with current test conventions.
    Remediation: Add Enforcement string \yaml:"enforcement"`to the test struct and assertassert.Equal(t, "enforce", ep.Enforcement)`.


Next steps:

  • /fs-fix — agent addresses review findings automatically
  • /fs-fix <your instruction> — agent fixes with your specific guidance
  • Push commits directly — review re-runs automatically on push
  • /fs-fix-stop — disable automatic fix runs for this PR

fullsend-ai-review[bot]

This comment was marked as outdated.

@fullsend-ai-coder

fullsend-ai-coder Bot commented Sep 4, 2026

Copy link
Copy Markdown
Contributor Author

🤖 Finished Fix · ✅ Success · Started 4:29 PM UTC · Completed 4:36 PM UTC

Commit: 8137ad0 · View workflow run →

Runtime: claude · Model: opus → claude-opus-4-6 · Effort: high · Cost: $1.10

Add Enforcement field to the test struct and assert it equals
"enforce", ensuring future changes to the enforcement value are
caught by the test.

Addresses #7016
@fullsend-ai-coder

Copy link
Copy Markdown
Contributor Author

🔧 Fix agent — iteration 1 (bot-triggered)

Addressed test-adequacy finding by adding Enforcement field assertion to the GraphQL endpoint test. Disagreed with fail-open-risk finding as it requests operational gateway verification outside this PR's scope.

Fixed (1):

  1. [test-adequacy] Test does not assert enforcement field (internal/scaffold/scaffold_test.go): Added Enforcement field to the test struct and asserted it equals "enforce", so future changes to the enforcement value are caught by the test.

Disagreed (1):

  1. [fail-open-risk] Verify openshell gateway supports protocol: graphql with read-only enforcement: This finding asks for operational verification of the openshell gateway's GraphQL enforcement capabilities, which is out of scope for this code PR. The scaffold endpoint mirrors the fleet copy in fullsend-ai/agents (as noted in the test comment). Gateway behavior verification belongs in the gateway's own test suite or integration tests, not in this scaffold configuration change.

Tests: passed

Decision points

Next steps:

  • /fs-review — request a re-review of the changes
  • /fs-fix <your instruction> — run another fix pass with specific guidance
  • Push commits directly — review re-runs automatically on push
    Updated by fullsend fix agent

@fullsend-ai-review

fullsend-ai-review Bot commented Sep 4, 2026

Copy link
Copy Markdown

🤖 Finished Review · ✅ Success · Started 4:38 PM UTC · Completed 4:51 PM UTC

Commit: 5aefcb5 · View workflow run →

Runtime: claude · Model: opus → claude-opus-4-6 · Effort: high · Cost: $2.28

@fullsend-ai-review
fullsend-ai-review Bot dismissed their stale review September 4, 2026 16:51

Superseded by updated review

@fullsend-ai-review fullsend-ai-review Bot added the ready-for-merge All reviewers approved — ready to merge label Sep 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-for-merge All reviewers approved — ready to merge ready-for-review Triggers review agent dispatch risk/low PR risk: low

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Scaffold fullsend-github-ro profile lacks the GraphQL endpoint the fleet profile has; generated agents fail on gh --json

1 participant