Back to skill

Security audit

statement-extract-and-prove

Security checks for vulnerabilities and agentic risk

Overview

ClawScan gives this skill a benign verdict: the reported activity broadly fits PDF statement extraction, though scanners identify gaps in its verification claims and the review is marked partial.

The verdict is benign, but consider whether the skill’s extraction output is useful without reliable completeness and reconciliation checks. Scanners marked coverage partial because some referenced paths could not be resolved, so the evidence is incomplete; review results carefully before relying on them for bookkeeping.

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
  • 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
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
Findings (8)

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

The supplied code substantially matches the extraction portion of the description, including text-layer processing, column geometry, locale handling, and traceable outputs. However, its central verification promise is not implemented. Summary values, totals rows, and row counts are only recorded; no arithmetic tie-outs are performed, and extraction can return success despite warnings, skipped pages, or low-confidence rows. A separate prove.py is mentioned but neither supplied nor invoked, so it cannot establish verification behavior for this chunk. No unrelated network access, command execution, or other undeclared resource access is evident.

Content

No source excerpt is available for this finding.

Skill declares no tool scope ('permissions' or 'allowed-tools') but code capabilities were detected: 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 workflow permits visual amount extraction even when a PDF has a text layer, contradicting the manifest's explicit prohibition.

Medium
Category
Excessive Agency
Confidence
98% confidence
Finding

The manifest at L03 promises never to read amounts from page images when a text layer exists. However, L79 authorizes rendering a failing page and reading localized rows after band and flag adjustments, and L87 reiterates this exception without restricting it to pages lacking a usable text layer. Marking these values as visual and rerunning the proof does not satisfy the manifest's unconditional restriction.

Content

No source excerpt is available for this finding.

The OCR workflow instructs reading amounts from page images despite the manifest's prohibition when a text layer exists.

Medium
Category
Excessive Agency
Confidence
97% confidence
Finding

The manifest states that the skill never reads amounts from page images when a text layer exists. After creating an OCR text layer (explicitly acknowledged at L32), L52 directs the agent to read a figure from a cropped page image and overwrite the CSV value, contradicting that restriction even though it requires clear visual evidence and provenance flags.

Content

No source excerpt is available for this finding.

Table lines matching footer text are silently discarded, contradicting the promised unassigned-line audit trail.

Medium
Category
Excessive Agency
Confidence
98% confidence
Finding

An unanchored footer regex is applied to entire table lines, so a legitimate transaction description containing text such as 'continued on' can cause the transaction to be silently skipped. Because the line is not recorded in the audit metadata, completeness review loses evidence, and offsetting omissions can escape arithmetic checks when independent totals or counts are unavailable.

Content

No source excerpt is available for this finding.

Rows with missing transaction amounts can still receive a PROVEN verdict, contradicting the manifest's promise to prove extraction completeness and correctness.

Medium
Category
Excessive Agency
Confidence
99% confidence
Finding

Missing amounts only enter the low-confidence queue, while sums omit them and running-balance calculations treat them as zero. If the remaining checks reconcile—for example, when multiple missing amounts offset—the tool can return PROVEN despite unresolved transaction values, creating false assurance for downstream bookkeeping.

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

python
def scanned(out):
    """Rasterize page 1 of us_checking and wrap the image in a PDF: no text layer."""
    png = out / "scan_p1"
    subprocess.run(["pdftoppm", "-r", "110", "-f", "1", "-l", "1", "-png", "-singlefile",
                    str(out / "us_checking.pdf"), str(png)], check=True)
    c = canvas.Canvas(str(out / "scanned.pdf"), pagesize=letter)
    c.drawImage(str(png) + ".png", 0, 0, *letter)

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

python
def run(args, expect=None):
    p = subprocess.run([PY, *map(str, args)], capture_output=True, text=True)
    text = (p.stdout + p.stderr).strip()
    print(text)
    if expect is not None and p.returncode != expect: