Back to skill

Security audit

Google Docs Read Document

Security checks for vulnerabilities and agentic risk

Overview

The skill has a clear purpose, but its command template uses an unvalidated Google Doc ID in a terminal command, which users should review before installing.

Install only if you trust the source of document IDs and your agent/runtime safely passes CLI arguments. Prefer updating the skill to validate Google Doc IDs and invoke gog as structured arguments rather than concatenating a shell command string.

Vulnerability Patterns
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • 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
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (1)

T09 · Insecure Skill Coding Practices

Error
Location
SKILL.md:20
Finding

Potential Command Injection Through an Unvalidated Document ID

Content
View full analysis
`] ## Schema Example ```json { "command": "gog docs cat doc_id_123" } ``` ``` ### Technical Analysis The skill directs the agent to interpolate a document ID into the command string `gog docs cat `. It does not require validation, shell-safe quoting, or invocation through a structured argument array. If the document ID is attacker-controlled and the generated command is passed through a command shell, shell metacharacters can terminate or extend the intended command. The `gog` operation itself is consistent with the skill's declared purpose; the vulnerability arises from the unspecified and potentially unsafe handling of the dynamic `docId` value. For example, a value containing a command separator could cause the shell to interpret trailing text as another command rather than as a Google document identifier. Exploitability therefore depends on whether the calling agent uses a shell and permits an attacker to influence the identifier. ### Attack Path 1. An attacker supplies or influences the Google document ID presented to the agent. 2. The attacker includes shell syntax in the value, such as `valid_id; attacker_command`. 3. The agent substitutes that value into the documented command template. 4. The resulting command is executed through a shell. 5. The shell runs the appended command with the privileges of the agent process. ### Impact Assessment Successful exploitation could permit arbitrary local command execution under the account running the agent. Depending on that account's privileges and environment, an attacker could read accessible local files and credentials, modify project or user dat ...[truncated 246 chars]
Remediation
View remediation
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep