T09 · Insecure Skill Coding Practices
- Location
index.py:15- Finding
Documents and Bearer Credentials Are Transmitted Over Plaintext HTTP
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This skill does what it claims, but it sends user-selected documents and optional API credentials to a remote parser over a default plaintext HTTP endpoint.
Install only if you are comfortable sending chosen PDFs, images, or Word documents to the configured parsing service. Do not use the default HTTP endpoint for sensitive documents or API keys; prefer a trusted HTTPS endpoint, understand who operates it and how data is retained, and use revocable credentials. Pin or lock dependencies before deploying in a controlled environment.
index.py:15Documents and Bearer Credentials Are Transmitted Over Plaintext HTTP
requirements.txt:1Dependencies Are Installed Without Exact Version or Integrity Pinning
The skill uploads arbitrary local files to a remote endpoint whose base URL can be overridden via environment variables or config, and the default is plain HTTP. This enables silent exfiltration of document contents to an attacker-controlled or intercepted service, including sensitive files processed by the agent.
if page_range:
data["page_range"] = page_range
response = requests.post(
api_url,
headers=headers,
files=files,
The request target is built from environment/config-controlled base_url and user-controlled task_id, then sent with the Bearer API key. This can direct authenticated requests to an arbitrary host, causing credential leakage and server-side request forgery behavior if the skill runs in a trusted environment.
return {"error": "未配置 API Key"}
try:
response = requests.get(
f"{config['base_url']}/{task_id}",
headers={"Authorization": f"Bearer {config['api_key']}"}
)
The default behavior points document uploads to a raw IP address over HTTP, which is an insecure and opaque remote destination for potentially sensitive local files. In an agent skill context, this is especially dangerous because users may expect local parsing, but the skill actually transmits documents off-host without transport security.
The code sends document contents to a remote service without a strong, user-facing warning and does so over potentially insecure HTTP transport. This creates confidentiality and integrity risks for uploaded documents and is amplified by the skill context, where local file access may include highly sensitive content.
The README instructs users to configure a custom API endpoint and submit local documents for parsing, but it does not warn that document contents may be transmitted off-host to a remote service. Because this skill handles potentially sensitive PDFs, images, and Word files, users could unknowingly exfiltrate confidential data to an untrusted or insecure endpoint.
The README describes document parsing features and shows configuration of a remote API endpoint, but it does not clearly warn that uploaded PDFs, images, or Word files may be transmitted to an external service for processing. Because these files can contain sensitive business or personal data, the lack of an explicit disclosure can cause users to unknowingly exfiltrate confidential content to a third-party server.
The skill explicitly configures a remote parsing endpoint and instructs users to submit local PDF, image, and Word files, but it does not warn that document contents will be transmitted to an external service. This creates a real confidentiality and privacy risk because users may unknowingly upload sensitive documents, and the endpoint uses plain HTTP, which further increases exposure in transit.
Natural-language strings in the module description and user-facing CLI messages are presented only in Chinese, with no option for the user to choose another language. This creates a language policy issue because the skill implicitly enforces a locale instead of offering or documenting language selection.
The skill loads an API key from DOCUMENT_PARSER_API_KEY and merges settings from a local config.json file. For an unknown-purpose skill, accessing host environment secrets and local configuration is an additional capability that is not justified by any stated intent.
整个技能说明均以中文编写,未声明这是面向特定中文用户群体的区域性技能,也未提供其他语言选项。按照语言/区域策略,这可能构成默认强制特定语言而缺少用户选择。
The file presents all user-facing instructions in Chinese, effectively forcing a specific language for users without any opt-in or explanation. Under the policy, a language-specific constraint should either be optional for the user or explicitly documented and justified.
The dependency is specified with a lower-bound version only, which allows installation of any newer release and makes builds non-reproducible. This increases supply-chain risk because different environments may resolve to different versions, including versions with breaking changes or newly introduced vulnerabilities.
requests>=2.28.0
python-docx>=0.8.11
Pillow>=9.0.0
Requests has known advisories, but because the manifest does not pin a version, there is no reliable way to determine whether installations will use a fixed or vulnerable release. The danger comes from unverifiable dependency state and possible exposure to known flaws if an affected version is resolved.
Using an unpinned python-docx version permits arbitrary newer versions to be installed, preventing reproducible builds and making it hard to verify whether known vulnerable releases are excluded. This is a classic supply-chain hygiene issue rather than direct malicious behavior, but it can expose deployments to avoidable risk.
requests>=2.28.0
python-docx>=0.8.11
Pillow>=9.0.0
python-docx has historical advisories, including XML-related issues, and the unpinned requirement means a vulnerable version could still be installed depending on resolver behavior and environment. This is especially relevant for document-processing components, which often handle untrusted files.
Pillow is also unpinned, so dependency resolution may pull different versions over time across systems. Because image-processing libraries frequently receive security fixes, leaving the version open-ended makes it harder to ensure a safe and tested release is consistently installed.
requests>=2.28.0
python-docx>=0.8.11
Pillow>=9.0.0
Pillow has multiple known security advisories, and leaving it unpinned makes it impossible to verify that only patched versions are installed. Given that image libraries often parse complex, attacker-controlled file formats, resolving to a vulnerable Pillow release could enable denial of service or worse in some environments.