Back to skill

Security audit

gog-safety

Security checks for vulnerabilities and agentic risk

Overview

This skill has a coherent goal, but its restricted safety profiles and build process grant more sensitive authority than the safety framing suggests.

Install only after reviewing the build source and profiles. Pin the upstream repository to an audited commit, remove token export/import and keyring access from restricted profiles, disable forwarding-capable filters and L1 Drive sharing unless explicitly required, and require human confirmation for remote sudo deployment and rollback.

Vulnerability Patterns
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (4)

T03 · Remote Payload Retrieval and Execution

Error
Location
scripts/build-gog-safe.sh:20
Finding

Mutable Source from an Undeclared Fork Is Retrieved and Executed

Content
View full analysis
/dev/null || true git checkout "$UPSTREAM_BRANCH" 2>/dev/null git pull origin "$UPSTREAM_BRANCH" 2>/dev/null || true else echo "Cloning gogcli PR #366 branch..." rm -rf "$BUILD_DIR" git clone --branch "$UPSTREAM_BRANCH" --depth 1 "$UPSTREAM_REPO" "$BUILD_DIR" cd "$BUILD_DIR" fi # Step 2: Copy our profile into the build tree cp "$PROFILE" "$BUILD_DIR/safety-profile.yaml" echo "Copied profile to build tree." # Step 3: Generate command structs (must run on host platform) echo "Generating command structs from profile..." rm -f internal/cmd/*_cmd_gen.go CGO_ENABLED=0 go run ./cmd/gen-safety --strict safety-profile.yaml ``` ### Technical Analysis The build script retrieves a mutable Git branch from `drewburchfield/gogcli-safe` and immediately executes repository-controlled Go code through `go run ./cmd/gen-safety`. It then builds the rest of the retrieved repository into the binary intended for deployment. The repository and branch differ from the source described in `SKILL.md:54` and `references/levels.md:40,45-46`, which identify `steipete/gogcli` PR 366. The build does not pin an immutable commit, verify a signed tag, check a known source hash, or validate the generated source. Consequently, the effective payload can change after this skill package has been reviewed. Suppressing fetch and pull errors with `|| true` also weakens reproducibility: a failed update can silently leave an unknown or locally modified checkout in use. ### Attack Path 1. An ...[truncated 1334 chars]
Remediation
View remediation
" git checkout --detach "$EXPECTED_COMMIT" [[ "$(git rev-parse HEAD)" == "$EXPECTED_COMMIT" ]] || exit 1 ``` 4. Verify signed commits or tags against an explicitly trusted maintainer key. 5. Vendor the generator into the reviewed skill package where practical, or separately review and hash its complete dependency closure. 6. Run source generation and compilation in an isolated, unprivileged container or sandbox with no developer credentials and minimal network access. 7. Remove `|| true` from security-relevant Git operations and fail closed when retrieval, checkout, or verification fails. 8. Generate a software bill of materials and record the repository URL, exact commit, profile hash, Go version, and artifact checksum for every build. 9. Verify the final artifact through reproducible builds or an independent trusted build pipeline before deployment. ]]>

T05 · Unauthorized Access and Privilege Escalation

Error
Location
references/l1-draft.yaml:229
Finding

Restricted Safety Profiles Permit Token Export and Authentication Reconfiguration

Content
View full analysis
Remediation
View remediation

T05 · Unauthorized Access and Privilege Escalation

Error
Location
references/l1-draft.yaml:39
Finding

L1 and L2 Gmail Filter Permissions Enable Indirect Outbound Mail Disclosure

Content
View full analysis
Remediation
View remediation

T05 · Unauthorized Access and Privilege Escalation

Warning
Location
references/l1-draft.yaml:69
Finding

L1 Drive Sharing Permissions Allow External Data Disclosure

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
Findings (36)

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

The declared description says the skill builds and deploys safety-profiled gogcli binaries with compile-time command removal and supports choosing among restriction levels and building from PRs. The supplied code does not build anything, does not select or define profiles, and does not interact with PRs. Instead, it assumes a binary already exists locally and focuses narrowly on remote deployment and post-deployment verification. While deployment is part of the declared purpose, the primary behavior in this chunk is only a subset of that description and omits several key advertised capabilities. Therefore the description does not accurately represent what this code chunk actually does.

Content

No source excerpt is available for this finding.

Missing User Warnings

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

Credential setup, token export/import, keyring access, and related auth-management capabilities are highly sensitive and should not be silently bundled into a low-risk profile. These operations can expose authentication material, alter identities, or let an agent reconfigure trust boundaries, making the profile far more dangerous than its 'safety' branding suggests.

Content

