Back to skill

Security audit

律师民事诉讼全流程自动化工作流

Security checks for vulnerabilities and agentic risk

Overview

This legal-workflow skill is not malicious, but it needs review because it handles confidential case data with broad local write authority and weak path/privacy controls.

Review before installing. Use only on a trusted machine and with non-sensitive test data first; avoid case names containing slashes, absolute paths, or '..'; do not place privileged evidence in a shared or synced folder unless you intend that; and expect persistent ~/.lawyer_workflow files plus local trial/license tracking.

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/workspace_setup.py:54
Finding

Path Traversal Through an Unvalidated Case Name Allows Writes Outside the Configured Workspace

Content
View full analysis
Remediation
View remediation
str: if not isinstance(case_name, str) or not SAFE_CASE_NAME.fullmatch(case_name): raise ValueError("Invalid case name") if case_name in {".", ".."}: raise ValueError("Invalid case name") return case_name ``` 2. **Enforce containment after canonicalization** Resolve both the base directory and candidate path, then verify that the candidate is a descendant of the configured case root. ```python def safe_case_path(cases_dir, case_name): safe_name = validate_case_name(case_name) root = Path(cases_dir).expanduser().resolve() candidate = (root / safe_name).resolve() try: candidate.relative_to(root) except ValueError: raise ValueError("Case path escapes the configured workspace") return candidate ``` Use this helper in both `create_case_directory()` and `step1_interview()`. 3. **Defend against symbolic-link traversal** Reject symbolic links in existing path components, or perform writes through directory file descriptors with no-follow semantics where supported. At minimum, revalidate the resolved parent immediately before each write. 4. **Create files without unintended overwrites** Where appropriate, use exclusive creation mode and fail safely if a target file already exists: ```python with case_data_path.open("x", encoding="utf-8") as handle: json.dump(case_data, handle, ensure_ascii=False, indent=2) ``` If updates are required, use an explicit, authenticated overw ...[truncated 560 chars]
Vulnerability Patterns
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • 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 (48)

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

Undeclared filesystem and subprocess-based workspace, config, template, and license management in a legal-case skill can be dangerous because it performs local state changes and potentially processes sensitive case data beyond what users expect from the description. In a litigation workflow, hidden writes to case directories, config paths, or home-directory files increase privacy and integrity risk if users are not informed and if path inputs are not tightly controlled.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

Undeclared filesystem and subprocess-based workspace, config, template, and license management in a legal-case skill can be dangerous because it performs local state changes and potentially processes sensitive case data beyond what users expect from the description. In a litigation workflow, hidden writes to case directories, config paths, or home-directory files increase privacy and integrity risk if users are not informed and if path inputs are not tightly controlled.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
93% confidence
Finding

Undeclared filesystem and subprocess-based workspace, config, template, and license management in a legal-case skill can be dangerous because it performs local state changes and potentially processes sensitive case data beyond what users expect from the description. In a litigation workflow, hidden writes to case directories, config paths, or home-directory files increase privacy and integrity risk if users are not informed and if path inputs are not tightly controlled.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

Undeclared filesystem and subprocess-based workspace, config, template, and license management in a legal-case skill can be dangerous because it performs local state changes and potentially processes sensitive case data beyond what users expect from the description. In a litigation workflow, hidden writes to case directories, config paths, or home-directory files increase privacy and integrity risk if users are not informed and if path inputs are not tightly controlled.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

Undeclared filesystem and subprocess-based workspace, config, template, and license management in a legal-case skill can be dangerous because it performs local state changes and potentially processes sensitive case data beyond what users expect from the description. In a litigation workflow, hidden writes to case directories, config paths, or home-directory files increase privacy and integrity risk if users are not informed and if path inputs are not tightly controlled.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

Undeclared filesystem and subprocess-based workspace, config, template, and license management in a legal-case skill can be dangerous because it performs local state changes and potentially processes sensitive case data beyond what users expect from the description. In a litigation workflow, hidden writes to case directories, config paths, or home-directory files increase privacy and integrity risk if users are not informed and if path inputs are not tightly controlled.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

Undeclared filesystem and subprocess-based workspace, config, template, and license management in a legal-case skill can be dangerous because it performs local state changes and potentially processes sensitive case data beyond what users expect from the description. In a litigation workflow, hidden writes to case directories, config paths, or home-directory files increase privacy and integrity risk if users are not informed and if path inputs are not tightly controlled.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

Undeclared filesystem and subprocess-based workspace, config, template, and license management in a legal-case skill can be dangerous because it performs local state changes and potentially processes sensitive case data beyond what users expect from the description. In a litigation workflow, hidden writes to case directories, config paths, or home-directory files increase privacy and integrity risk if users are not informed and if path inputs are not tightly controlled.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

Undeclared filesystem and subprocess-based workspace, config, template, and license management in a legal-case skill can be dangerous because it performs local state changes and potentially processes sensitive case data beyond what users expect from the description. In a litigation workflow, hidden writes to case directories, config paths, or home-directory files increase privacy and integrity risk if users are not informed and if path inputs are not tightly controlled.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

Undeclared filesystem and subprocess-based workspace, config, template, and license management in a legal-case skill can be dangerous because it performs local state changes and potentially processes sensitive case data beyond what users expect from the description. In a litigation workflow, hidden writes to case directories, config paths, or home-directory files increase privacy and integrity risk if users are not informed and if path inputs are not tightly controlled.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

文件整体以中文描述并将触发词、交互回复词和产出文书流程都固定为中文,但没有向用户提供语言/locale 选择,也未明确说明该限制仅适用于特定中文法域合规场景。根据规则,强制特定语言而无用户 opt-in 属于自然语言政策问题。

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The trigger list includes broad legal terms such as 起诉, 应诉, 答辩, 民事案件, and common dispute categories, which can cause the skill to activate on ordinary legal discussion rather than an intentional request to run a high-impact workflow. Because the skill is designed to create directories, process evidence, and invoke scripts, overbroad triggering raises the risk of unintended handling of sensitive legal data and accidental workflow execution.

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 written entirely in Chinese and presents the workflow as a fixed litigation system for Chinese civil practice, with no indication that users can choose another language or locale. Under the policy rule, forcing a specific language or locale without opt-in is a natural-language policy concern unless the regional constraint is clearly documented and justified.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The guide describes creating and storing case files, evidence, intermediate data, and final legal documents in a local workspace without any privacy, access-control, retention, or encryption guidance. Because this workflow handles highly sensitive client and litigation information, omission of data-handling safeguards can lead users to store confidential materials insecurely, increasing the risk of unauthorized access, leakage, or compliance violations.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
85% confidence
Finding

The document states the final stage performs fully automatic reasoning/audit reporting without pause, yet the workflow processes potentially sensitive legal materials. Fully unattended processing increases the risk of unauthorized handling, exposure of confidential case details, and unreviewed output being treated as reliable legal analysis.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The SOP explicitly describes automatic file writes to JSON data stores and automatic retries, but provides no warning, confirmation boundary, or rollback guidance. In a legal workflow handling sensitive case facts, unattended or repeated writes can overwrite source-of-truth data, propagate bad inputs, or create privacy and integrity issues across downstream steps.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

This markdown file contains only Chinese-language instructions and does not indicate that users may choose another language or that the skill is intentionally restricted to a Chinese-speaking context. Under the language/locale policy, forcing a specific language without user opt-in can be a natural-language policy violation.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The entire skill file is written as mandatory operating rules in Chinese 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 documented and justified.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

This code file contains natural-language instructions, help text, and operational guidance only in Chinese, including usage, activation steps, and contact workflow. That imposes a specific language/locale on all users without offering any alternative or opt-in, which matches the language/locale policy violation criteria.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The manifest describes a legal reasoning and document-generation pipeline for litigation work, but this file implements device identification, license activation, pricing display, and direct developer contact disclosure. Those commercial licensing capabilities are not part of the stated user-facing legal workflow and are not justified by the manifest's described purpose.

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 CLI/report strings are written exclusively in Chinese, framing the tool as a mandatory checker without any indication that users may select another language. Under the stated policy, forcing a specific language without opt-in is a natural-language locale violation unless the constraint is explicitly justified.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

This Python file contains the primary module description and generated report labels entirely in Chinese, indicating the skill is designed to operate in a fixed language. Under the policy, forcing a specific language without user opt-in is a natural-language policy violation unless the locale constraint is explicitly documented and justified.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The report formatter emits all section headings and labels in Chinese, which enforces a single language for end-user output. Because the file does not provide any mechanism for locale selection or note that the skill is intentionally region/language-specific, this conflicts with the language-choice policy.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The manifest describes a seven-step lawyer-style litigation analysis and document-generation pipeline, but this file implements trial enforcement, activation, and purchase prompting instead of legal reasoning, drafting, retrieval, or QC workflow logic. While packaging/support code can exist, this module’s entire behavior is commercial license management rather than the claimed substantive workflow capability.

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 described user-facing behavior are presented exclusively in Chinese, which indicates a fixed language choice for the skill's interaction model. The policy allows locale constraints only when the user is given a choice or the restriction is clearly documented and justified; neither is present here.

Content

No source excerpt is available for this finding.

Static analysis

Detected: suspicious.obfuscated_code

Potential obfuscated payload detected.

Warn
Code
suspicious.obfuscated_code
Location
scripts/license_manager.py:27