Back to skill

Security audit

ADC研发专利与交易监控(ADC R&D, Patent & Deal Monitoring)

Security checks for vulnerabilities and agentic risk

Overview

The skill has a coherent ADC monitoring purpose, but it should be reviewed because it creates an interactive HTML report from external data without clear sanitization safeguards.

Install only if you are comfortable with the skill running external ADC-related searches and creating local HTML reports. Treat generated reports as untrusted documents unless the publisher adds explicit escaping/sanitization, safe URL validation, and browser defenses for externally sourced content.

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

T09 · Insecure Skill Coding Practices

Warning
Location
SKILL.md:29
Finding

Untrusted External Data Rendered into Active HTML Without Required Sanitization

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 29-175
Vulnerability Type: Unsafe HTML generation from externally sourced data
Risk Level: Medium

Evidence

markdown
## Data Modules and MCP Tool Mapping

| Module | MCP Tool | Filter Parameters |
|------|---------|---------|
| BD deals | `ls_drug_deal_search` | `drug_type=["ADC"]`, `deal_date_from/to` |
| Clinical results | `ls_clinical_trial_result_search` | `drug_type=["ADC"]`, `published_date_from/to` |
| New clinical trials | `ls_clinical_trial_search` | `drug_type=["ADC"]`, `study_first_posted_date_from/to` |
| Patents | `ls_patent_search` | `drug_type=["ADC"]`, `publication_date_from/to` |
| Approved drugs | `ls_drug_search` | `drug_type=["ADC"]`, `highest_phase=["approved"]` |
| Literature | `ls_paper_search` | `drug_type=["ADC"]`, `year_from/to` |
| Conferences | `mcp_web-search__web_search` | ASCO/AACR/ESMO/ASH/JPM plus ADC keywords |

### Step 2A: BD deal processing
- Fields: `deal_title` / `deal_time` / `principle_organization` / `partner_organization` / `url`
- Links: Prefer the original `url` field; otherwise use `synapse.zhihuiya.com/news-detail/{deal_id}`

### Step 2B: Clinical result processing
- Required fields: `trial_name` / `drug` / `target` / `indication` / `phase` /
  `sponsor_org` / `key_endpoints` / `publication_date` / `source_url`

### Step 4: Authoritative conference module
- Perform web searches for ADC-related abstracts from conferences that are ongoing or recently completed.

### Step 6: HTML report rendering specification

#### 6.3 Compact card structure
- Title row: entity name plus badge group plus date
- Tag row: display all properties as inline tags
- Data box: original numeric values only
- Link button: lower-right corner

#### 6.4 `data-tags` specification
Each card's `data-tags` attribute must contain:
`target / drug name / company abbreviation / phase / geography / technology type / 
...[truncated 3606 chars]
Remediation
View remediation

Remediation Suggestions

  1. Apply contextual output encoding

    • Escape all externally sourced values before insertion into HTML element text.
    • Escape quotation marks and other special characters before insertion into attributes.
    • Do not construct HTML through raw string concatenation.
  2. Use safe DOM construction

    • Create elements with DOM APIs.
    • Assign external text through textContent.
    • Set known attributes with setAttribute only after validation.
    • Store filter values in normalized internal structures rather than embedding raw source text in data-tags.
  3. Validate links

    • Parse every URL with a standards-compliant URL parser.
    • Permit only https: URLs.
    • Reject javascript:, data:, file:, and other unintended schemes.
    • Where practical, allowlist expected source domains.
    • Preserve the existing path checks, but treat them as correctness checks rather than security controls.
  4. Sanitize unavoidable HTML

    • If source formatting must be retained, process it through a well-maintained sanitizer configured with a minimal allowlist.
    • Remove scripts, event-handler attributes, embedded frames, forms, unsafe style content, and dangerous URL schemes.
  5. Add browser-level defense in depth

    • Add a restrictive Content Security Policy, such as: default-src 'none'; script-src 'self'; style-src 'unsafe-inline'; img-src https: data:; connect-src 'none'; object-src 'none'; base-uri 'none'; form-action 'none'.
    • Move required JavaScript into a fixed, trusted script and avoid dynamically generated script content.
    • If the report must contain inline JavaScript, use a generated CSP nonce rather than broadly allowing inline scripts.
  6. Test hostile inputs

    • Add test records containing HTML tags, quotation marks, event-handler attributes, encoded payloads, and dangerous URL schemes.
    • Verify that all such values are displayed ...[truncated 26 chars]
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (2)

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The trigger phrases include very broad natural-language requests such as “ADC最新进展” and “过去一个月ADC进展,” which can easily match ordinary user discussion rather than an explicit intent to invoke the skill. This can cause unintended activation of a workflow that performs multiple external searches and generates a downloadable HTML report, potentially leading to unnecessary data retrieval, unexpected tool use, and confusing or excessive output.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
83% confidence
Finding

The overview describes monitoring and report generation but does not clearly warn users that the skill will call external web search tools and produce a downloadable self-contained HTML file aggregating data. This reduces informed consent and transparency, making it easier for users to trigger external retrieval and file generation without realizing the operational and privacy implications.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.