Skip to content

Preserve canonical resource names in untrusted JSON wrapping #224

Closed

Description

@itsjeremyjohnson

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.

Activity

  1. itsjeremyjohnson commented on Aug 16, 2026

    @itsjeremyjohnson
    CollaboratorAuthor

    This was generated by AI during triage.

    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 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.
  2. added
    ready-for-agentFully specified and ready for an agent
    and removed
    needs-triageMaintainer needs to evaluate this issue
    on Aug 16, 2026
  3. itsjeremyjohnson commented on Oct 12, 2026

    @itsjeremyjohnson
    CollaboratorAuthor

    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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions