T09 · Insecure Skill Coding Practices
- Location
scripts/humanize.py:41- Finding
Unrestricted API endpoint can expose the bearer token and submitted documents
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This skill does what it advertises, but it sends user text and an API key to a configurable external endpoint without enough safeguards or disclosure.
Review before installing. Do not use this skill on confidential, regulated, or private drafts unless you are comfortable sending the text to a remote LLM service. Keep API_BASE unset or restrict it to the intended MiniMax HTTPS endpoint, use a revocable API key, and be aware that the rewriting instructions may add voice or opinions not present in the source.
scripts/humanize.py:41Unrestricted API endpoint can expose the bearer token and submitted documents
scripts/requirements.txt:1Open-ended and unhashed dependency installation is not reproducible
The request destination is derived from the API_BASE environment variable and user text is sent to that URL with the Authorization bearer token. If API_BASE is changed to an attacker-controlled host, the script will exfiltrate both sensitive input text and the API credential, creating an SSRF-style outbound exfiltration path.
}
try:
response = requests.post(url, headers=headers, json=payload, timeout=120)
except requests.exceptions.Timeout:
raise RuntimeError("API 请求超时(超过120秒),请检查网络连接后重试。")
except requests.exceptions.ConnectionError:
The skill uses 'env' capability that is not listed in its permissions. This may indicate deceptive intent or missing permission declarations.
The README instructs users to provide an API key and use a third-party MiniMax service to process input text, but it does not clearly warn that user-supplied content may be transmitted off-device to an external provider. Because this skill is specifically meant to process arbitrary user writing, that text may include sensitive drafts, business material, or personal data, creating a real privacy and compliance risk if users assume local-only handling.
The usage guidance lists broad 'use when' conditions but does not define when the skill should not be used, making accidental or overbroad activation more likely. Because this skill's purpose is to conceal AI-generation patterns, imprecise scoping increases the chance it is applied in contexts involving plagiarism, authorship misrepresentation, or policy evasion.
The invocation phrase 'Please humanize' is broad enough to match normal editing, polishing, or rewriting requests, so the skill may activate outside its intended scope. In context, this is risky because the skill is specifically designed to remove AI-detection signals, which can be applied to deception-oriented use cases without an explicit user acknowledgment.
The file presents core operational instructions and the strength-mode table partly in Chinese while other sections are in English, and it advertises Chinese support without clarifying output-language behavior or asking for user preference. This can impose a language/locale assumption on users without opt-in.
The two embedded prompts conflict on a core safety/property-preservation rule: the first says not to add the model's own views or alter facts, while the second explicitly encourages adding opinions, first-person voice, and 'human messiness.' That inconsistency can cause the agent to drift from faithful editing into content fabrication or author-impersonation, especially when transforming sensitive or factual text.
The first-round prompt says to preserve the original tone and forbids adding the model's own views (L505-L510), but the second-round prompt explicitly instructs the model to add human voice, opinions, attitude, first person, and uncertainty (L526-L532). These directions conflict on the intended behavior of the skill and could cause output that departs from the source text despite earlier documentation promising preservation.
This markdown file includes explicit language-specific operating guidance such as '中文场景特殊处理' and prescribes Chinese writing conventions for outputs, while only later adding English as a supplemental case. Because the document frames Chinese handling as the default methodology and does not state that language should follow user preference, it creates a natural-language locale policy concern.
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
}
try:
response = requests.post(url, headers=headers, json=payload, timeout=120)
except requests.exceptions.Timeout:
raise RuntimeError("API 请求超时(超过120秒),请检查网络连接后重试。")
except requests.exceptions.ConnectionError:
The tool transmits user-supplied text to an external LLM service but does not provide a clear runtime disclosure or consent mechanism. Users may pass confidential drafts, proprietary content, or personal data without realizing it leaves the local environment.
The script reads an API key from an environment variable to authenticate outbound requests. While this is a normal implementation pattern, the code provides no explicit user disclosure at runtime that credentials from the environment will be used for remote service access.
The dependency is specified as requests>=2.28.0, which allows any future version above that floor to be installed. This weakens reproducibility and can unintentionally pull in vulnerable or breaking releases during deployment, making supply-chain risk harder to control and audit.
requests>=2.28.0
Because requests is not pinned, it is impossible to verify from this manifest whether the installed version is affected by one of the known advisories for that package. The main risk is uncertainty: environments may resolve to different versions, including ones with disclosed security issues, which complicates assurance and incident response.