No source excerpt is available for this finding.

Ssd 3

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

Allowing token export/import and credential listing creates a straightforward path for an LLM agent to retrieve, serialize, summarize, or otherwise leak sensitive authentication data through normal language outputs. In a skill intended for restricted-permission agent use, this is especially dangerous because it undermines account security and can enable downstream account compromise across connected services.

Content

No source excerpt is available for this finding.

Credential Access

High
Category
Privilege Escalation
Confidence
96% confidence
Finding

Enabling keyring access gives the agent a path to interact with stored credentials or authentication secrets, which is inconsistent with a restricted draft-oriented safety profile. In the context of an AI agent skill, credential-access functionality materially increases the risk of secret disclosure, account takeover, or privilege expansion if misused or prompted adversarially.

Content

Scanner excerpt · references/l1-draft.yaml (reported line 241)May include surrounding context.

yaml
set: true
    unset: true
  status: true
  keyring: true
  remove: true               # Logout
  tokens:
    list: true

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The L2 profile is described as a constrained 'Draft & Collaborate' tier, but it enables broad authentication and account-administration actions such as credential management, token export/import, keyring access, alias manipulation, and service-account configuration. These capabilities exceed collaboration needs and create a powerful privilege pivot: an agent operating under this profile could reconfigure identities, extract reusable secrets, or persist access beyond the intended workspace-scoped actions.

Content

No source excerpt is available for this finding.

Missing User Warnings

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

Sensitive credential, token, and service-account management functions are enabled in the manifest without prominent warnings or justification, despite the profile being presented as a safety-profiled collaboration tier. In practice, this normalizes high-risk secret-handling operations and makes accidental or abusive use more likely, especially by autonomous agents and users who rely on the profile description as a trust signal.

Content

No source excerpt is available for this finding.

Credential Access

High
Category
Privilege Escalation
Confidence
95% confidence
Finding

Enabling keyring access gives the profile direct interaction with locally stored secrets, which can expose credentials for this and potentially other services depending on implementation. In a supposedly constrained collaboration profile, this materially increases the blast radius from document-editing actions to credential discovery, extraction, or persistence operations.

Content

Scanner excerpt · references/l2-collaborate.yaml (reported line 248)May include surrounding context.

yaml
set: true
    unset: true
  status: true
  keyring: true
  remove: true
  tokens:
    list: true

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

Allowing token export/import in a collaboration profile exposes portable credentials that can be exfiltrated, replayed on another host, or swapped to impersonate other principals. This is especially dangerous in an agent context because it turns a bounded application permission set into transferable account access.

Content

No source excerpt is available for this finding.

Credential Access

High
Category
Privilege Escalation
Confidence
93% confidence
Finding

Enabling keyring and adjacent token-management capabilities grants access to stored credentials and authentication material, which is highly sensitive even in a legitimate auth-management section. In this skill's context, the danger is elevated because the profile is meant for an AI agent: if the agent is compromised, misprompted, or over-trusted, it could enumerate, export, delete, or otherwise manipulate credentials and expand access far beyond intended actions.

Content

Scanner excerpt · references/l3-standard.yaml (reported line 248)May include surrounding context.

yaml
set: true
    unset: true
  status: true
  keyring: true
  remove: true
  tokens:
    list: true

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
95% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

Scanner excerpt · scripts/build-gog-safe.sh (reported line 108)May include surrounding context.

