Back to skill

Security audit

Legal Brief Drafter

Security checks for vulnerabilities and agentic risk

Overview

This skill is not malicious, but it overstates its legal-analysis capability and runs an unsandboxed script that can read and overwrite user-chosen files containing sensitive legal material.

Install only if you understand that this is a Chinese-language prototype/helper, not a reliable legal-analysis engine. Do not rely on its confidence scores or generated legal conclusions without lawyer review. Run it in a restricted workspace, avoid pointing it at unrelated private files, choose output paths carefully because it can overwrite files, and redact confidential case details before use or publication.

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
script.py:29
Finding

Unrestricted Local File Access in an Unsandboxed Execution Context

Content
View full analysis
Remediation
View remediation
Path: candidate = Path(raw_path).expanduser().resolve() if candidate != WORKSPACE and WORKSPACE not in candidate.parents: raise ValueError("Path is outside the approved workspace") return candidate ``` 3. Use separate validation policies for input and output files: - Require input files to exist and be regular files. - Reject device files, sockets, and directories. - Reject symbolic links or validate their resolved destinations. - Permit only expected document extensions where appropriate. 4. Avoid silent overwrites. Use exclusive creation mode or require an explicit overwrite option: ```python with output_path.open("x", encoding="utf-8") as output_file: output_file.write(content) ``` 5. If overwriting is necessary, write to a temporary file in the approved output directory and atomically replace the destination after validation. 6. Apply input-size limits before loading an entire file into memory. 7. Run the skill under a dedicated, least-privileged account with access only to its working directory. ]]>

other

Warning
Location
script.py:86
Finding

Legal Analysis Returns a Fabricated Fixed Confidence Result

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • 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
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (13)

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

The skill advertises legal drafting and analysis capabilities, but the described behavior appears to include undeclared distribution/community publishing functionality and non-core CLI actions unrelated to the stated purpose. This mismatch is dangerous because users and orchestrators may grant trust or permissions based on the declared legal-assistance role while the skill performs additional actions with broader data-handling or publication implications.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill description is presented as Chinese-only and does not indicate that users may choose another language or locale. Under the stated policy, forcing a specific language without opt-in is a natural-language policy violation unless the locale constraint is explicitly justified.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

This skill is explicitly designed to process legal case materials, which commonly include highly sensitive personal data, evidence, and litigation strategy. The README only gives a light privacy suggestion elsewhere and does not clearly require minimization, redaction, secure storage, access controls, or caution against uploading confidential materials, creating a real risk of accidental data exposure or mishandling.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
70% confidence
Finding

Without declared permissions the skill's intent is opaque and cannot be validated.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

This markdown file contains the skill name description, operating instructions, templates, and usage guidance entirely in Chinese. Under the stated policy, forcing a specific language without user opt-in is a natural-language policy violation unless the locale restriction is explicitly documented and justified, which is not present here.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The module header advertises numerous legal drafting, reasoning, strategy, and analytical capabilities that the code does not implement. In a legal-assistance context, capability overstatement is risky because users may rely on nonexistent legal analysis, assume professional-grade reasoning occurred, and make consequential filings or litigation decisions on that basis.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The file’s natural-language interface and documentation are entirely in Chinese, including the title, feature descriptions, help text, and user-facing output, but it does not state that the skill is region-specific or offer any language opt-in. Under the language/locale policy, a skill should not implicitly force a specific language unless the constraint is documented and justified.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The function claims to draft legal documents, but it only copies the input into an output file with a header and timestamp. This is dangerous because users may believe the content was structured, reviewed, or transformed into a legally meaningful document when in fact no drafting logic, validation, or template population occurred.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The analysis function presents itself as legal inference analysis, but it only emits static method descriptions and a hard-coded confidence score. In legal workflows, fabricated analytical confidence can mislead users into trusting conclusions that were never computed from the case facts, creating a risk of poor legal decisions and false assurance.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill’s declared purpose is legal document drafting, but it also exposes a separate publishing workflow that prepares users to distribute the skill to a community registry. That scope expansion is dangerous because it mixes content-processing functionality with ecosystem propagation, increasing the chance that a misleading, overclaimed, or unsafe skill is republished without separate review.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The manifest sets the skill language to "zh-CN", which is a natural-language locale constraint. In this file there is no indication that users can choose another language or that the restriction is documented as an explicit region-specific requirement, so it may violate the policy against forcing a specific language without opt-in.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The manifest sets the skill language to "zh-CN", which indicates a fixed language/locale. Under the policy, a forced language setting is a violation unless the skill offers user choice or clearly documents a justified region-specific constraint, which is not present here.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The report includes concrete commands to publish the skill to ClawHub and optionally push the repository to GitHub, but it does not warn that these actions may transmit the full skill contents, metadata, case-related materials, or embedded local artifacts to external services. In a legal-document drafting skill, that omission is more sensitive because users may reasonably co-locate confidential case files or regulated personal information in the workspace and follow the instructions verbatim.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.