Back to skill

Security audit

Business Plan Cn

Security checks for vulnerabilities and agentic risk

Overview

This skill appears to be a legitimate Chinese business-plan helper, but its scripts contain a confirmed command-execution vulnerability and undisclosed local logging of user input.

Review this skill before installing. Use it only with trusted inputs, avoid passing sensitive business ideas or drafts to the bundled content script, and do not let untrusted users or generated text populate numeric financial fields until the scripts validate inputs and make logging explicit and controllable.

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 (2)

T09 · Insecure Skill Coding Practices

Error
Location
scripts/bp.sh:12
Finding

Command Injection Through Unvalidated Bash Arithmetic Expressions

Content
View full analysis
= 100000000 )); then printf "%.2f亿" "$(echo "scale=2; $n/100000000" | bc)" elif (( n >= 10000 )); then printf "%.1f万" "$(echo "scale=1; $n/10000" | bc)" else printf "%d" "$n" fi } ``` Additional unsafe arithmetic evaluations include: ```bash if (( monthly_rev > monthly_cost )); then bep_months=$(echo "scale=1; $invest / ($monthly_rev - $monthly_cost)" | bc) else bep_months="N/A (亏损状态)" fi ``` ```bash if (( invest > 0 )); then recovery=$(pct "$cum_profit" "$invest") else recovery="∞" fi ``` The affected values originate from command-line arguments without numeric validation: ```bash case "$CMD" in generate) # 解析参数: name industry invest monthly_rev monthly_cost growth IFS='|' read -ra ARGS <<< "$(echo "$INPUT" | sed 's/ */|/g')" name="${ARGS[0]:-我的项目}" industry="${ARGS[1]:-科技}" invest="${ARGS[2]:-1000000}" monthly_rev="${ARGS[3]:-200000}" monthly_cost="${ARGS[4]:-150000}" growth="${ARGS[5]:-15}" generate_bp "$name" "$industry" "$invest" "$monthly_rev" "$monthly_cost" "$growth" ;; ``` ### Technical Analysis Bash arithmetic contexts such as `(( n >= 100000000 ))` do not merely convert an arbitrary string into an integer. Bash treats the variable value as another arithmetic expression and recursively evaluates constructs within it. Certain arithmetic constructs, particularly array subscripts, can trigger command substitutions embedded in attacker-controlled values. The `generate` command accepts investment, revenue, cost, and growth values from command-line arguments. These values are not checked against a strict numeric format before being used in arithmetic expressions. ...[truncated 2154 chars]
Remediation
View remediation
&2 exit 2 fi } require_uint "investment" "$invest" require_uint "monthly revenue" "$monthly_rev" require_uint "monthly cost" "$monthly_cost" require_uint "growth rate" "$growth" ``` 2. If decimal values are required, define and enforce an explicit format such as `^[0-9]+([.][0-9]+)?$`. 3. Enforce sensible upper bounds to prevent integer overflow and denial-of-service behavior from extremely large numbers. 4. Do not treat failure from `bc` as a valid zero result. Return an error and terminate processing when a numeric expression cannot be parsed. 5. Avoid using untrusted variable contents directly in `(( ... ))`. Perform validation first and keep all subsequent arithmetic limited to validated canonical numbers. 6. Preserve command-line argument boundaries by using positional parameters or arrays directly rather than flattening all arguments into `INPUT="$*"` and reparsing them with `sed`. 7. Add regression tests containing arithmetic-expression payloads, array-subscript payloads, shell metacharacters, negative numbers, decimals, and oversized values. ]]>

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/script.sh:34
Finding

Undisclosed Persistent Plaintext Logging of User-Supplied Content

Content
View full analysis
> "$DATA_DIR/history.log"; } ``` The logging function is invoked by nearly every content-processing command: ```bash cmd_write() { echo " 主题: $1 字数: ${2:-500}字" _log "write" "${1:-}" } cmd_title() { echo " 1. ${1}全攻略 2. 关于${1}你不知道的事 3. ${1}避坑指南" _log "title" "${1:-}" } cmd_outline() { echo " 1. 引言 | 2. 背景 | 3. 要点 | 4. 总结 | 5. 互动" _log "outline" "${1:-}" } cmd_polish() { echo " 润色建议: 简洁 | 有力 | 口语化 | 加emoji" _log "polish" "${1:-}" } cmd_hashtag() { echo " #$1 #${1}分享 #干货 #推荐 #日常" _log "hashtag" "${1:-}" } cmd_platform() { echo " 知乎: 长文深度 | 小红书: 图文种草 | 公众号: 专业输出" _log "platform" "${1:-}" } cmd_hot() { echo " 查看微博热搜/知乎热榜/抖音热点" _log "hot" "${1:-}" } cmd_template() { echo " 测评 | 教程 | 种草 | 避坑 | 合集 | 对比" _log "template" "${1:-}" } cmd_translate() { echo " 翻译: $*" _log "translate" "${1:-}" } cmd_proofread() { echo " 检查: 错别字 | 标点 | 逻辑 | 敏感词" _log "proofread" "${1:-}" } ``` ### Technical Analysis The script records the first argument supplied to most commands in `$DATA_DIR/history.log`. These arguments may include confidential business topics, unpublished plans, draft text, translation content, customer information, or other sensitive material. The logging is automatic rather than opt-in. The main skill documentatio ...[truncated 1760 chars]
Remediation
View remediation
> "$DATA_DIR/history.log" ``` 9. Add tests that verify no user content is written when logging has not been explicitly enabled. ]]>
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
Findings (5)

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The description explicitly says to use the skill for "business plan cn" capabilities and presents the skill primarily as a Chinese business-plan generator. This imposes a language/locale constraint without offering the user a choice or documenting an opt-in, which violates the language/locale policy criterion.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The script's description, help text, and generated business-plan content are written entirely in Chinese, which effectively forces a specific language on users. The file does not present this as an opt-in choice or justify it as a region-specific skill, so it conflicts with the language/locale policy criteria.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The script is explicitly labeled as a Chinese content creation tool and its command descriptions and outputs are fixed in Chinese. This creates a language/locale constraint without any user opt-in or documented alternative, which matches the policy violation criteria for forced language behavior.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The script records user-supplied input into a local history file via _log without notifying the user or providing an opt-in/out control. If users enter sensitive business ideas, drafts, or translated text, that content will persist on disk and may be exposed to other local users, backups, or later collection by unrelated tooling.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

This markdown file contains user-facing instructional content entirely in Chinese, but it does not indicate that the language is optional, user-selected, or limited to a justified region-specific context. That can violate language/locale policy when users are not given a choice or advance notice.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.