Back to skill

Security audit

疾病最新药物研究报告

Security checks for vulnerabilities and agentic risk

Overview

The skill mostly matches its biomedical reporting purpose, but its local runner can be misused to execute Python files outside the declared tools, so it should be reviewed before installation.

Install only in an isolated environment, pin or lock dependencies before production use, and invoke only the manifest-listed commands. Do not pass arbitrary filenames to local_tools/run_tool.sh. Set TAVILY_API_KEY only when search fallback is needed, and expect disease/drug queries to be sent to ChEMBL, ClinicalTrials.gov, and Tavily.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
Findings (2)

T09 · Insecure Skill Coding Practices

Warning
Location
local_tools/run_tool.sh:11
Finding

Unrestricted Tool Path Allows Execution of Python Files Outside the Declared Tool Set

Content
View full analysis
&2 exit 2 fi ``` The resulting path is subsequently executed without validating that it belongs to the declared tool set: ```bash exec "$PYTHON_BIN" "$TOOL_PATH" "$@" ``` ### Technical Analysis The launcher accepts its first argument as a file path and only verifies that the resulting path points to an existing file. It does not: - Restrict the argument to the three declared adapter filenames. - Reject `..` path traversal components. - Resolve and validate the canonical path. - Verify that the resolved file remains inside `local_tools/`. - Reject symbolic links that resolve outside the tool directory. Shell metacharacter injection is mitigated by correct quoting, but path traversal remains possible. For example, an argument such as `../attacker.py` resolves outside `local_tools/` while still satisfying the `-f` check if the file exists. This violates the Skill's stated constraint that only `chembl_api.py`, `clinicaltrials_api.py`, and `search_api.py` may be executed. ### Attack Path 1. An attacker places or identifies a Python file accessible relative to the project directory. 2. The attacker influences a user, Agent, automation layer, or tool invocation to supply a traversal path: ```bash bash local_tools/run_tool.sh ../attacker.py ``` 3. The launcher constructs a path such as: ```text /project/local_tools/../attacker.py ``` 4. The `-f` validation succeeds because the file exists. 5. The launcher executes the file using the selected Python interpreter. 6. The Python file runs with the same operating-system identity, environment variables, filesystem access, and network access a ...[truncated 828 chars]
Remediation
View remediation
&2 exit 2 ;; esac ``` 2. Resolve the selected path canonically and verify that its parent is exactly `SCRIPT_DIR`: ```bash TOOL_PATH="$(realpath -- "$SCRIPT_DIR/$TOOL_NAME")" TOOL_PARENT="$(dirname -- "$TOOL_PATH")" if [ "$TOOL_PARENT" != "$SCRIPT_DIR" ]; then echo "Tool path escapes local_tools directory" >&2 exit 2 fi ``` 3. Reject arguments containing `/`, `\`, or `..`, even when an allowlist is present, as defense in depth. 4. Reject symbolic links or validate their resolved targets: ```bash if [ -L "$SCRIPT_DIR/$TOOL_NAME" ]; then echo "Symbolic-link tools are not permitted" >&2 exit 2 fi ``` 5. Run the launcher in a sandbox with minimal filesystem, environment, process, and network permissions. 6. Add regression tests confirming that paths such as `../attacker.py`, nested paths, and symlinks are rejected. ]]>

T08 · Insecure Dependencies

Note
Location
requirements.txt:1
Finding

Unbounded Dependency Version Ranges Make Installation Non-Reproducible

Content
View full analysis
=2.31.0 langchain-tavily>=0.2.0 ``` Equivalent lower-bound-only declarations also appear in the Skill metadata: ```yaml install: - kind: pip package: requests bins: [] - kind: pip package: langchain-tavily bins: [] ``` ```json "pip": [ "requests>=2.31.0", "langchain-tavily>=0.2.0" ] ``` ### Technical Analysis The dependency declarations specify minimum versions but no upper bounds, exact versions, lock file, or package hashes. Consequently, two installations performed at different times may resolve to different direct or transitive dependency versions. This does not establish that the currently named packages are malicious. The risk is that a future compromised, incompatible, or insufficiently reviewed release could be selected automatically. Python dependencies may execute code during installation or import, and `langchain-tavily` is imported in the same process that receives the Tavily API credential. The absence of hash verification also prevents the installer configuration from proving that downloaded artifacts match artifacts reviewed by the project maintainers. ### Attack Path 1. A user or automated Skill runner installs dependencies from the declared requirements. 2. The package resolver selects the newest versions satisfying the lower bounds. 3. A future direct or transitive release contains malicious code, a compromised artifact, or a security regression. 4. The unreviewed release is installed because no exact version or hash restricts resolution. 5. Code may execute during installation or when the dependency is imported. 6. Execution occurs with the installer or Skill process privileges and may have ...[truncated 814 chars]
Remediation
View remediation
langchain-tavily== ``` 2. Generate a lock file that records all transitive dependency versions. 3. Use cryptographic hashes and install with hash enforcement: ```bash python3 -m pip install --require-hashes -r requirements.txt ``` 4. Keep dependency versions synchronized across `requirements.txt`, `SKILL.md`, and `skill-manifest.json`. 5. Perform automated vulnerability and provenance checks in continuous integration. 6. Review dependency updates before merging them rather than automatically accepting every future version satisfying a lower bound. 7. Install and run the Skill in an isolated virtual environment or container with restricted credentials, filesystem access, and network permissions. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (13)

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

This skill presents itself as a structured disease-to-drug intelligence workflow, but the file mainly contains operational instructions and allows web-backed supplementary search without clearly declared resources. That mismatch can conceal the true attack surface, especially external connectivity and tool invocation, which is dangerous in agent environments that rely on metadata for trust and sandboxing decisions.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

This skill presents itself as a structured disease-to-drug intelligence workflow, but the file mainly contains operational instructions and allows web-backed supplementary search without clearly declared resources. That mismatch can conceal the true attack surface, especially external connectivity and tool invocation, which is dangerous in agent environments that rely on metadata for trust and sandboxing decisions.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The description says the skill is for generating Chinese disease-to-drug intelligence reports, which imposes a specific output language as a default behavior. Under the policy criteria, forcing a specific language without an explicit user choice or opt-in is a natural-language policy violation.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
84% confidence
Finding

The skill declares access to environment variables and relies on a network-backed search capability via Tavily, but it does not expose an explicit tool/permission scope describing those capabilities. That weakens reviewability and policy enforcement, making it easier for a skill to access secrets or external services without clear operator consent.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The markdown explicitly says to generate a decision-oriented English comprehensive report, which imposes a language choice regardless of the user's preferred language. This is reinforced later by requiring use of an English report template, and there is no indication that the user may choose another language.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

These lines require the agent to read and strictly follow an 'English Report Template' and say it must be used unless the user requests a different format, but not a different language. That creates a natural-language policy issue because the skill constrains output locale/language without offering opt-in or choice.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The document defines an "English Report Template" and requires the final answer to strictly match that template, which effectively forces responses in English. This is a natural-language policy concern because no alternative language option or user opt-in is provided.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The manifest describes the skill as a '中文报告技能' (Chinese report skill), which imposes a specific language/locale in the natural-language description. The file does not indicate that users can choose another language or explicitly opt into Chinese output, so this appears to violate the language/locale choice policy.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
96% confidence
Finding

The default prompt instructs the skill to generate a structured English report, which imposes a language choice in natural language without indicating user preference or opt-in. This can violate language/locale policy when users may expect responses in their own language or the current conversation language.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
92% confidence
Finding

This code sends query parameters to the ChEMBL service over the network via requests.Session.get, but there is no confirmation prompt, logging, or comment/docstring informing the user that their supplied search terms or identifiers will be transmitted externally. For a code file, outbound network transmission without any visible disclosure matches the missing user warning criterion.

Content

No source excerpt is available for this finding.

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
97% confidence
Finding

The dependency is specified with a lower bound only, so builds may resolve to different versions over time, including versions with known security defects or breaking behavior. In a skill that performs external HTTP requests and biomedical data retrieval, this weakens supply-chain reproducibility and can allow vulnerable releases to be installed unintentionally.

Content

Scanner excerpt · requirements.txt (reported line 1)May include surrounding context.

text
requests>=2.31.0
langchain-tavily>=0.2.0

Unverifiable Dependency: requests has 16 known advisory(ies) (CVE-2014-1830 (Exposure of Sensitive Information to an Unauthorized Actor in Requests); CVE-2024-47081 (Requests vulnerable to .netrc credentials leak via malicious URLs); CVE-2024-35195 (Requests `Session` object does not verify requests after making first request wi) +13 more), but the manifest does not pin a version, so it is unknown whether the installed release is affected

Low
Category
Supply Chain
Confidence
95% confidence
Finding

The manifest does not pin requests, so it is impossible to verify whether deployment will use a patched or vulnerable release despite multiple known advisories affecting historical versions. In a network-enabled skill, a vulnerable HTTP client library could contribute to credential leakage, TLS/verification issues, or other request-handling flaws depending on the resolved version.

Content

No source excerpt is available for this finding.

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
93% confidence
Finding

The package langchain-tavily is also unpinned, which makes dependency resolution non-deterministic and increases supply-chain risk from unexpected updates or newly introduced vulnerable transitive dependencies. Because this skill relies on search/tooling integrations, consuming an unpinned fast-moving package can expose the runtime to avoidable security and stability issues.

Content

Scanner excerpt · requirements.txt (reported line 2)May include surrounding context.

text
requests>=2.31.0
langchain-tavily>=0.2.0

Static analysis

No suspicious patterns detected.