T09 · Insecure Skill Coding Practices
- Location
scripts/wos_downloader.py:169- Finding
Unvalidated External PDF URL Enables Server-Side Request Forgery and Unbounded Downloads
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill has a legitimate academic-paper workflow, but its automatic third-party PDF downloading and CSV export handling need review before installation.
Install only if you are comfortable with DOI lookups being sent to Unpaywall and with the tool downloading files from URLs returned by a third-party API. Use a dedicated virtual environment and a limited output folder, review generated CSV files as untrusted data, and avoid running it on sensitive networks until URL validation, download size limits, PDF validation, and pinned dependencies are added.
scripts/wos_downloader.py:169Unvalidated External PDF URL Enables Server-Side Request Forgery and Unbounded Downloads
scripts/wos_downloader.py:246Spreadsheet Formula Injection in Exported Metadata CSV
scripts/requirements.txt:1Unbounded and Unverified Third-Party Dependency Resolution
The documented behavior claims automated Web of Science search, metadata extraction, and PDF download assistance, while the referenced implementation is reportedly only a placeholder script. This mismatch is dangerous because users and reviewers may grant trust, permissions, or credentials to a skill under false assumptions, enabling later bait-and-switch behavior or unsafe operation without adequate scrutiny.
The skill advertises behaviors involving browser automation, network access, and local file output, but it does not declare any explicit tool scope or permissions boundaries. In an agent environment, missing scope declarations can allow broader-than-expected file and network access, reducing reviewability and increasing the risk of unintended data exposure or unsafe automation.
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
https://api.unpaywall.org/v2/{doi}?email={your_email}
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
获取文献元数据:
https://api.crossref.org/works/{doi}
This code file’s natural-language content, including the module docstring and later CLI/help text, is written entirely in Chinese, which imposes a specific language on users. The file does not offer any language selection, fallback, or explanation that the tool is intended only for a Chinese-speaking or region-specific audience.
The script transmits user-supplied DOI values to the external Unpaywall API, which leaks the user's research interests and paper list to a third party. In this skill's context, the paper set may reveal sensitive institutional research activity, and the hardcoded placeholder email also indicates weak handling of required API identification and privacy expectations.
# 清理 DOI
doi = doi.replace('doi:', '').replace('DOI:', '').strip()
url = f'https://api.unpaywall.org/v2/{doi}?email=user@example.com'
try:
time.sleep(self.delay) # 控制请求频率
The manifest description is written entirely in Chinese and does not indicate that other languages are supported or that the user can choose their preferred language. Under the policy, forcing a specific language without opt-in is a natural-language policy concern.
This markdown file consists wholly of Chinese-language instructional content and does not provide an opt-in, alternative language, or justification for a Chinese-only locale. Under the policy rule, forcing a specific language without user choice can be a natural-language policy violation.
The dependency specifier requests>=2.28.0 is unpinned, so installs may resolve to different versions over time, reducing reproducibility and increasing supply-chain risk. In a skill that automates web access and downloads documents, a future vulnerable or malicious package release could be pulled in without review.
requests>=2.28.0
pandas>=1.5.0
requests has multiple historical advisories, and because the manifest does not pin an exact version, it is impossible to verify from this file alone whether the installed release is affected. Given this skill's purpose—automated web searching and bulk PDF downloading—network-facing dependency flaws can be more consequential, including credential leakage or unsafe request handling.
The dependency pandas>=1.5.0 is also unpinned, which creates non-deterministic builds and makes it harder to verify whether deployed environments are using secure versions. Although pandas is commonly used for data processing, leaving it floating can expose the project to avoidable supply-chain and compatibility issues.
requests>=2.28.0
pandas>=1.5.0
pandas has at least one advisory in its history, and the lack of exact version pinning means the actual installed package may or may not be vulnerable. In this skill, pandas is likely used for metadata processing rather than direct exposure, so the contextual danger is lower than for network libraries, but the unverifiable state remains a supply-chain weakness.