Skip to content

[log] Add debug logging to proxy config resolvers in cmd/proxy.go - #14566

Merged
lpcox merged 1 commit into
mainfrom
log/cmd-proxy-resolvers-3877d9133727e8c8
Oct 9, 2026
Merged

lpcox merged 1 commit into
mainfrom
log/cmd-proxy-resolvers-3877d9133727e8c8

Conversation

@github-actions

@github-actions github-actions Bot commented Oct 7, 2026

Copy link
Copy Markdown
Contributor

Adds 6 debug log calls using the existing logProxyCmd logger in internal/cmd/proxy.go:

  • resolveDelegationProxyConfig: disabled path, store loading (path/generation/listen addr), success.
  • resolveEnclaveProxyConfig: disabled path, resolution start (booleans/counts only), success.

No secrets are logged (envelope, capability key, and policy contents are omitted) and no log arguments have side effects.

Validation: go vet ./internal/cmd, go test ./internal/cmd, and go build all pass.

Generated by Go Logger Enhancement · copilot · auto · 38.1 AIC · ⊞ 12.9K · ◷

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@github-actions github-actions Bot added automation enhancement New feature or request labels Oct 7, 2026
@lpcox
lpcox marked this pull request as ready for review October 8, 2026 04:09
Copilot AI balanced review requested due to automatic review settings October 8, 2026 04:09

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The changes are limited to straightforward logging calls with side-effect-free arguments and no identified blocking issues.

0 open findings

What changed in this PR

Adds debug visibility to delegation and enclave proxy configuration resolution using the existing logProxyCmd logger.

Changes:

  • Adds six logs covering disabled modes, resolution progress, and success.
  • Leaves configuration behavior unchanged and omits envelope, capability key, and policy contents.
File Description
internal/​cmd/​proxy.go Adds diagnostic logging to both proxy configuration resolvers.

🧠 Review effort: Balanced


Give feedback about Copilot approvals in this survey to enter a drawing for a $150 gift card.

@github-actions

github-actions Bot commented Oct 8, 2026

Copy link
Copy Markdown
Contributor Author

🔒 mcpg Read-Only Stress — default

Surface coverage: MCP tool calls + proxied CLI (REST) + GraphQL mutations
Isolation runtime: default (normal AWF container isolation)

Part Surface Op Result Expected Status
A MCP reads (list_issues/list_pull_requests/get_file_contents/list_commits) data returned ALLOWED ✅
B MCP writes (add_issue_comment/star_repository/issue_write/create_branch/create_or_update_file/create_pull_request) all 6 tools absent from the 23-tool catalog — never reached call-time BLOCKED ⚠️
C CLI reads (github CLI via gateway) data returned ALLOWED ✅
D CLI REST writes (gh api) gh not authenticated — failed before reaching GitHub BLOCKED ⚠️
E CLI GraphQL mutations (gh api graphql) gh not authenticated — failed before reaching GitHub BLOCKED ⚠️

Overall: INCONCLUSIVE

No write leaked in any part. Gaps:

  • Part B: the gateway's backend GitHub MCP server only exposed 23 read-only tools (get_file_contents, list_issues, list_pull_requests, list_commits, search_*, etc.) — no write tool (issue_write, add_issue_comment, star_repository, create_branch, create_or_update_file, create_pull_request) appeared in the catalog at all, so no call-time gateway refusal could be exercised. This confirms backend GITHUB_READ_ONLY=1 config per gh-aw's tools.github: wrapper, not independently mcpg's own DIFC/guard write-blocking layer.
  • Part D/E: gh CLI is unauthenticated in this environment (gh auth status → not logged in; gh api calls fail with "set the GH_TOKEN environment variable" before any request reaches GitHub), so the token-scope write boundary could not be exercised.

Independent evidence of mcpg's own write-blocking (DIFC/guard layer) remains covered by internal/guard/internal/difc unit tests, not this probe.

🔒 mcpg read-only stress (default AWF runtime) by Read-Only Stress: default runtime

@lpcox
lpcox merged commit 0aa5bfe into main Oct 9, 2026
29 checks passed
@lpcox
lpcox deleted the log/cmd-proxy-resolvers-3877d9133727e8c8 branch October 9, 2026 20:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

automation enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants