Back to skill

Security audit

Clinical Trial Sample Size / 临床试验样本量专家

Security checks for vulnerabilities and agentic risk

Overview

ClawScan marks this skill suspicious because it reports undeclared data flows, extra file and credential access, and mismatches between advertised behavior and implementation; analysis was partial, so the evidence is incomplete.

Treat this as a review-needed skill and weigh the reported data-sharing, file-writing, and output-reliability concerns before installing. In particular, consider whether you are comfortable with remote services receiving inputs, with optional local code execution and persistence paths, and with clinical-design outputs that scanners say may be misleading. The scan covered 85 of 91 components fully; six were partial, including references and changelog content, so it cannot establish that all behavior has been assessed. The verdict is suspicious, not a finding that the author acted maliciously.

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/samplesize_power.py
Finding

Default-preview promise is not enforced before cloud transmission

Content
View full analysis

Impact

Unpublished trial-design assumptions can leave the machine before the user approves transmission.

T09 · Insecure Skill Coding Practices

Warning
Location
adapters/rendering.py
Finding

Remote figures become executable content in local HTML reports

Content
View full analysis

Impact

Injected JavaScript can read and transmit report contents, modify displayed results, or insert deceptive UI when the report is opened. Arbitrary local filesystem access and operating-system code execution are not established.

Vulnerability Patterns
  • Taint TrackingDirect Taint Flow, Variable-Mediated Taint Flow, Credential Exfiltration Chain
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (129)

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

Critical
Category
Data Flow
Confidence
99% confidence
Finding

The URL actually originates from a remote response manifest, not directly from an environment variable as reported. Passing it unchecked to urlopen permits response-driven requests to internal services or supported non-HTTP resources, bypassing the authorization gate; the storage='s3' label does not constrain the destination.

Content

Scanner excerpt · adapters/coze_client.py (reported line 893)May include surrounding context.

