Back to skill

Security audit

省Token数据瘦身(DataSlim)

Security checks for vulnerabilities and agentic risk

Overview

ClawScan rates this skill suspicious with medium confidence because it reports undisclosed persistent storage of chat content and PDF processing that can discard searchable text while counting it as token savings.

The scanner recommends not installing this skill. Before considering it, weigh the reported risk that chat text may be retained locally without clear disclosure and that PDF processing may remove searchable text. The scan covered all listed components, but Skillspector exited with a warning-related error, so the evidence is not fully clean.

Vulnerability Patterns
  • 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
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
Vulnerability Patterns
  • 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
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (8)

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

The reported retention of complete chat text contradicts the documented output boundaries and exposes sensitive content to unexpected local storage. Counting a removed PDF text layer as token savings also risks misleading downstream processing; however, a manually invoked CLI running without an enable flag does not by itself establish a bypass of the agent-level activation policy.

Content

No source excerpt is available for this finding.

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.

PDF processing reports destroyed text as genuine context-token savings.

Medium
Category
Excessive Agency
Confidence
99% confidence
Finding

The output PDF contains rasterized images rather than the original searchable text, yet the script labels the disappearance of extractable text as genuine context-token savings and records it in the ledger. This undermines output and accounting integrity and can steer downstream agents toward less accessible or more expensive image ingestion; retaining the original limits permanent damage.

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/slim.py (reported line 448)May include surrounding context.

python
cmd = ["tesseract", img, tmpout, "-l", lang, "--psm", str(psm)]
    if oem:
        cmd += ["--oem", str(oem)]
    subprocess.run(cmd, capture_output=True)
    txt = open(tmpout + ".txt", encoding="utf-8", errors="replace").read().strip()
    try:
        os.remove(img); os.remove(tmpout + ".txt")

Chat mode claims not to save output but persistently writes both the original conversation and compressed text.

Medium
Category
Excessive Agency
Confidence
100% confidence
Finding

Without --out, chat mode writes both the complete original text and compressed text into persistent files under ~/.data-slim while explicitly claiming the output was not saved. This creates an undisclosed sensitive-data retention surface accessible to processes, backups, or users with access to those files.

Content

No source excerpt is available for this finding.

Chat content is persisted without disclosure, while the user is told no output was saved.

Medium
Category
Output Handling
Confidence
99% confidence
Finding

These writes persist raw conversation content and its compressed version despite the adjacent message stating that no compressed output was saved. This is the same underlying retention defect as the other chat finding, and the misleading status message prevents informed decisions about sensitive local data.

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/slim.py (reported line 862)May include surrounding context.

python
cmd = [sys.executable, os.path.abspath(__file__), _BATCH_SUB[kind], fp]
        if args.model:
            cmd += ["--model", args.model]
        r = subprocess.run(cmd, capture_output=True, text=True)
        out = _outpath(fp, None, _BATCH_SUFFIX[kind])
        try:
            at = token_estimate(read_text(out)); ab = os.path.getsize(out)

The license-command documentation claims no existing features are gated, but batch processing requires a paid-tier license.

Low
Category
Excessive Agency
Confidence
100% confidence
Finding

The cmd_pro docstring states that all functionality is currently free and the command only prepares validation without locking existing features. In contrast, cmd_batch unconditionally calls require_pro() at L842, which terminates execution for missing, invalid, or free-tier licenses at L220–L242.

Content

No source excerpt is available for this finding.