Back to skill

Security audit

Gxpcode Tu Xingsun

Security checks for vulnerabilities and agentic risk

Overview

This skill is a coherent pharmaceutical regulation tracker, but it needs review because it installs mutable third-party dependencies and can persistently change sources and parser code from broad web inputs.

Install only after reviewing the setup and source-management risks. Prefer a virtual environment, pinned dependencies with hashes, trusted package/browser sources, and an allowlist for regulatory domains. Treat new-source analysis and the local source manager as review-required operations because they can persistently change what the skill monitors and what parser code exists.

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 (4)

T08 · Insecure Dependencies

Error
Location
scripts/setup.py:20
Finding

Mandatory setup installs unpinned dependencies from third-party mirrors

Content
View full analysis
bool: """Install Python dependencies from the configured mirror.""" py = sys.executable print(f"\n[1/3] Python dependency installation (mirror: mirrors.aliyun.com)") print(f" Interpreter: {py}") if not os.path.exists(REQUIREMENTS): print(f" {CROSS} Not found: {REQUIREMENTS}") return False cmd = [ py, "-m", "pip", "install", "-r", REQUIREMENTS, "-q", "-i", PIP_INDEX, "--trusted-host", "mirrors.aliyun.com" ] if _run(cmd, "pip install"): print(f" {CHECK} Dependency installation complete") return True else: print(f" {CROSS} Dependency installation failed; retrying with detailed output:") subprocess.run([ py, "-m", "pip", "install", "-r", REQUIREMENTS, "-i", PIP_INDEX, "--trusted-host", "mirrors.aliyun.com" ]) return False ``` ```python # scripts/setup.py:95-103 def _install_playwright_browser() -> bool: """Install Playwright Chromium from the configured mirror.""" py = sys.executable print(f"\n[2/3] Playwright browser installation (mirror: npmmirror.com)") env = os.environ.copy() env["PLAYWRIGHT_DOWNLOAD_HOST"] = PW_DOWNLOAD_HOST cmd = [py, "-m", "playwright", "install", "chromium"] return _run(cmd, "playwright install chromium", env=env) ``` ```text # scripts/requirements.txt:1-4 feedparser>=6.0 pyyaml>=6.0 markdown>=3.5 playwright>=1.40 ``` ### Technical Analysis The documented first-use work ...[truncated 1757 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
scripts/stepA_analyze.py:23
Finding

Unrestricted browser navigation permits SSRF-style access to internal resources

Content
View full analysis
document.body.innerText") if body: item["detail_text"] = body[:5000] except Exception: pass finall ...[truncated 2194 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/step3_fetch.py:35
Finding

Remote URLs are interpolated into executable browser JavaScript

