You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Preserve canonical resource names in untrusted JSON wrapping #224
This issue was generated by AI for maintainer triage.
Idea
Recognize canonical resource-name formats emitted by current commands before wrapping generic name fields as untrusted content, including Analytics and Business Profile identifiers.
Evidence
The untrusted-content wrapper treats a field named name as free text unless its value matches a hard-coded resource-name classifier. That classifier covers selected Google resource prefixes but omits emitted identifiers such as Analytics account/property names and Business Profile location names. Those identifiers are therefore replaced by wrapper markers under --json --wrap-untrusted.
Why it matters
Canonical names are opaque command inputs, not display content. Wrapping them prevents agents and scripts from passing a discovery result directly into a follow-up command while providing no prompt-injection protection.
Initial acceptance checks
Representative Analytics and Business Profile canonical names remain byte-for-byte usable under --wrap-untrusted.
Human-controlled display names and filenames named name continue to be fenced.
Scope boundaries
Do not redesign the wrapper format or exempt arbitrary slash-containing strings.
Category: bug Summary: Preserve emitted Analytics and Business Profile resource names during untrusted-content wrapping.
Current behavior:
The untrusted JSON wrapper treats generic name fields as display text unless the value matches a known canonical-resource classifier. That classifier omits resource formats emitted for Analytics accounts/properties and Business Profile locations, so opaque identifiers are fenced and cannot be passed unchanged into follow-up commands. The wrapper feature is implemented, but source and historical checks confirm these canonical formats remain uncovered.
Desired behavior:
Known canonical identifiers emitted by current Analytics and Business Profile commands should remain byte-for-byte unchanged under --json --wrap-untrusted. Human-controlled display names and Drive file names must continue to be fenced; arbitrary strings must not gain an exemption merely because they contain slashes.
Key interfaces:
isResourceName() — recognize the bounded canonical name grammars used by current Analytics and Business Profile outputs.
The generic name wrapping rule — retain content fencing for non-resource names.
Acceptance criteria:
Representative Analytics account and property resource names remain unchanged when wrapping is enabled.
Representative Business Profile location resource names remain unchanged when wrapping is enabled.
Display names and Drive file names stored under name continue to be fenced.
Unknown or malformed slash-containing name values continue to be treated as untrusted content.
Tests cover valid, invalid, nested, and lookalike values without weakening existing wrapper tests.
Out of scope:
Wrapper-format redesign.
A generic exemption for slash-containing strings or unreviewed provider resources.
Closing as obsolete (GitHub sweep 2026-10-12). This issue describes behavior of the gog CLI command layer. The CLI was removed from this repository in 91336b7 (#269, "refactor(mcp): retire CLI distribution and rewrite server docs"), which deleted cmd/gog and all of internal/cmd; main now builds only gog-mcp, and none of the symbols this issue names exist on main (checked at bf17220). There is no code path left to fix here. A fix to the installed v0.10.0 binary would mean restoring the CLI, which is a separate decision. If the same gap appears in a gog-mcp operation, please file it against the MCP surface.
Activity
itsjeremyjohnson commentedon Aug 16, 2026
Agent Brief
Category: bug
Summary: Preserve emitted Analytics and Business Profile resource names during untrusted-content wrapping.
Current behavior:
The untrusted JSON wrapper treats generic
namefields as display text unless the value matches a known canonical-resource classifier. That classifier omits resource formats emitted for Analytics accounts/properties and Business Profile locations, so opaque identifiers are fenced and cannot be passed unchanged into follow-up commands. The wrapper feature is implemented, but source and historical checks confirm these canonical formats remain uncovered.Desired behavior:
Known canonical identifiers emitted by current Analytics and Business Profile commands should remain byte-for-byte unchanged under
--json --wrap-untrusted. Human-controlled display names and Drive file names must continue to be fenced; arbitrary strings must not gain an exemption merely because they contain slashes.Key interfaces:
isResourceName()— recognize the bounded canonical name grammars used by current Analytics and Business Profile outputs.namewrapping rule — retain content fencing for non-resource names.Acceptance criteria:
namecontinue to be fenced.namevalues continue to be treated as untrusted content.Out of scope:
itsjeremyjohnson commentedon Oct 12, 2026
Closing as obsolete (GitHub sweep 2026-10-12). This issue describes behavior of the
gogCLI command layer. The CLI was removed from this repository in 91336b7 (#269, "refactor(mcp): retire CLI distribution and rewrite server docs"), which deletedcmd/gogand all ofinternal/cmd;mainnow builds onlygog-mcp, and none of the symbols this issue names exist onmain(checked at bf17220). There is no code path left to fix here. A fix to the installed v0.10.0 binary would mean restoring the CLI, which is a separate decision. If the same gap appears in agog-mcpoperation, please file it against the MCP surface.