python
"""
    url = manifest.get("url")
    try:
        with urllib.request.urlopen(url, timeout=timeout) as r:
            manifest_list = json.loads(r.read().decode("utf-8"))
    except Exception:  # noqa: BLE001
        parsed["_manifest_failed"] = True

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

Critical
Category
Data Flow
Confidence
99% confidence
Finding

The response-controlled repro.url is fetched without scheme, destination, or authorization checks. This permits internal-service requests or reading UTF-8 local files through supported URL handlers, with retrieved content propagated into the returned R-code field; the shown code does not itself execute that content.

Content

Scanner excerpt · adapters/coze_client.py (reported line 981)May include surrounding context.

python
repro = parsed.get("repro")
    if isinstance(repro, dict) and repro.get("url") and not repro.get("r"):
        try:
            with urllib.request.urlopen(repro["url"], timeout=timeout) as r:
                repro["r"] = r.read().decode("utf-8")
        except Exception:  # noqa: BLE001
            repro["_repro_fetch_failed"] = True

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

Critical
Category
Data Flow
Confidence
99% confidence
Finding

The full-result URL comes from the remote response rather than directly from the environment. An attacker controlling that response can induce internal-network or local-resource access, and any successfully parsed JSON object becomes the authoritative calculation result—a particularly sensitive trust boundary for clinical-trial design.

Content

Scanner excerpt · adapters/coze_client.py (reported line 1051)May include surrounding context.

python
if not (isinstance(full, dict) and full.get("storage") == "s3" and full.get("url")):
        return None
    try:
        with urllib.request.urlopen(full["url"], timeout=timeout) as r:
            data = json.loads(r.read().decode("utf-8"))
    except Exception:  # noqa: BLE001
        parsed["_full_fetch_failed"] = True

Tainted flow: 'req' from os.environ.get (line 159, credential/environment) → urllib.request.build_opener.open (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 · adapters/llm_config.py (reported line 170)May include surrounding context.

python
},
    )
    opener = urllib.request.build_opener(urllib.request.ProxyHandler({}))
    with opener.open(req, timeout=timeout) as resp:
        raw = resp.read().decode("utf-8", "replace")
    data = json.loads(raw)
    if not isinstance(data, dict) or data.get("status") != "ok":

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

A hardware- or OS-derived persistent fingerprint is materially more identifying than the disclosed hostname hash. In combination with the reported telemetry paths, it enables unexpected cross-session or cross-account correlation; hashing a stable identifier does not eliminate that privacy risk.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The description promises full reproducible R code by default without disclosing method-specific exclusions or payment gating. In contrast, r_code_unavailable defaults to paid=False and returns True for every method in the 27-entry restriction list; paid=True bypasses that restriction. The module also defines replacement messages stating that the free skill does not provide the corresponding R code. This materially limits a declared output capability. The supplied chunk does not itself perform calculations, render figures, transmit data, or write files, so no additional resource-access mismatch is established.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The supplied module's purpose is registry-search query planning, which is materially different from the declared statistical calculation tool. It contains no sample-size or power calculations, R-code generation, or figure generation, and its search-specific behavior is not an evident supporting implementation detail of those capabilities. The code itself makes no network requests and performs no filesystem writes, so there is no demonstrated resource-access violation or data exfiltration; the mismatch concerns its actual functional purpose.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The supplied module implements build_define_xml and validate_define_xml, not statistical trial-design calculations. It serializes metadata with ElementTree to out_dir/define.xml and reads XML files for validation. No sample-size or power computation, R-code generation, SVG rendering, or Coze integration appears in this chunk. The absence of networking is not itself a mismatch because over-declared permissions are excluded; the mismatch is the unrelated implemented capability and additional XML write behavior. No network transmission or malicious behavior is evident in the supplied code.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

Public literature search is broadly contemplated by the guardrail, so using PubMed is not inherently suspicious. The reported direct transmission of supplied queries without enforcing the confidential-content boundary can nevertheless disclose unpublished trial details, especially when queries are derived from uploaded documents.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

Sending supplied keywords to translation providers creates an additional outbound content channel beyond the prominently disclosed compute request. Clinical keywords can encode confidential protocol or sponsor information, and a general statement allowing public searches does not authorize sending nonpublic text to translators.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The reported bug-report path sends free text and additional identifiers beyond the narrow outbound disclosure, while key/type filtering does not remove confidential content. In a clinical-trial workflow, diagnostic descriptions can contain patient information or unpublished sponsor material; the local Markdown output is not the principal security concern.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The reported unsanitized resolved_spec path can bypass the promised outbound restrictions, and billing credentials require stronger handling than ordinary metadata. Following server-supplied URLs without destination validation also lets a compromised service induce requests to unintended or internal endpoints; ordinary request metadata alone is not a vulnerability.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

Credential lookup and endpoint configuration are supporting implementation details consistent with remote computation. However, the token-persistence function introduces filesystem mutations not covered by the declared permissions. These writes occur only if store_token() is invoked; this chunk does not invoke it automatically. The supplied code makes no network requests and provides no evidence of patient-data transmission. Claims in comments that the embedded credential is public or authorized do not resolve the filesystem-permission mismatch.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The simulation verifier supports the declared clinical-trial calculation purpose and is not itself a purpose mismatch. However, cache_path() and run_verify() write ct_ss_verify.json files under tempfile.gettempdir() by default, and main() opens the unrestricted --json path for writing. These behaviors contradict the explicit otherwise-read-only filesystem declaration. The lack of remote computation, SVG generation, or R-code output in this supporting chunk does not independently establish a mismatch for the complete skill.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

Localization and terminology lookup are reasonable supporting implementation details, so their presence does not establish a different primary purpose. However, language persistence introduces explicit write and delete capabilities beyond the declared filesystem permissions. These operations occur when the corresponding functions are called, not automatically on import. Message strings mentioning R execution, package installation, or other clinical tools do not demonstrate those behaviors, and this partial module cannot verify the broader calculation claims.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

In _render_single_result(), r_code_unavailable(test, paid=is_paid_env()) suppresses both printed R source and its inclusion in HTML reports for policy-restricted methods. This materially qualifies the unconditional default-R-code promise. Separately, --verify-json is passed directly to open(..., 'w'), allowing creation or overwriting of a non-figure JSON file outside CTSS_OUTPUT_DIR, contrary to the stated otherwise-read-only filesystem permission. The primary clinical-trial purpose and triggers otherwise align. Network payload stripping, hostname hashing, and backend implementation cannot be verified from this chunk because they are delegated to imported modules.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The reported fallback reads another application's credential store, exceeding the disclosed credential boundary. Executing a selected Python configuration file also creates a local code-execution surface if an attacker can influence that file or its selection; mentioning load_llm_key does not make arbitrary configuration execution safe.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

Generating parameter contracts is a supporting implementation detail consistent with the clinical-trial tool, so the absence of calculations or figures in this chunk is not itself a mismatch. However, its explicit writes to configuration and Python source files contradict the declared filesystem restriction of figure outputs only and otherwise read-only access. The chunk shows no network transmission, patient-data access, or execution of the parsed CLI code.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

The CLI opens the supplied --out path in write mode without restricting it to CTSS_OUTPUT_DIR or checking the output type, allowing creation or truncation of files wherever the process has permission. This contradicts the explicit otherwise-read-only filesystem declaration. The statistical alpha-allocation functionality is reasonably related to clinical-trial design and could be a supporting module; its lack of sample-size calculations, remote calls, SVG generation, or R output does not alone establish a mismatch for this partial code chunk.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

The mismatch is not simply that this supporting module lacks clinical calculations or remote requests. Its implemented execution path materially conflicts with explicit resource restrictions: run_r(..., confirmed=True) performs local computation and writes executable scripts into the system temporary directory. The forbidden-operation scan blocks selected call patterns but does not enforce a trial-calculation-only execution boundary or restrict all R filesystem writes to CTSS_OUTPUT_DIR. Execution is disabled by default, and this chunk does not establish that another component invokes it, but the conflicting capability is implemented.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

The supplied chunk implements a drug-name resolver rather than sample-size or power calculations. Its drug/event prompts and explicit openFDA reference indicate a drug-query preparation function not described in the declared purpose. No connection to the declared calculations is visible in this chunk. It only reads local mapping files and interacts through standard input/output; it does not itself contact openFDA, transmit data, or write files.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

The statistical tasks and optional PNG output fit the declared clinical-trial purpose and filesystem permissions. However, the documented execution model materially contradicts the declaration that remote Coze computation is required and no local fallback exists. This assessment concerns the supplied commands and comments; the underlying simulator implementations are not included, so their execution and data-handling behavior cannot be independently verified.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

Local calculation is not itself a security vulnerability, and HTML reporting is described elsewhere in the skill. The reported unrestricted filename prefix can, however, escape the selected output directory and overwrite user-writable files if influenced by untrusted input; silently falling back to the current directory further weakens output containment.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

Dynamic backend configuration is mentioned in the skill, so its existence is not wholly concealed. However, the reported credential transmission and remotely selected provider URL introduce trust boundaries absent from the narrow permissions disclosure; compromised configuration could redirect subsequent model traffic or credentials if accepted without validation.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
93% confidence
Finding

The assumption-reporting functionality is a legitimate supporting component of the declared clinical-trial tool; the absence of calculations, R code, or SVG generation in this individual module is not itself a mismatch. However, the CLI uses open(a.out, "w") without restricting the destination to CTSS_OUTPUT_DIR. This introduces a filesystem write capability outside the explicitly declared figure-only write scope.

Content

No source excerpt is available for this finding.