Content
View full analysis
str: path = os.path.join(output_dir, filename) try: data = page.evaluate(f"""async () => {{ const r = await fetch('{pdf_url}'); const b = await r.blob(); return new Promise((ok) => {{ const fr = new FileReader(); fr.onload = () => ok(fr.result); fr.readAsDataURL(b); }}); }}""") if data and "," in str(data): b64 = str(data).split(",", 1)[1] with open(path, "wb") as f: f.write(base64.b64decode(b64)) return path if os.path.exists(path) else "" except Exception: return "" ``` ```python # scripts/step3_fetch.py:75-91 if "Download is starting" in str(ge): page.goto(_domain_root(url), timeout=15000, wait_until="domcontentloaded") data = page.evaluate(f"""async () => {{ const r = await fetch('{url}'); const b = await r.blob(); return new Promise((ok) => {{ const fr = new FileReader(); fr.onload = () => ok(fr.result); fr.readAsDataURL(b); }}); }}""") fname = _safe_filename( item["source"].replace("/", "_"), item["title"] ) path = os.path.join(pdf_dir, fname) ``` ### Technical Analysis The values `pdf_url` and `url` are inserted directly into JavaScript source code inside a single-quoted string. These values originate from monitored content or pipeline input and are not JavaScript-escaped. A malicious URL containing a quote and JavaScript syntax can terminate the intended string literal and inject additional statements into the program passed to `page ...[truncated 1623 chars]
Remediation
View remediation
{ const response = await fetch(url); const blob = await response.blob(); return await new Promise((resolve, reject) => { const reader = new FileReader(); reader.onload = () => resolve(reader.result); reader.onerror = reject; reader.readAsDataURL(blob); }); }""", pdf_url, ) ``` 3. Validate the URL scheme, hostname, destination IP, and redirect chain before fetching. 4. Prefer Playwright's request API or a hardened HTTP client for attachment downloads instead of executing browser JavaScript. 5. Require an expected PDF content type, enforce a maximum response size, and verify the PDF magic bytes before writing the file. 6. Add regression tests containing quotes, backslashes, newlines, Unicode separators, and JavaScript fragments in attachment URLs. ]]>

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/source_manager.py:182
Finding

Persistent source metadata is rendered as unescaped HTML in the local dashboard

Content
View full analysis
s.enabled !== false).length; html += `
${jur}

${jur} (${jOn}/${items.length})

Enable all Disable all
`; for (const s of items) { html += `
${s.name}
${s.type||''}
${s.jurisdiction||''}
${(s.url||'').replace('https://','')}
`; } html += '
'; } document.getElementById('groups').innerHTML = html; ``` ```python # scripts/source_manager.py:289-304 def do_POST(self): if self.path == "/api/sources": length = int(self.headers.get("Content-Length", 0)) body = self.rfile.read(length) payload = json.loads(body) data = _load() data["sources"] = payload.get("sources", []) _save(data) self.send_response(200) self.send_header("Content-type", "application/json; charset=utf-8") self.end_headers() self.wfile.write(b'{"ok":true}') else: self. ...[truncated 2391 chars]
Remediation
View remediation
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • System Prompt LeakageDirect Leakage, Indirect Extraction, Tool-Based Exfiltration
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
Findings (63)

Tp4

High
Category
MCP Tool Poisoning
Confidence
93% confidence
Finding

The flagged behavior suggests the skill may perform historical backfill or initialization tasks not reflected in the description. While not inherently malicious, undisclosed maintenance or data-seeding operations can alter persisted state and affect future outputs in ways the user did not authorize or anticipate.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The flagged behavior suggests the skill may perform historical backfill or initialization tasks not reflected in the description. While not inherently malicious, undisclosed maintenance or data-seeding operations can alter persisted state and affect future outputs in ways the user did not authorize or anticipate.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

The flagged behavior suggests the skill may perform historical backfill or initialization tasks not reflected in the description. While not inherently malicious, undisclosed maintenance or data-seeding operations can alter persisted state and affect future outputs in ways the user did not authorize or anticipate.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

The flagged behavior suggests the skill may perform historical backfill or initialization tasks not reflected in the description. While not inherently malicious, undisclosed maintenance or data-seeding operations can alter persisted state and affect future outputs in ways the user did not authorize or anticipate.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
93% confidence
Finding

The flagged behavior suggests the skill may perform historical backfill or initialization tasks not reflected in the description. While not inherently malicious, undisclosed maintenance or data-seeding operations can alter persisted state and affect future outputs in ways the user did not authorize or anticipate.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
92% confidence
Finding

The flagged behavior suggests the skill may perform historical backfill or initialization tasks not reflected in the description. While not inherently malicious, undisclosed maintenance or data-seeding operations can alter persisted state and affect future outputs in ways the user did not authorize or anticipate.

Content

No source excerpt is available for this finding.

Env Variable Harvesting

High
Category
Data Exfiltration
Confidence
60% confidence
Finding

Code enumerates, copies, or searches environment variables for secrets. Bulk environment access can collect credentials unrelated to the skill's stated purpose.

Content

Scanner excerpt · scripts/setup.py (reported line 100)May include surrounding context.

python
py = sys.executable
    print(f"\n[2/3] Playwright 浏览器安装(镜像: npmmirror.com)")
    print(f"  正在下载 Chromium(约 150 MB 压缩包,解压后 ~400 MB)...")
    env = os.environ.copy()
    env["PLAYWRIGHT_DOWNLOAD_HOST"] = PW_DOWNLOAD_HOST
    cmd = [py, "-m", "playwright", "install", "chromium"]
    return _run(cmd, "playwright install chromium", env=env)

Direct Prompt Extraction

High
Category
System Prompt Leakage
Confidence
85% confidence
Finding

Skill contains instructions that could directly expose system prompts, internal rules, or hidden instructions to users or external parties.

Content

Scanner excerpt · scripts/step5_notify.py (reported line 56)May include surrounding context.

python
for rule in rules:
        for kw in rule.get("keywords", []):
            if kw in text:
                return rule.get("label", "通用")
    return "通用"

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
91% confidence
Finding

The skill declares operational behavior that implies shell execution, network access, file reads/writes, and environment use, but it does not define any explicit tool scope or permission boundaries. In an agent setting, this increases the risk of overbroad execution, unintended filesystem access, or unrestricted outbound requests, especially because the workflow includes running setup scripts and downloading attachments.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The skill description says it will scan external sources and generate reports, but it does not clearly warn that it will make outbound network requests and download attachments. In practice, this can expose users to unexpected data transfer, storage of untrusted files, and ingestion of potentially malicious attachments such as PDFs or HTML content.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
83% confidence
Finding

The manifest describes discovering new regulations, guidelines, guiding principles, and notices, but this history file contains many broader content types such as policy interpretations, annual reports, work dynamics, regulatory news, and entries related to medical devices and cosmetics. That suggests the actual monitoring scope is materially broader than the declared pharmaceutical-regulation tracking purpose.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The manifest says the skill automatically scans regulatory sources limited to NMPA/CDE/FDA/EMA/ICH, but this file shows the skill also tracking PIC/S publications. That is a substantive expansion of monitored sources beyond the declared description, not a mere implementation detail.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The manifest enumerates NMPA/CDE/FDA/EMA/ICH as the supported scanned sources, but this file also contains JSCDI policy/regulation entries. This indicates the skill monitors an extra organization that is not disclosed in the skill description.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The file title and instructions are written entirely in Chinese and direct the model to produce analysis in that language context, but there is no opt-in, language selection mechanism, or stated justification that the skill is region- or language-restricted. This can violate language/locale policy when users or downstream systems expect language neutrality or user choice.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

This manifest contains natural-language config values and comments exclusively in Chinese, including all matching keywords and display labels. Because there is no indication that the skill is region-specific or that users can opt into this locale, it appears to enforce a specific language without documented justification.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

All user-facing instructions in this file are written in Chinese, with no indication that the user can choose another language or that the skill is intentionally region-specific. Under the policy, forcing a specific language without opt-in is a natural-language policy violation.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The prompt authorizes analysis of arbitrary user-provided URLs and, if unmatched, directs the agent to inspect rendered HTML and derive a new parser. That broad scope increases exposure to untrusted external content and can enable misuse such as probing unintended sites, handling hostile pages, or expanding the skill beyond its intended regulatory-source boundary.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The instructions explicitly tell the agent to write to sources.yaml and create scripts/parsers/{name}.py, which are repository modifications, without any approval gate or warning. In an agent context, this creates a direct path from untrusted URL input to persistent configuration and code changes, raising the risk of unauthorized file modification and supply-chain style abuse.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
86% confidence
Finding

The natural-language instructions, headings, and trigger phrases are all presented only in Chinese, which can amount to forcing a specific language without offering the user a choice. The policy allows locale constraints when clearly documented and justified, but this file does not state that limitation or provide an opt-in mechanism.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The prompt instructs the agent to overwrite resources/config.yaml when values are empty, but it does not warn the user that an existing file may be modified or that prior content could be lost if the emptiness check is incorrect or the file structure changes. This is primarily a safety and integrity issue rather than a classic security exploit, but it can still cause unintended configuration loss and reduce auditability in a regulated workflow.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The instruction requires the summary field to be a '2-3 句中文摘要', which forces a specific language for outputs. Under the policy, language constraints should either provide user opt-in/choice or be clearly documented as a justified region-specific requirement; this file does not do so explicitly.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The entire skill document is written in Chinese and does not indicate that language choice is optional or that the skill is intentionally limited to a Chinese-speaking context. Per the policy, forcing a specific language without user opt-in is a natural-language policy concern.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The instruction requires the summary field to be a '2-3 sentence Chinese summary', which imposes a specific language choice. This is a natural-language policy concern because the file does not offer users a language option or explain a justified region-specific requirement.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

This markdown file describes generating Markdown/PDF reports and updating history.json, which are file-modifying operations. The description states the outputs but does not warn the user that running the step will overwrite or mutate files in the output directory and the skill data directory.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

This markdown template hardcodes all table headers and field labels in Chinese, which imposes a specific language on generated output. There is no accompanying indication that the user can choose the output language or that the template is intended only for a Chinese-language or region-specific workflow.

Content

No source excerpt is available for this finding.