T09 · Insecure Skill Coding Practices
- Location
scripts/save_paper.py:117- Finding
Weak arXiv URL Validation Permits Attacker-Controlled File Retrieval
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This Zotero importer matches its stated purpose, but it needs Review because it can use stored credentials to write to Zotero and upload weakly validated downloaded attachments.
Install only if you are comfortable granting the skill access to your Zotero API credentials and allowing it to create items, notes, and attachments in your Zotero library. Use it with explicit save-to-Zotero requests, avoid untrusted or shortened paper URLs, and review created attachments because crafted URLs containing arxiv.org could cause non-paper content to be uploaded.
scripts/save_paper.py:117Weak arXiv URL Validation Permits Attacker-Controlled File Retrieval
SKILL.md:23Third-Party Dependency Is Installed Without an Exact Version or Integrity Hash
The declared purpose understates the real behavior: the skill reads credentials from Keychain or environment variables, downloads external content such as PDFs, and uploads data and attachments into Zotero. This mismatch is dangerous because users may consent to citation extraction without realizing the skill can access secrets, fetch remote content, and persist data to third-party services.
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
library_id = None
api_key = None
# 优先从 macOS Keychain 读取(格式:library_id:api_key)
import subprocess
try:
result = subprocess.run(
The skill requires environment access, network access, and shell execution, but it does not declare an explicit tool scope or allowed-tools boundary. That creates an authorization gap where the agent may use broader capabilities than users or the runtime expect, especially because the skill also handles credentials and performs external writes to Zotero.
The activation language is broad and ambiguous, making it easier for the skill to trigger on loosely related user inputs and perform unintended Zotero writes or page scraping. In a skill that can access credentials and external URLs, overbroad triggering materially increases the chance of surprising or unauthorized actions.
The skill description does not clearly warn users that it will write records into Zotero and may automatically fetch and attach external content. This is dangerous because users may provide a link expecting analysis only, while the skill persists data and attachments to their library using stored credentials.
The skill directs browser automation to navigate arbitrary social-media pages and scrape full page contents, which is broader than the stated task of extracting citation metadata. In context, this increases risk of collecting unrelated personal or account-linked content from pages and expands the attack surface to any user-supplied URL.
The user-facing argparse description and option help strings are entirely in Chinese, which imposes a specific language on all users of the skill. The file does not indicate that the skill is intended only for a Chinese-speaking environment or provide any opt-in or alternative locale.
The stated purpose is to extract paper info from links and save it to Zotero. Spawning a platform-specific system command to access OS credential storage is an additional capability not reflected in the skill description and is not inherent to the user-facing purpose as stated.
subprocess module calls execute external commands. Without careful input validation, this enables command injection.
# 优先从 macOS Keychain 读取(格式:library_id:api_key)
import subprocess
try:
result = subprocess.run(
['security', 'find-generic-password', '-s', 'openclaw-zotero', '-w'],
capture_output=True, text=True, timeout=5
)
The script performs network retrieval and attachment upload beyond the core metadata-save behavior, which increases the skill's capability and trust requirements. Because it derives the download URL from user-controlled args.url using a weak substring check, an attacker can trigger unexpected outbound requests and potentially upload non-paper content into the user's Zotero library if a crafted URL contains arxiv.org.
The manifest says the skill extracts paper information from social-media posts and saves the paper to Zotero. The scraping guidance and note template also call out collecting GitHub links and storing them in the generated note, which extends the skill into code-resource harvesting rather than paper-only ingestion.
No suspicious patterns detected.