T09 · Insecure Skill Coding Practices
- Location
scripts/cn_med_oa.py:28- Finding
TLS certificate verification is disabled by default
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill mostly matches its stated purpose, but it needs review because it disables HTTPS certificate checks by default and writes unescaped HTML reports from untrusted citation data.
Install only after reviewing the security tradeoffs. Before using network features, set CN_MED_OA_VERIFY_SSL=1 or wait for the default to be fixed. Treat generated HTML reports as untrusted if claims or remote metadata could be attacker-controlled, and prefer JSON output until HTML escaping is added. If you install PyMuPDF, use a virtual environment and a pinned reviewed version.
scripts/cn_med_oa.py:28TLS certificate verification is disabled by default
scripts/verify_cn_refs.py:249Unescaped data permits stored HTML injection in verification reports
README.md:20Optional third-party dependency is installed without version or integrity pinning
The documented behavior materially overstates or misstates the implementation, including verification features, dependency claims, and output guarantees. Security-relevant mismatches like this can cause downstream agents or users to trust validation, provenance, or dependency assumptions that are not actually enforced, leading to unsafe automation decisions or supply-chain surprises.
The skill advertises no explicit tool scope while describing capabilities that require network access, filesystem writes, and environment-variable use. In an agent ecosystem, missing permission declarations can cause the skill to run with broader ambient privileges than users or orchestrators expect, weakening least-privilege controls and making unintended data access or external requests harder to govern.
The trigger phrases are broad enough to match common requests like finding references or downloading papers, which increases the chance of unintended activation. Because this skill performs network retrieval and file download/write actions, accidental invocation can lead to unreviewed external access, unnecessary downloads, quota exhaustion, or surprising behavior in unrelated conversations.
The module docstring presents the skill as a Chinese-only connector and all usage/help text is written exclusively in Chinese, which imposes a specific language/locale on users. Under the policy rule, locale or language constraints should either be optional or clearly justified as region-specific; this file does not explicitly state such a user-facing justification or offer alternatives.
The manifest states the skill is 'zero-dependency pure standard library', yet both extract_pages and pdf_first_pages_text import fitz, which is an external PyMuPDF dependency. These functions implement advertised behaviors such as PDF text-based page extraction and volume/issue cross-checking, so this is a real manifest-to-code mismatch rather than an incidental detail.
Data from a source is assigned to a variable that is later passed to a sink, creating a variable-mediated taint flow.
def save_manifest(result, save_dir):
os.makedirs(save_dir, exist_ok=True)
path = os.path.join(save_dir, "cn_refs.json")
with open(path, "w", encoding="utf-8") as f:
json.dump(result, f, ensure_ascii=False, indent=2)
return path
The module docstring, CLI descriptions, console output, and HTML report language are all fixed in Chinese, and the generated HTML explicitly sets lang="zh". Under the policy, forcing a specific language without user opt-in is a natural-language policy violation unless the locale restriction is clearly documented and justified as region-specific.
The skill title, description, and examples are entirely presented as Chinese-only operation for Chinese medical literature, with no indication that users may choose another language or that the locale restriction is an explicit opt-in. Under the policy, forcing a specific language without user choice can be a natural-language policy violation unless clearly justified and documented.
The description frames the skill entirely around Chinese-language literature retrieval and Chinese citation verification, and even provides fixed Chinese trigger behavior. There is no language-choice or opt-in wording indicating that users can select another language or locale before the skill applies these constraints.
The top-level documentation says the data source is the Weipu OA platform, suggesting a Weipu-only connector. However, to_vancouver inspects providerSource and emits cnki_uri when it finds a CNKI link, so the code exposes another provider reference despite the narrower wording in the documentation.
The report template sets the document language to Chinese and all report labels are Chinese-only. This reinforces a fixed locale behavior without presenting a user choice or a clearly stated mandatory regional justification in the file.