T09 · Insecure Skill Coding Practices
- Location
templates/WORKSPACE-TEMPLATE.md:32- Finding
Workspace Templates Encourage Plaintext Credential Storage
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This workspace setup skill is generally purpose-aligned, but users should review it because it can overwrite existing workspace files and its documentation may lead users to store or publish sensitive workspace data.
Install only if you are comfortable reviewing generated files before use. Run bootstrap or wizard in a new empty directory, back up any existing workspace first, avoid storing plaintext secrets in TOOLS.md or user-data/apis, and do not use git add . or copy user-data until you have reviewed and excluded private data.
templates/WORKSPACE-TEMPLATE.md:32Workspace Templates Encourage Plaintext Credential Storage
scripts/bootstrap.sh:36Bootstrap Script Silently Overwrites Existing Core Workspace Files
The skill explicitly advertises one-command workspace creation and automatic generation of directories and core files, but it does not warn users that it will modify the filesystem or potentially overwrite existing content. In a bootstrap skill, omission of scope, overwrite behavior, and confirmation requirements can lead to unintended data loss or corruption if run in the wrong directory or against an existing workspace.
The migration/check scenario presents the skill as suitable for upgrading an existing workspace, but it does not clarify whether the check operation is read-only or whether migration-related use may alter files and structure. This ambiguity is dangerous because users may invoke the skill on valuable existing workspaces assuming it is safe, leading to accidental modification or overwrite of user data.
The quickstart explicitly tells users to initialize a Git repository and push the generated workspace, but the workspace contains files like SOUL.md, USER.md, MEMORY.md, and user-data that may hold personal, operational, or sensitive configuration details. Without any warning, review step, or .gitignore guidance, users may unintentionally publish private data to a remote repository.
The guide recommends copying USER.md and the entire user-data directory between machines via scp, which can transfer personal information and other sensitive workspace state without any data-classification warning or minimization guidance. Although scp is encrypted in transit, the risk is inadvertent propagation of sensitive files to unmanaged hosts, overbroad copying, and poor handling of private user content.
The USER.md example states that all time display, dialogue, and scheduled tasks must use local time, and the setup example hard-codes Asia/Shanghai. This imposes a locale/timezone convention in natural language without indicating that users may choose a different locale or opt in to that behavior.
The guide instructs users to git add . and push the entire workspace to a remote repository without warning that the workspace may contain sensitive material such as USER.md, memory files, reports, temp data, or other private workspace content. In an agent workspace context, this increases the chance of unintentional data exfiltration to shared or public remotes.
The README is entirely written in Chinese and defines the skill/persona configuration in Chinese without any indication that users may choose another language or that the skill is intended only for a Chinese-language context. This creates a natural-language locale policy concern because the file appears to prescribe a single language experience without opt-in.
The README presents the skill's identity, instructions, and configuration exclusively in Chinese, which can amount to forcing a specific language without user opt-in. The policy allows locale constraints only when explicitly offered as a choice or clearly justified as region-specific, neither of which is stated here.
The script copies template files directly into the target workspace using fixed destination names and does not check whether those files already exist. If run against an existing workspace, it can silently overwrite user-maintained documentation or configuration, causing data loss or corruption of the workspace state.
This shell script contains user-facing natural language in Chinese, starting with the header comment and continuing throughout its status messages. Under the policy, forcing a specific language without user opt-in is a natural-language policy violation unless the locale constraint is clearly documented and justified, which is not present here.
The script unconditionally writes SOUL.md and USER.md using shell redirection, which will overwrite any existing files at those paths without prompting or creating backups. Because WORKSPACE_ROOT is user-controllable and the wizard is intended to run in an existing workspace, this can cause accidental destruction of prior configuration or user-authored content.
The generated text states that all time display, dialogue, and scheduled tasks must use local time and must not use UTC, using mandatory language. This imposes a locale policy unconditionally rather than offering a user choice or documenting a justified region-specific constraint.
Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.
## Red Lines
- Don't exfiltrate private data. Ever.
- Don't run destructive commands without asking.
- `trash` > `rm` (recoverable beats gone forever)
- When in doubt, ask.
The template authorizes periodic deletion of files in temp/ older than 7 days without describing confirmation requirements, scope restrictions, dry-run behavior, or failure safeguards. In an agent skill context, undocumented autonomous deletion increases the risk of unintended data loss, especially if temp/ is mis-scoped, symlinked, or contains user-important files.
Lines L31-L34 describe the heartbeat as limited to self-check behavior and exception-only notifications. However, elsewhere the same file assigns the heartbeat active business and maintenance operations, including immediate handling/pushing of urgent matters, calendar reminders, memory updates, and temp-file cleanup. This is an intent-level contradiction within the documentation.
The entire template content, headings, and instructions are written in Chinese, which imposes a specific language/locale on skill users without offering any choice or opt-in. The policy allows locale constraints only when explicitly justified or when users are given a language option, neither of which appears here.
This markdown template uses Chinese throughout headings, examples, and instructions, which can impose a specific language on users without any opt-in or stated regional justification. The policy requires flagging language or locale constraints when the skill does not explicitly offer a language choice.
The template instructs that all displayed times, conversations, and scheduled tasks must use Beijing time (UTC+8) and explicitly forbids UTC. This is a natural-language locale/timezone policy constraint applied universally, without offering user choice or framing it as a justified region-specific requirement.
This markdown file contains all user-facing instructions and examples in Chinese, but does not provide an opt-in, alternative language, or justification for the locale constraint. Under the policy, forcing a specific language without user choice can be a natural-language policy violation.
The template explicitly suggests a TOOLS.md file for API keys, SSH, and related configuration but provides no warning against storing plaintext secrets in the workspace. In a shared or synced workspace, this can lead to accidental credential exposure through version control, backups, logs, or cross-agent access.
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.
配置方法:
# 编辑 crontab
crontab -e
# 添加任务
0 3 * * 0 cd /path/to/workspace && python3 scripts/validate-index-paths.py
The script's comments, user-facing output, and interactive test inputs are all fixed in Chinese, and it also hard-codes the timezone value "Asia/Shanghai". This imposes a specific language/locale without offering a choice or documenting a justified region-specific constraint, which matches the policy-violation criteria.
This shell script contains exclusively Chinese comments, echo output, and here-doc input values, which imposes a specific language/locale on users and test execution. Under the policy, forcing a language without user opt-in or a clearly documented region-specific justification is a natural-language policy violation.
This shell script contains user-facing output and instructional comments only in Chinese, which imposes a language choice on users without opt-in. The policy requires flagging language or locale constraints unless the file offers a language choice or clearly documents a justified region-specific limitation.
This shell script's comments and all user-facing echo messages are in Chinese, which imposes a specific language on users and operators. Under the policy, language constraints should either be optional/opt-in or clearly justified as region-specific; neither is present in this file.