Back to skill

Security audit

医学文献ppt生成skill

Security checks for vulnerabilities and agentic risk

Overview

This skill has a legitimate paper-to-PPT purpose, but its packaged scripts handle API tokens unsafely and can add unrelated medical claims to generated presentations.

Install only after reviewing and fixing the credential and output-integrity issues. At minimum, remove and rotate the embedded InfoX-Med token, require an explicitly supplied secret, use HTTPS with an allowlisted API host, redact debug artifacts, restrict image downloads to trusted original-paper asset hosts with size/time limits, and remove all hardcoded paper-specific claims from the renderer and fallback slide logic.

Vulnerability Patterns
  • 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
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (5)

T09 · Insecure Skill Coding Practices

Error
Location
scripts/fetch_fullpaper.py:27
Finding

API credentials transmitted over plaintext HTTP to a configurable destination

Content
View full analysis
Dict[str, Any]: req = Request(url, headers={"X-Token": token, "Accept": "application/json"}) with urlopen(req, timeout=30) as resp: return json.loads(resp.read().decode("utf-8", errors="replace")) def fetch_by_doc_id(doc_id: str, tokens: Iterable[str]) -> Tuple[Dict[str, Any], str]: url = f"{API_BASE}/api/v1/paper/doc-id/{doc_id}?raw=true" last_err = None for token in tokens: try: payload = http_get_json(url, token) return payload, token ``` ### Technical Analysis The default full-paper API uses unencrypted HTTP while placing the API credential in the `X-Token` request header. Anyone able to observe or modify traffic between the host and the API can recover the credential. The destination is also controlled by `INFOX_MED_API_BASE` without validation of its scheme, hostname, port, or resolved IP address. A process, deployment configuration, or user capable of setting this environment variable can redirect all normalized token candidates to an arbitrary server. The script uses `urllib.request.urlopen`, which may follow HTTP redirects. No control prevents credentials from being exposed through an attacker-controlled destination or network interception. Reading an API credential is necessary for the declared full-paper retrieval function. Sending it over plaintext transport or to an unrestricted configurable host exceeds the minimum privileges required. ### Attack Path 1. An attacker gains the ability to alter deployment environment variables, or intercepts plaintext network traffic. 2. The attacker ...[truncated 734 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
scripts/fetch_fullpaper.py:205
Finding

Live API tokens are persisted in plaintext debug artifacts

Content
View full analysis
/debug.json`. 5. Another local user, artifact collector, backup service, ...[truncated 403 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
scripts/medical_search.py:33
Finding

Reusable InfoX-Med credential is hard-coded into two search clients

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
scripts/render_pptx_from_slides.js:75
Finding

Unrestricted image downloading permits server-side request forgery and resource exhaustion

Content
View full analysis
{ const lib = url.startsWith('https') ? https : http; lib.get(url, (res) => { if (res.statusCode >= 300 && res.statusCode < 400 && res.headers.location) return resolve(download(res.headers.location, outPath)); if (res.statusCode !== 200) return reject(new Error('HTTP ' + res.statusCode)); const f = fs.createWriteStream(outPath); res.pipe(f); f.on('finish', () => f.close(() => resolve(outPath))); f.on('error', reject); }).on('error', reject); }); } async function ensureAsset(url, cacheDir) { if (!url) return null; if (fs.existsSync(url)) return url; const ext = path.extname(new URL(url).pathname) || '.jpg'; const crypto = require('crypto'); const base = crypto.createHash('sha1').update(String(url)).digest('hex'); const out = path.join(cacheDir, base + ext); if (fs.existsSync(out) && fs.statSync(out).size > 0) return out; try { await download(url, out); return out; } catch { return null; } } ``` The corresponding validator only checks the URL prefix: ```python for item in items: if isinstance(item, dict): url = str(item.get("url") or item.get("image_url") or item.get("path") or "") if url and not (url.startswith("http://") or url.startswith("https://") or url.startswith("/") or url.startswith("./")): bad.append(url) ``` ### Technical Analysis The renderer accepts any HTTP or HTTPS URL and recursively follows redirects. It does not restrict hostnames, ports, protocols after redirects, or resolved IP ranges. Consequently, image URLs can target loopback interfaces, private networks, ...[truncated 1759 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/render_pptx_from_slides.js:100
Finding

Renderer injects unrelated paper-specific medical claims and fixed branding into every presentation

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Taint TrackingDirect Taint Flow, Variable-Mediated Taint Flow, Credential Exfiltration Chain
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
Findings (56)

Tainted flow: 'req' from os.environ.get (line 288, credential/environment) → urllib.request.urlopen (network output)

Critical
Category
Data Flow
Confidence
90% confidence
Finding

Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.

Content

Scanner excerpt · scripts/medical_search.py (reported line 291)May include surrounding context.

python
req = urllib.request.Request(API_URL, data=body, headers=headers, method="POST")
            loop = asyncio.get_running_loop()
            def _do_request():
                with urllib.request.urlopen(req, timeout=REQUEST_TIMEOUT) as resp:
                    return json.loads(resp.read().decode("utf-8", errors="replace"))
            data = await loop.run_in_executor(None, _do_request)
        records_raw = (data.get("data") or {}).get("records") or []

Tainted flow: 'req' from os.environ.get (line 288, credential/environment) → urllib.request.urlopen (network output)

Critical
Category
Data Flow
Confidence
90% confidence
Finding

Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.

Content

Scanner excerpt · scripts/medical_search_fallback_reference.py (reported line 291)May include surrounding context.

python
req = urllib.request.Request(API_URL, data=body, headers=headers, method="POST")
            loop = asyncio.get_running_loop()
            def _do_request():
                with urllib.request.urlopen(req, timeout=REQUEST_TIMEOUT) as resp:
                    return json.loads(resp.read().decode("utf-8", errors="replace"))
            data = await loop.run_in_executor(None, _do_request)
        records_raw = (data.get("data") or {}).get("records") or []

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

Unlike the other TP4 items, this one notes active downloading of images from arbitrary provided URLs, which is a real security concern if untrusted slide data can influence fetch targets. That behavior can enable SSRF, internal network probing, unexpected data exfiltration through request metadata, or retrieval of malicious content, especially when combined with undeclared network capability.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

Unlike the other TP4 items, this one notes active downloading of images from arbitrary provided URLs, which is a real security concern if untrusted slide data can influence fetch targets. That behavior can enable SSRF, internal network probing, unexpected data exfiltration through request metadata, or retrieval of malicious content, especially when combined with undeclared network capability.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

Unlike the other TP4 items, this one notes active downloading of images from arbitrary provided URLs, which is a real security concern if untrusted slide data can influence fetch targets. That behavior can enable SSRF, internal network probing, unexpected data exfiltration through request metadata, or retrieval of malicious content, especially when combined with undeclared network capability.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

Unlike the other TP4 items, this one notes active downloading of images from arbitrary provided URLs, which is a real security concern if untrusted slide data can influence fetch targets. That behavior can enable SSRF, internal network probing, unexpected data exfiltration through request metadata, or retrieval of malicious content, especially when combined with undeclared network capability.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

Unlike the other TP4 items, this one notes active downloading of images from arbitrary provided URLs, which is a real security concern if untrusted slide data can influence fetch targets. That behavior can enable SSRF, internal network probing, unexpected data exfiltration through request metadata, or retrieval of malicious content, especially when combined with undeclared network capability.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

Unlike the other TP4 items, this one notes active downloading of images from arbitrary provided URLs, which is a real security concern if untrusted slide data can influence fetch targets. That behavior can enable SSRF, internal network probing, unexpected data exfiltration through request metadata, or retrieval of malicious content, especially when combined with undeclared network capability.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

Unlike the other TP4 items, this one notes active downloading of images from arbitrary provided URLs, which is a real security concern if untrusted slide data can influence fetch targets. That behavior can enable SSRF, internal network probing, unexpected data exfiltration through request metadata, or retrieval of malicious content, especially when combined with undeclared network capability.

Content

No source excerpt is available for this finding.

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 23)May include surrounding context.

md
7. 调用 `scripts/render_pptx_from_slides.js` 输出最终 `.pptx`

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

When original figures are unavailable, the code generates fallback 'result' and 'mechanism' slides from textual heuristics instead of failing. This directly violates the skill's explicit requirement to prioritize original paper images and to return '检索失败,无法生成' when the paper cannot be fully obtained, creating a high risk of misleading or fabricated scientific output presented as evidence-based slides.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The code embeds a default API token directly in source, creating credential exposure to anyone with repository or package access. That token enables authenticated outbound use of a third-party medical search service, which can lead to unauthorized service consumption, billing abuse, and difficult-to-revoke downstream misuse.

Content

No source excerpt is available for this finding.

Missing User Warnings

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

Using a hard-coded default API token for outbound requests means sensitive credentials are silently used without operator awareness or explicit provisioning. This weakens credential governance, encourages credential reuse across environments, and can expose the account to abuse if the code is shared or deployed broadly.

Content

No source excerpt is available for this finding.

Missing User Warnings

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

A hardcoded fallback API token is embedded in the script and automatically used for outbound requests when no environment variable is set. This can leak a live credential to anyone with code access, enable unauthorized use of the third-party account, and make attribution, quota abuse, or billing abuse difficult to control.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

The title slide injects a fixed medical storyline and fixed keywords regardless of the actual paper being processed. In this skill's context, that can fabricate scientific claims in a medical research presentation, misleading users and audiences into believing unsupported mechanisms or topics are present in the source paper.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
87% confidence
Finding

The skill declares broad operational behavior that implies shell, file, environment, and network access, but it does not define an explicit tool allowlist or permission scope. In an agent environment, this increases the blast radius of prompt-driven actions, making unintended command execution, filesystem access, or outbound requests more likely if downstream components honor the instructions.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The instructions repeatedly require figure explanations and slide content to be in Chinese, using mandatory language such as '必须输出为中文' and '用中文'. This imposes a specific language/locale on users without indicating that they can choose another language or opt in to Chinese output.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The instruction '必须输出为中文' imposes a fixed language requirement in natural language. This matches the language/locale policy violation category because the file does not offer user opt-in or explain a region-specific necessity for forcing Chinese output.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The instruction says outputs should bind evidence fragments with '中文解释要点', which imposes a specific language requirement in the skill workflow. The file does not indicate that the user can choose another language or opt in to Chinese, so this is a natural-language locale policy concern.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
84% confidence
Finding

The document title and instructions are entirely in Chinese, and L003 states that all implementations must strictly follow the document. This creates a natural-language locale constraint with no indication of user opt-in or alternative language support, which can violate language/locale policy requirements.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
84% confidence
Finding

The file title and instruction text are entirely in Chinese and describe a fixed outline-mapping behavior for generating PPT structure, but they do not indicate that language choice is optional or user-configurable. Under the policy, a skill that imposes a specific language or locale without opt-in can be a natural-language policy violation.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

This markdown file contains user-facing natural language exclusively in Chinese, which can amount to a language/locale policy violation when no opt-in or alternative language is provided. The text does not state that the skill is region-specific or that Chinese output is an intentional, justified constraint.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The text states that figure explanations must be in Chinese and defaults to translating original captions into Chinese. This imposes a specific language/locale requirement in natural-language instructions without any opt-in or alternative language path, which can violate language choice policy.

Content

No source excerpt is available for this finding.

Ae4

Medium
Category
analysis-evasion
Confidence
80% confidence
Finding

Suspicious Unicode normalization or mixed-script content

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The document establishes Chinese-language/default Chinese presentation content unless the user explicitly asks otherwise, which can override user expectations and cause output to diverge from requested language or audience needs. In an agent pipeline, this is risky because hidden defaults can silently steer generated content and formatting, reducing user control and potentially causing inappropriate disclosures, miscommunication, or unusable deliverables in non-Chinese contexts.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.