Back to skill

Security audit

SZZZ Case Study Lite|案例分析技能

Security checks for vulnerabilities and agentic risk

Overview

The skill mostly matches its stated local legal-document workflow, but it needs review because it can copy text from symlinked documents outside the chosen folder and has dependency and deletion-safety gaps.

Review before installing or running on sensitive legal files. Use a trusted, clean project folder without symlinks, install dependencies in a dedicated virtual environment from a trusted index, avoid running reset unless you have confirmed you want to delete generated results, and verify raw text/report outputs before sharing them.

Vulnerability Patterns
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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
Findings (2)

T08 · Insecure Dependencies

Warning
Location
scripts/requirements.txt:1
Finding

Unpinned Python Dependencies Permit Unreviewed Supply-Chain Changes

Content
View full analysis
=0.10.0 # DOCX document reading python-docx>=0.8.11 # Legacy DOC: macOS uses system textutil; other systems require LibreOffice. ``` When imports fail, the program recommends installing these dependencies directly: ```python try: import pdfplumber from docx import Document except ImportError: print("Missing dependencies. Run:") print( shlex.join( [sys.executable, "-m", "pip", "install", "-r", str(REQUIREMENTS_PATH)] ) ) raise SystemExit(1) ``` ### Technical Analysis Both dependencies use open-ended minimum-version constraints. Consequently, a future release satisfying the constraint can be installed without having been reviewed with this project. Transitive dependency versions are also unlocked, and no package hashes are provided to verify artifact integrity. The installation command relies on the user's configured Python package index. If an allowed direct or transitive dependency is compromised, unexpectedly replaced, or resolved through an untrusted package index, package installation or later imports may execute attacker-controlled code with the privileges of the user running `pip` or the Skill. This finding does not establish that either named package is currently malicious. The vulnerability is the absence of reproducible, integrity-verified dependency resolution. ### Attack Path 1. An attacker compromises a future release of an allowed dependency or one of its transitive dependencies, or influences dependency resolution through an untrusted package index. 2. The user follows the documented `p ...[truncated 940 chars]
Remediation
View remediation
python-docx== ``` 2. Generate a lock file that includes all transitive dependencies. 3. Record package hashes and install with integrity enforcement: ```bash python3 -m pip install --require-hashes -r scripts/requirements-lock.txt ``` 4. Review and update locked dependencies through a controlled process that includes vulnerability scanning and regression testing. 5. Recommend installation in a dedicated virtual environment rather than the system Python environment. 6. Document the trusted package index explicitly and discourage installation from arbitrary mirrors. 7. Consider automated dependency monitoring, but do not automatically merge or deploy unreviewed upgrades. ]]>

T05 · Unauthorized Access and Privilege Escalation

Warning
Location
scripts/main.py:272
Finding

Symbolic-Link Following Allows Source Reads Outside the Selected Project Directory

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
Findings (16)

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 22)May include surrounding context.

md
运行脚本时,将工作目录设为本 `SKILL.md` 所在的技能目录。不要假定技能安装在 `~/.claude`;以下相对路径适用于任意安装位置。

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The skill description presents the tool as oriented to Chinese legal text processing and the entire user-facing documentation is in Chinese, without offering a language or locale choice. Under the policy rule, forcing a specific language without opt-in can be a natural-language policy violation unless the locale constraint is clearly documented and justified as region-specific.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
94% confidence
Finding

The skill instructs the agent to run local shell commands and read/write project files, but it does not declare an explicit tool scope such as permissions or allowed-tools. That creates an authorization ambiguity where an agent may execute filesystem and shell operations broader than the user expects, especially because the skill processes arbitrary user-supplied folders and writes derived outputs.

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’s natural-language description and operating instructions are entirely written as a Chinese-only workflow for legal text processing, with no indication that users may choose another language or locale. This can violate language/locale policy because it imposes a specific language context without explicit user choice or a documented opt-in.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

This markdown file contains natural-language instructions entirely in Chinese and directs the analyzer to strictly follow that logic, effectively enforcing a specific language/locale. The policy for this audit flags language or locale constraints when the skill does not provide an explicit user choice or opt-in.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The instructions are written to require Chinese legal writing style and terminology, but there is no indication that the user can opt into another language or that this locale restriction is mandatory for a region-specific tool. Per the policy, forcing a specific language without user opt-in is a natural-language policy violation.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The prompt explicitly requires the agent to call a file-writing tool and save output to a local path, without any instruction to obtain contemporaneous user confirmation or present a user-facing warning before modifying the filesystem. In an agent setting, this creates an integrity and consent risk: the model may perform side effects automatically, and similar patterns can be extended to overwrite existing artifacts or write sensitive derived content to unintended locations.

Content

No source excerpt is available for this finding.

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
70% confidence
Finding

subprocess module calls execute external commands. Without careful input validation, this enables command injection.

Content

Scanner excerpt · scripts/main.py (reported line 244)May include surrounding context.

python
def extract_doc(file_path):
    textutil = shutil.which("textutil")
    if textutil:
        result = subprocess.run(
            [textutil, "-convert", "txt", "-stdout", str(file_path)],
            capture_output=True,
            check=False,

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
70% confidence
Finding

subprocess module calls execute external commands. Without careful input validation, this enables command injection.

Content

Scanner excerpt · scripts/main.py (reported line 258)May include surrounding context.

python
soffice = shutil.which("soffice") or shutil.which("libreoffice")
    if soffice:
        with tempfile.TemporaryDirectory(prefix="szzz-lite-doc-") as temp_dir:
            result = subprocess.run(
                [
                    soffice,
                    "--headless",

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The reset command recursively deletes the entire results directory immediately when invoked, with no interactive confirmation, no --yes guard, and no dry-run preview. In this skill's context, users are working with local legal-analysis project data, so accidental invocation or agent misuse could irreversibly remove generated summaries, reports, and state files, causing data loss and workflow disruption.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
84% confidence
Finding

This markdown file contains user-facing natural language exclusively in Chinese, including the title and all release notes. Under the policy, forcing a specific language without opt-in can be a locale-policy violation unless the constraint is explicitly justified or the skill offers a language choice.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
88% confidence
Finding

The top-level natural-language description forces a specific language/locale presentation without any opt-in or indication that the tool is intentionally region-specific. Under the stated policy, language constraints should be optional or clearly justified.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
91% confidence
Finding

This requirements file uses Chinese-only natural-language comments and installation guidance, which can constitute a language/locale policy issue when no user choice or justification is provided. The policy specifically calls for flagging cases where a skill forces a specific language without opt-in.

Content

No source excerpt is available for this finding.

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
92% confidence
Finding

Using an unpinned dependency such as 'pdfplumber>=0.10.0' allows different environments or future installs to resolve to different versions, which can introduce vulnerable or incompatible releases without review. In a document-processing skill that handles local PDF files, dependency drift increases supply-chain risk and may expose the workflow to parser vulnerabilities triggered by crafted documents.

Content

Scanner excerpt · scripts/requirements.txt (reported line 5)May include surrounding context.

text
# 安装方法:python3 -m pip install -r requirements.txt

# PDF 解析
pdfplumber>=0.10.0

# DOCX 文档读取
python-docx>=0.8.11

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
96% confidence
Finding

Using 'python-docx>=0.8.11' without an exact pin makes builds non-reproducible and can silently pull newer releases or mirrors that have not been validated. Because this skill processes user-supplied or local DOCX legal documents, any parser bug in a resolved version could be reachable by malformed files, increasing supply-chain and document-parsing exposure.

Content

Scanner excerpt · scripts/requirements.txt (reported line 8)May include surrounding context.

text
pdfplumber>=0.10.0

# DOCX 文档读取
python-docx>=0.8.11

# 旧式 DOC:macOS 使用系统 textutil;其他系统需另行安装 LibreOffice。

Unverifiable Dependency: python-docx has 2 known advisory(ies) (CVE-2016-5851 (Improper Restriction of XML External Entity Reference in python-docx); CVE-2016-5851 (python-docx before 0.8.6 allows context-dependent attackers to conduct XML Exter)), but the manifest does not pin a version, so it is unknown whether the installed release is affected

Low
Category
Supply Chain
Confidence
84% confidence
Finding

The manifest does not pin 'python-docx', so it is impossible to verify from this file alone whether deployment will use a version affected by known XXE-related advisories. In a skill that ingests potentially untrusted court documents, unresolved parser-version ambiguity is dangerous because XML external entity issues can lead to file disclosure, SSRF-like behavior, or other parser abuse depending on runtime configuration.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.