T09 · Insecure Skill Coding Practices
- Location
index.js:9- Finding
Hardcoded Google API Credential in Distributed Source Code
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This skill needs review because its documentation describes delegating work to local coding agents, but its shipped runtime sends user prompts to Google Gemini using an embedded API key and its examples encourage high-risk unsandboxed agent execution.
Review carefully before installing. Treat any prompt entered into this runtime as leaving the local environment for Google Gemini, assume the embedded API key is exposed and must be rotated, and avoid following the --yolo or commit/push examples unless the workdir, credentials, network access, and repository changes are explicitly isolated and approved.
index.js:9Hardcoded Google API Credential in Distributed Source Code
index.js:19Undisclosed Transmission of Complete User Prompts to Google Gemini
SKILL.md:195Documentation Encourages Coding-Agent Execution Without Sandbox or Approval Controls
SKILL.md:181Unpinned Global Installation of a Third-Party npm Package
The declared description says this skill delegates coding tasks to specific coding agents via a background process requiring PTY support. The actual code instead implements a simple terminal-driven wrapper around the Gemini API. Its primary function is to submit a coding prompt to an LLM endpoint and print the response. This is materially different from orchestrating external coding agents, background processes, or repository-aware workflows. It also introduces an undeclared capability/resource access: outbound HTTPS calls to Google's Gemini API with an embedded API key. Therefore the description does not accurately represent the code's actual behavior.
Skill reads from agent configuration directories (.claude/, .codex/, .gemini/). These directories may contain API keys, personal settings, and other credentials that the skill has no legitimate need to access.
## Codex CLI
**Model:** `gpt-5.2-codex` is the default (set in ~/.codex/config.toml)
### Flags
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).
gh pr create --repo user/repo --head fix/issue-78 --title "fix: ..." --body "..."
git worktree remove /tmp/issue-78 git worktree remove /tmp/issue-99
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).
git worktree remove /tmp/issue-78 git worktree remove /tmp/issue-99
---
Allowing delegated agents to run openclaw system event gives an external coding agent an internal signaling primitive that is unrelated to code generation itself. If the agent is prompt-influenced or compromised, it could emit misleading events, leak task details into system-wide channels, or trigger unintended orchestrator behavior under the authority of the parent environment.
The fixed workdir '/home/admin/code' grants predictable access to a local workspace even though the skill guidance says agents should not be spawned in restricted local workspaces and should often use temporary directories. This can expose sensitive repository contents, cause unintended modification of persistent files, and bypass the documented workspace safety model for delegated agents.
The implementation materially differs from the declared skill behavior: instead of delegating to Codex, Claude Code, or Pi via a background process, it sends user prompts to an external Gemini API. This is dangerous because users and orchestration systems may grant the skill trust, permissions, or sensitive coding tasks based on the manifest, while the actual code exfiltrates task content to an undeclared third party.
The file contains a hardcoded Google/Gemini API key and an undeclared external model endpoint. Hardcoded secrets are highly sensitive because they can be extracted by anyone with code access, abused for unauthorized API usage, billing fraud, and unapproved data transmission to an external service.
Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.
For quick prompts/chats, create a temp git repo and run:
# Quick chat (Codex needs a git repo!)
--full-auto removes normal approval checkpoints for workspace changes. Although safer than --yolo, it still authorizes an LLM-driven coding agent to make potentially broad modifications automatically, which can be dangerous in sensitive repositories or when prompts are attacker-influenced.
| Flag | Effect |
| --------------- | -------------------------------------------------- |
| `exec "prompt"` | One-shot execution, exits when done |
| `--full-auto` | Sandboxed but auto-approves in workspace |
| `--yolo` | NO sandbox, NO approvals (fastest, most dangerous) |
### Building/Creating
--yolo is explicitly described as disabling both sandboxing and approvals, which materially increases the chance that a delegated agent can perform dangerous actions without human checkpoints. In this skill, that autonomy is paired with shell execution in real project directories, making accidental or adversarial modifications significantly more harmful.
| --------------- | -------------------------------------------------- |
| `exec "prompt"` | One-shot execution, exits when done |
| `--full-auto` | Sandboxed but auto-approves in workspace |
| `--yolo` | NO sandbox, NO approvals (fastest, most dangerous) |
### Building/Creating
The example normalizes one-shot --full-auto building in a real project directory, encouraging users to let a delegated agent modify code without review. This lowers the barrier to unsafe autonomous execution and could lead to damaging or policy-violating changes if the prompt or repository content is untrusted.
# Quick one-shot (auto-approves) - remember PTY!
bash pty:true workdir:~/project command:"codex exec --full-auto 'Build a dark mode toggle'"
# Background for longer work
The manifest describes this as a coding-agent orchestration skill for delegating coding work to other agents. However, the documented behavior includes git clone from GitHub and gh pr comment, which extends beyond merely spawning coding agents into direct remote repository interaction and publishing review output.
Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.
For fixing multiple issues in parallel, use git worktrees:
# 1. Create worktrees for each issue
git worktree add -b fix/issue-78 /tmp/issue-78 main
git worktree add -b fix/issue-99 /tmp/issue-99 main
The skill promotes --full-auto and especially --yolo modes, including examples that install dependencies, modify code, commit, and push, but does not consistently require explicit human approval or warn about system integrity and data risks at the point of use. In a coding-agent context, unsandboxed autonomous execution can lead to destructive filesystem changes, credential misuse, or unintended repository writes.
The rules section operationalizes --full-auto for building, reinforcing autonomous code changes as a standard workflow. In a skill dedicated to launching external agents, this increases risk because the skill is effectively recommending reduced oversight in exactly the scenarios where prompt injection and repository-borne instructions are plausible.
- If an agent fails/hangs, respawn it or ask the user for direction, but don't silently take over.
3. **Be patient** - don't kill sessions because they're "slow"
4. **Monitor with process:log** - check progress without interfering
5. **--full-auto for building** - auto-approves changes
6. **vanilla for reviewing** - no special flags needed
7. **Parallel is OK** - run many Codex processes at once for batch work
8. **NEVER start Codex in ~/.openclaw/** - it'll read your soul docs and get weird ideas about the org chart!
The auto-notify section instructs delegated agents to invoke an OpenClaw system command on completion, which extends the skill from coding delegation into cross-agent signaling. That creates an unexpected control channel from an external spawned agent back into the host orchestration environment, increasing the risk of unauthorized event generation or misuse of trusted internal commands.
The manifest expands the skill from a narrowly scoped delegated coding orchestrator into a general-purpose programming assistant with code generation, debugging, file management, and terminal execution. That broader scope increases the chance the agent will perform higher-risk actions than users expect, weakening least-privilege boundaries and making misuse or unsafe task routing more likely.
The manifest description is written entirely in Chinese and presents the skill as a Chinese-language programming assistant, with no indication that users can choose another language or locale. This creates a natural-language policy concern because it implies a fixed language experience without explicit opt-in or documented regional scope.
The comments explicitly describe Gemini integration, contradicting the stated identity of the skill as a delegator to other coding agents. Contradictory documentation increases supply-chain and trust risk because reviewers may approve the skill based on the manifest while the code performs materially different external actions.
User input is transmitted to an external API without any notice, consent, or data-classification guardrails. In the context of a coding skill, prompts may contain proprietary source code, credentials, PR contents, or security-sensitive implementation details, so undisclosed external transmission creates a real confidentiality risk.
The manifest promises iterative coding workflows with repository exploration, temp-dir PR review, and refactoring support, but the code is only a stdin-to-LLM wrapper. This mismatch can cause users to rely on isolation and workflow guarantees that do not exist, increasing the chance that sensitive code or review content is handled in an unsafe or unintended way.
The completion notification example tells the child agent to send a summary string through a system event channel without warning that task details may leave the immediate execution flow. While the leaked text may be brief, it still creates an unnecessary disclosure path for repository names, feature work, or other sensitive activity metadata.
The embedded instruction requires the assistant to add clear Chinese comments, which imposes a specific language preference on generated output. This is a natural-language locale policy issue because the skill does not provide opt-in, fallback, or any justification for forcing Chinese.
No suspicious patterns detected.