Back to skill

Security audit

Dashboard Design For Trials

Security checks for vulnerabilities and agentic risk

Overview

This skill appears to be a straightforward clinical-trial dashboard generator, but it can overwrite any writable output path and embeds user-provided text into HTML without escaping.

Review before installing or running in automation. Use only trusted study names and IDs, and run it with an output path in a disposable workspace until the script escapes HTML fields and restricts output to a safe directory with overwrite controls.

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

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/main.py:89
Finding

Unescaped CLI Input Allows HTML Injection and Stored Cross-Site Scripting

Content
View full analysis
临床试验Dashboard - {args.study_id} ``` ```python

📊 {args.study_name}

🔬 研究编号: {args.study_id} ``` The affected values originate from command-line arguments: ```python parser.add_argument("--study-id", default="STUDY-001", help="研究编号") parser.add_argument("--study-name", default="临床试验 A", help="研究名称") ``` ### Technical Analysis The `--study-id` and `--study-name` arguments are inserted directly into an HTML document through Python f-string interpolation. No HTML escaping, sanitization, or context-aware output encoding is applied. An attacker can supply HTML containing elements, event handlers, or script markup. For example, a value that terminates the title element and introduces a script element would become executable content in the generated dashboard. The vulnerability is persistent within the generated file because the payload is written to disk and runs whenever that file is opened in a browser. This issue crosses a trust boundary when dashboard parameters are supplied by an untrusted user, imported from automation, or copied from an external source. ### Attack Path 1. An attacker controls or influences the value passed to `--study-id` or `--study-name`. 2. The attacker supplies an HTML payload, for example: ```bash python scripts/main.py \ --study-id '' \ --output dashboard.html ``` 3. `generate_html()` inserts the payload into the generated HTML without escaping it. 4. The script writes the malicious document to `dashboard.html`. 5. A user opens the generated dashboard in a browser. 6. The browser parses and executes the attacker-controlled JavaScript in the ...[truncated 770 chars]
Remediation
View remediation
Clinical Trial Dashboard - {safe_study_id}

📊 {safe_study_name}

🔬 Study ID: {safe_study_id} ``` Additional hardening should include: 1. Prefer a template engine with automatic HTML escaping enabled. 2. Apply context-aware encoding separately for HTML text, HTML attributes, JavaScript, CSS, and URLs. 3. Validate identifiers against a restrictive allowlist where practical, such as letters, digits, spaces, hyphens, and underscores. 4. Add automated tests using payloads containing `

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/main.py:705
Finding

Unrestricted Output Path Allows Overwriting Arbitrary Writable Files

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (3)

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
91% confidence
Finding

The skill advertises file-writing behavior by generating an output HTML file, but it does not declare any explicit tool scope such as permitted file operations or restricted output paths. This creates a mismatch between documented capabilities and declared permissions, which can lead to overbroad file-write access, unsafe defaults, or policy bypass when the skill is executed by an agent framework.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The module docstring and all user-facing descriptions present the skill as Chinese-only, and the generated HTML is explicitly marked with lang="zh-CN". The file does not offer any language/locale opt-in or explain that the skill is region-specific, which matches the language/locale policy violation category.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The HTML template sets <html lang="zh-CN">, enforcing a specific locale for all generated output. Because the file provides no mechanism for user selection or documented justification for this locale restriction, this is a natural-language policy concern.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.