Back to skill

Security audit

Market Access Value

Security checks for vulnerabilities and agentic risk

Overview

The skill mostly matches its market-access purpose, but it needs review because its script can overwrite arbitrary writable files and its academic-writing framing is broader than its payer-value behavior.

Review before installing. Use it only for explicit market-access or pharmacoeconomic drafting, not general academic writing. If run, provide an output path only inside a disposable workspace and avoid pointing --output at existing files until the script adds path confinement and overwrite protection.

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
scripts/main.py:67
Finding

Unrestricted Output Path Allows Arbitrary File Overwrite

Content
View full analysis

Vulnerability Details

File Location: scripts/main.py, lines 67 and 88-89
Vulnerability Type: Unrestricted user-controlled file write
Risk Level: Medium

Vulnerable Code

python
parser.add_argument("--output", "-o", default="value_proposition.txt", help="Output file")
python
with open(args.output, 'w') as f:
    f.write(text)

Technical Analysis

The --output argument accepts an arbitrary path and passes it directly to open() in truncating write mode. The implementation does not normalize or validate the path, confine it to an approved workspace, reject path traversal, check for symbolic links, or require confirmation before overwriting an existing file.

Consequently, absolute paths and traversal paths such as ../target-file can select any destination writable by the process. A symbolic link at the selected path could also redirect the write to another writable destination. Opening the resolved file with mode 'w' truncates it before writing the generated value-proposition text.

This behavior contradicts the output-directory restriction documented in SKILL.md, but that restriction is not enforced by the executable implementation.

Attack Path

  1. An attacker or untrusted caller controls the --output command-line argument.
  2. The caller supplies an absolute path, a ../ traversal path, or a path resolving through a symbolic link.
  3. The script passes the supplied value directly to open(args.output, 'w').
  4. The operating system resolves the destination using the script process's permissions.
  5. If the destination exists and is writable, it is truncated and replaced with generated text. If it does not exist but its parent directory is writable, a new file is created.

Example invocation demonstrating the vulnerable data flow:

bash
python scripts/main.py \
  --name ExampleDrug \
  --indication ExampleIndication \
  --output ../target-file

...[truncated 692 chars]

Remediation
View remediation

Remediation Suggestions

  1. Define an approved output root and resolve all requested output paths relative to it.
  2. Use pathlib.Path.resolve() and verify that the resolved destination remains beneath the approved root.
  3. Reject absolute paths and paths containing traversal outside the output root.
  4. Reject symbolic-link destinations and validate parent path components to mitigate symlink redirection.
  5. Avoid silent truncation. Use exclusive creation mode ('x') by default or require explicit overwrite authorization.
  6. Where replacement is necessary, write to a securely created temporary file inside the approved directory and atomically replace the intended destination after validation.
  7. Handle validation and file-system errors with sanitized messages and a nonzero exit status.
  8. Add tests covering absolute paths, ../ traversal, existing-file overwrite, symbolic links, missing parent directories, and valid workspace-local destinations.

A confinement check should follow this pattern:

python
from pathlib import Path

output_root = (Path.cwd() / "outputs").resolve()
output_root.mkdir(parents=True, exist_ok=True)

requested = Path(args.output)
if requested.is_absolute():
    raise ValueError("Absolute output paths are not allowed")

destination = (output_root / requested).resolve()
if output_root != destination and output_root not in destination.parents:
    raise ValueError("Output path escapes the approved directory")

if destination.exists():
    raise FileExistsError("Refusing to overwrite an existing file")

with destination.open("x", encoding="utf-8") as file:
    file.write(text)
Vulnerability Patterns
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • 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
Findings (8)

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

The manifest presents the skill as an academic writing workflow, while the body describes payer-value, pricing, reimbursement, and file-producing script execution. This mismatch can cause incorrect or overly broad invocation by an agent, leading to unsafe execution, misleading outputs, or use in sensitive commercial decision workflows under a less scrutinized label.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
88% confidence
Finding

The skill documents executable scripts and local output generation, but it does not declare any explicit tool scope or permissions for file-writing behavior. This creates a governance gap where downstream agents may run code or write files without clear authorization boundaries, increasing the risk of unintended filesystem modification.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The top-level description frames the skill as generic academic writing support, but the content is centered on market access and payer value proposition development. Such domain misrepresentation is dangerous because it can route sensitive healthcare pricing or reimbursement work through a skill that appears lower risk and more general than it really is.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The phrase 'for academic writing workflows that need structured execution, explicit assumptions, and clear output boundaries' is very broad and could match many ordinary writing or analysis tasks. The file does not provide concrete trigger phrases, exclusions, or negative examples that would narrow invocation scope enough to avoid unintended activation.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

Lines L013-L015 describe use cases such as needing 'explicit assumptions,' 'bounded scope,' or a 'documented fallback path,' which are generic qualities rather than domain-specific triggers. Because these conditions are common across many workflows, they do not clearly define the boundaries for invoking this particular skill.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The skill instructs the agent to stop when requests are out of scope, but its own scope definition is internally contradictory between academic writing and payer/market-access work. An ambiguous boundary weakens safety controls because agents cannot reliably determine when to refuse, making accidental misuse more likely.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The skill’s declared purpose is an academic writing workflow helper with clear output boundaries, but the implementation actually generates payer-facing pharmacoeconomic value propositions and writes them to disk. This mismatch is dangerous because it undermines user trust, bypasses expected review boundaries, and could be used to covertly produce regulated or persuasive commercial content in contexts where users believe they are invoking a neutral academic-writing tool.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The module and class docstrings explicitly describe generating payer-facing pharmacoeconomic value propositions, which directly contradicts the manifest’s stated academic writing purpose. In security terms, this inconsistency is a real capability-deception issue: downstream users, orchestrators, or policy controls may classify the skill as low-risk academic assistance while it actually produces persuasive market-access material with different compliance and governance requirements.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.