sh
# Step 3: Generate command structs (must run on host platform)
echo "Generating command structs from profile..."
rm -f internal/cmd/*_cmd_gen.go
CGO_ENABLED=0 go run ./cmd/gen-safety --strict safety-profile.yaml

# Step 4: Build with cross-compilation if requested

Chaining Abuse

High
Category
Tool Misuse
Confidence
75% confidence
Finding

Tool calls are chained to bypass individual safety checks or escalate capabilities beyond what any single tool call would allow.

Content

Scanner excerpt · scripts/build-gog-safe.sh (reported line 137)May include surrounding context.

sh
echo ""
echo "To deploy to a remote host:"
echo "  scp $OUTPUT <host>:/tmp/gog-safe"
echo "  ssh <host> 'sudo mv /usr/local/bin/gog /usr/local/bin/gog-backup && sudo mv /tmp/gog-safe /usr/local/bin/gog && sudo chmod +x /usr/local/bin/gog'"
echo "  ssh <host> 'gog --version'"

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
95% confidence
Finding

The script unconditionally deletes /usr/local/bin/gog-backup before creating a new backup, which can destroy the last known-good binary and weaken rollback safety. Because the deletion is performed with sudo on the remote host, an operator can be left without a recoverable fallback if the new binary is bad or the deployment only partially succeeds.

Content

Scanner excerpt · scripts/deploy-gog-safe.sh (reported line 70)May include surrounding context.

sh
ssh "$HOST" '
  if [ -f /usr/local/bin/gog ]; then
    if [ -f /usr/local/bin/gog-backup ]; then
      sudo rm -f /usr/local/bin/gog-backup
    fi
    sudo mv /usr/local/bin/gog /usr/local/bin/gog-backup
  fi

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
88% confidence
Finding

The skill documents shell-based build, SSH deployment, backup, and verification actions but does not declare an explicit tool scope such as permissions or allowed-tools. In an agent setting, that omission can cause the skill to be invoked with broader shell access than reviewers or orchestrators expect, increasing the chance of unintended command execution on local or remote systems.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill claims L1/L2 cannot send email or chat, yet later acknowledges an allowed filter-creation command can auto-forward email. That undermines the stated safety boundary and could permit covert exfiltration or unauthorized outbound communication despite the profile being presented as non-sending.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
87% confidence
Finding

The documentation instructs users to replace a system binary on a remote host via SSH, including backup and install behavior, without a prominent warning that it modifies executable state on the target machine. In agent-driven contexts, this can lead to unreviewed production changes or deployment to the wrong host, especially because the action targets /usr/local/bin.

Content

No source excerpt is available for this finding.

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
82% confidence
Finding

The rollback command uses sudo to move binaries in a privileged system path, which normalizes root-level modification in an agent skill workflow. If executed on the wrong host or with a tampered backup file, this could restore or install an unintended executable with elevated trust implications.

Content

Scanner excerpt · SKILL.md (reported line 56)May include surrounding context.

4. Rollback

bash
ssh <host> 'sudo mv /usr/local/bin/gog-backup /usr/local/bin/gog'

How It Works

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The profile claims 'Nothing outbound' and frames actions that notify or affect other humans as blocked, yet it enables capabilities like Drive sharing/unsharing and Calendar ACL management that can change other users' access and visibility. This mismatch can cause an agent or operator to overtrust the profile and perform externally impactful actions under a supposedly safe L1 mode.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The activation philosophy is extremely broad and effectively authorizes almost any action that is not classified as outbound, without clear user-confirmation triggers or tighter task boundaries. In an agent setting, such vague permissioning increases the chance of high-impact but technically 'allowed' actions like deletion, permission changes, or large-scale modifications being taken from ambiguous natural-language requests.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The manifest enables destructive and access-changing Drive actions such as delete, share, unshare, and permissions without prominent warning at the point where the profile is described as safe. In practice, this can mislead users into granting or using a profile that can remove data or alter who can access it, contrary to the expected risk level of a draft-only configuration.

Content

No source excerpt is available for this finding.

Ssd 3

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

Drive sharing directly affects other users by granting access to content, which contradicts the profile's stated 'nothing outbound' safety model. Even if no notification is sent, the action changes external visibility and can expose sensitive data to unintended recipients.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
84% confidence
Finding

The profile text says there should be no direct messaging, yet Gmail capabilities include draft creation, update, deletion, label/filter changes, and vacation settings changes. While send is disabled, these broader mail and settings mutations still allow meaningful account and communication-state changes that contradict the stated safety boundary and may enable social-engineering prep, inbox manipulation, or indirect communication workflows.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

Enabling appscript.run gives the agent indirect execution capability that can trigger arbitrary logic, side effects, or data movement outside the narrowly described 'draft and collaborate' scope. Even if direct messaging is blocked elsewhere, script execution can become a bypass path for automation that performs actions the profile otherwise tries to prohibit.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
84% confidence
Finding

Broad aliases and generic capability names such as open, upload, login, auth.manage, and similar toggles are enabled without embedded constraints describing prohibited targets, contexts, or side effects. In an agent-facing safety manifest, ambiguity is dangerous because it increases the chance that tooling or downstream policy interprets these switches more broadly than the human-readable profile intent.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
84% confidence
Finding

The profile framing presents a full-write operational posture as the standard L3 capability set without documenting explicit user opt-in, escalation criteria, or decision points for choosing safer profiles. In the context of an AI-agent safety skill, this can normalize excessive permissions and increase the chance that agents are deployed with unnecessary authority.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The file defines an L3 profile with broad write and messaging authority, but the introductory policy text does not state any activation guardrails, approval requirements, or situational limits for using these high-impact capabilities. In an agent skill intended for restricted-permission deployment, missing usage constraints can lead to unsafe default enablement and over-privileged operation even if the manifest is technically valid.

Content

No source excerpt is available for this finding.