T09 · Insecure Skill Coding Practices
- Location
scripts/aippt.sh:11- Finding
Arbitrary Shell Execution Through Executable .env Configuration
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill is a real AiPPT integration, but its local credential handling and broad activation scope need review before installation.
Install only if you are comfortable sending presentation topics, URLs, and selected local documents to AiPPT.cn. Prefer platform-managed secrets over a local .env file, avoid installing in shared writable directories, and clear or protect the token cache if you use the skill.
scripts/aippt.sh:11Arbitrary Shell Execution Through Executable .env Configuration
scripts/aippt.sh:83Reusable Authentication Token Stored in an Unprotected Plaintext Cache
The skill explicitly supports selecting an external model/provider and enabling web search, which can route user content to third-party processing or external retrieval paths. This increases data exposure and compliance risk if users are not clearly informed which provider is used, what data is sent externally, and whether web search is enabled.
bash scripts/aippt.sh senior_options_pretty bash scripts/aippt.sh generate "标题" --outline-only bash scripts/aippt.sh generate "标题" --options '{"page":3,"group":6,"scene":18,"tone":40,"language":47}' bash scripts/aippt.sh generate "标题" --model "deepSeek-v3" --web-search --options '{"page":3,"group":6,"scene":18,"tone":40,"language":47}' bash scripts/aippt.sh generate_continue "<task_id>" ""
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
SKILL_DIR="$(dirname "$SCRIPT_DIR")"
ENV_FILE="${SKILL_DIR}/.env"
TOKEN_CACHE="${SKILL_DIR}/.token_cache.json"
BASE_URL="https://co.aippt.cn"
Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.
fi
local ts; ts=$(date +%s)
local sig; sig=$(generate_signature "GET" "/api/grant/token/" "$ts")
local resp; resp=$(curl -sL "${BASE_URL}/api/grant/token/?uid=${UID_VALUE}" \
-H "x-api-key: ${APP_KEY}" -H "x-timestamp: ${ts}" -H "x-signature: ${sig}")
local token exp cached_at
token=$(echo "$resp" | python3 -c "import sys,json;print(json.load(sys.stdin)['data']['token'])")
Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.
[ -n "$senior_opts" ] && curl_args+=(--data-urlencode "senior_options=${senior_opts}")
[ -n "$is_web_search" ] && curl_args+=(--data-urlencode "is_web_search=${is_web_search}")
[ -n "$preset_id" ] && curl_args+=(--data-urlencode "id=${preset_id}")
curl "${curl_args[@]}"
;;
*)
# 其余类型:文件上传(file 字段)
Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.
[ -n "$senior_opts" ] && curl_args+=(--data-urlencode "senior_options=${senior_opts}")
[ -n "$is_web_search" ] && curl_args+=(--data-urlencode "is_web_search=${is_web_search}")
[ -n "$preset_id" ] && curl_args+=(--data-urlencode "id=${preset_id}")
curl "${curl_args[@]}"
;;
*)
# 其余类型:文件上传(file 字段)
Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.
cmd_word() {
local task_id="${1:?用法: word <task_id>}"
local token=$(get_token)
curl -s --max-time 180 -N "${BASE_URL}/api/ai/chat/v2/word?task_id=${task_id}" \
-H "x-api-key: ${APP_KEY}" -H "x-channel;" -H "x-token: ${token}"
}
Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.
cmd_word() {
local task_id="${1:?用法: word <task_id>}"
local token=$(get_token)
curl -s --max-time 180 -N "${BASE_URL}/api/ai/chat/v2/word?task_id=${task_id}" \
-H "x-api-key: ${APP_KEY}" -H "x-channel;" -H "x-token: ${token}"
}
Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.
curl_args+=(-F "files=@${f}")
done
local create_resp
create_resp=$(curl "${curl_args[@]}")
check_resp "$create_resp" "create"
local task_id
task_id=$(echo "$create_resp" | python3 -c "import sys,json;print(json.load(sys.stdin)['data']['id'])" 2>/dev/null)
The listed triggers include very general phrases such as '做 PPT', '生成 PPT', and '创建演示文稿', which are broad natural-language requests that could match ordinary conversation rather than a narrowly scoped invocation. The document does not provide exclusion conditions or negative examples to clarify when this skill should not activate.
The script sends user-specified file content to an external API via curl, including raw file uploads and markdown content ingestion, without an explicit privacy notice at the point of transfer. In an agent skill context, that omission is security-relevant because users may not realize local files are leaving the host environment.
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
cmd_word() {
local task_id="${1:?用法: word <task_id>}"
local token=$(get_token)
curl -s --max-time 180 -N "${BASE_URL}/api/ai/chat/v2/word?task_id=${task_id}" \
-H "x-api-key: ${APP_KEY}" -H "x-channel;" -H "x-token: ${token}"
}
The function uploads one or more local reference documents to a third-party API using multipart form data, but there is no explicit consent or privacy warning at the operation site. Because these files may contain confidential business data, the main risk is unintended data exfiltration to an external service rather than code execution.
The trigger list includes very broad, generic phrases such as "PPT", "presentation", "slides", and "generate PPT", which are likely to match many normal user requests outside a narrowly intended invocation scope. This can cause unintended skill activation and route user content to an external PPT-generation service, increasing the chance of inappropriate data sharing or user confusion about which tool is handling the request.
The trigger and configuration text includes controlling '语言' as part of the skill behavior, but the document does not explicitly state that language choice should be user-selected rather than assumed. This creates some risk that the skill could force or default to a language without clear user opt-in.
Natural-language strings throughout the script, including usage text and error messages, force a Chinese-language interaction model. Under the stated policy, a fixed language/locale should not be imposed unless the user is given a choice or the locale constraint is clearly documented and justified.