T09 · Insecure Skill Coding Practices
- Location
scripts/collect_bp_month_evidence.py:505- Finding
API Credential Exposure Through Command-Line Arguments
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill is coherently built for BP monthly report drafting, but it needs review because its helper scripts handle internal report data and credentials and can write or overwrite files with weak path controls.
Install only for a trusted BP reporting environment. Use a dedicated least-privilege API key, avoid putting the key in shell history or shared scripts, write outputs only to a private dedicated directory, and do not run the artifact builder on untrusted run directories until path containment and safe YAML parsing are fixed.
scripts/collect_bp_month_evidence.py:505API Credential Exposure Through Command-Line Arguments
scripts/generate_scheme_v2_monthly_reports.py:737Path Traversal Through Unvalidated Report Directory Components
scripts/build_dual_report_artifacts.py:58Potentially Unsafe YAML Deserialization Through Ruby
Skill instructs the agent to omit warnings, disclaimers, or ethical commentary. Stripping safety caveats hides risk from the user and is a common jailbreak preamble.
4. exposed risks or blockers
5. action progress as support only
Do not judge the light only from action count.
## Default rules
Skill instructs the agent to omit warnings, disclaimers, or ethical commentary. Stripping safety caveats hides risk from the user and is a common jailbreak preamble.
4. exposed risks or blockers
5. action progress as support only
Do not judge the light only from action count.
## Default rules
Skill instructs the agent to omit warnings, disclaimers, or ethical commentary. Stripping safety caveats hides risk from the user and is a common jailbreak preamble.
4. exposed risks or blockers
5. action progress as support only
Do not judge the light only from action count.
## Default rules
The skill hard-codes a Chinese opening pattern and strongly implies Chinese-language interaction without checking the user's language preference. This can override user intent, reduce transparency, and cause incorrect or inaccessible outputs in multilingual environments, especially when the user expects another language for business or compliance reasons.
This file is explicitly a Simplified Chinese skill description (business-description.zh-CN.md), and the content is entirely written as if Chinese is the required interaction/output language. There is no indication that users may choose another language, nor any justification that the skill is region- or compliance-bound to Chinese only.
The file is written as a Chinese-language skill design document and labels the artifact as a Chinese locale variant (zh-CN) without any indication that users may choose another language or locale. Under the stated policy, forcing a specific language without opt-in is a natural-language policy concern unless the locale restriction is explicitly justified.
The document prescribes specific Chinese field labels and output wording such as 本月总体判断 and 对下月的总体判断, and later provides additional Chinese-only rendering patterns. For a general writing-conventions reference, this imposes a specific language/locale on users without stating that the skill is region-specific or offering a language choice.
This markdown file includes required section names in Chinese and instructs the writer to use them as fixed report structure. Because the file does not offer a language or locale choice, and no region-specific justification is provided, it appears to enforce a specific language without user opt-in.
The summary section requires additional Chinese headings and ties report generation to that language-specific structure. This reinforces a language policy constraint, but the file does not explain that the skill is limited to a Chinese-language workflow or provide a user choice.
The rendering rules require final user-facing report lines and human-review prompts to use fixed Chinese text such as “判断理由”, “人工判断”, and subtype prompts. This imposes a specific language on outputs without user opt-in or any documented region-specific justification, which matches the language/locale policy violation category.
The file includes user-facing response guidance and examples exclusively in Chinese, presenting that phrasing as the preferred interaction pattern. Because the workflow does not mention any user language preference, opt-in, or locale-specific justification, this can violate a language/locale policy requiring user choice.
subprocess module calls execute external commands. Without careful input validation, this enables command injection.
f"data = YAML.load_file({json.dumps(str(path))}); "
"puts JSON.generate(data)"
)
raw = subprocess.check_output(["ruby", "-e", ruby], text=True)
return json.loads(raw)
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
def api_post(app_key: str, endpoint: str, payload: dict) -> dict:
resp = requests.post(
f"{BASE_URL}{endpoint}",
json=payload,
headers={"appKey": app_key, "Content-Type": "application/json"},
The script persists report-derived titles, authors, reply excerpts, node comments, task IDs, timestamps, and extracted progress facts into a local Markdown manifest. Because the source data appears to come from internal work-report systems and may contain sensitive operational or personnel information, writing it to disk without minimization controls, redaction, encryption, or an explicit warning increases the risk of unintended local disclosure and downstream sharing.
The code performs requests.get() calls to an external API using the supplied app key in headers and period/group identifiers in query parameters, but the file contains no warning comment, docstring notice, or runtime message explaining that these values are sent over the network. For code files, outbound transmission of potentially sensitive system or organizational data should have some visible disclosure unless already clearly documented.
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.
users = task_obj.get("taskUsers") or []
names = []
for user in users:
for emp in user.get("empList") or []:
name = emp.get("name")
if name:
names.append(name)
In this code file, the script retrieves remote data and persists it with output.write_text(), but there is no prior confirmation prompt, warning comment, or user-facing disclosure that data will be written to disk. Because the payload includes goal, owner, and assignee information, silently creating or overwriting a file can affect user data handling expectations.
The script generates and persists multiple Markdown, YAML, and manifest files containing employee names, organizational paths, group IDs, report links, progress facts, replies, and review content to an arbitrary output directory without any consent prompt, data-classification warning, redaction step, or access-control enforcement. In this skill context, the data is clearly business-operational and personnel-related, so unattended batch export materially increases the risk of accidental disclosure through shared folders, source control commits, backups, or downstream processing.
This markdown file includes a required example link label in Chinese (工作汇报标题) but does not indicate that the skill is limited to a Chinese-language environment or give users an option to choose another language/locale. Under the policy, forcing a specific language without opt-in can be a natural-language policy violation.
This markdown file contains natural-language references whose visible titles are only in Chinese, while the rest of the document is in English. Because the skill does not indicate that Chinese-language materials are required or offer an alternative language path, it may impose a language constraint without user opt-in.
No suspicious patterns detected.