Back to skill

Security audit

didit-document-ai

Security checks for vulnerabilities and agentic risk

Overview

ClawScan rates this document-processing skill benign because its reported API and file-handling activity appears aligned with its purpose, while noting that some referenced paths were not resolved and coverage is incomplete.

Consider whether you are comfortable sending documents and an API key to the external Didit service, especially if documents contain sensitive information. The verdict is benign, not risk-free, and the scan is marked partial because several referenced local paths could not be resolved.

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
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
  • Taint TrackingDirect Taint Flow, Variable-Mediated Taint Flow, Credential Exfiltration Chain
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
Findings (6)

Tainted flow: 'api_key' from os.environ.get (line 103, credential/environment) → requests.post (network output)

Critical
Category
Data Flow
Confidence
90% confidence
Finding

Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.

Content

Scanner excerpt · scripts/extract_document.py (reported line 111)May include surrounding context.

python
with open(document_path, "rb") as document:
        files = {"document": (os.path.basename(document_path), document)}
        response = requests.post(
            API_URL, headers={"x-api-key": api_key}, files=files, data=data, timeout=timeout
        )

Anti-Refusal Statement

High
Category
Anti-Refusal
Confidence
80% confidence
Finding

Skill instructs the agent to omit warnings, disclaimers, or ethical commentary. Stripping safety caveats hides risk from the user and is a common jailbreak preamble.

Content

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

md
| `document_ai.status` | Meaning | Action |
|---|---|---|
| `"Approved"` | No warning resolved to `DECLINE` or `REVIEW` | Use `extracted_data` |
| `"In Review"` | At least one risk mapped to `REVIEW` (and none to `DECLINE`) | Manual review; read `warnings` |
| `"Declined"` | At least one risk mapped to `DECLINE` | Reject the document or ask for another one |

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

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.

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

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

md
]

with open("payslip.pdf", "rb") as document:
    response = requests.post(
        "https://verification.didit.me/v3/document-ai/",
        headers={"x-api-key": "YOUR_API_KEY"},
        files={"document": ("payslip.pdf", document, "application/pdf")},

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

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

md
form.append("expected_first_name", "Jane");
form.append("expected_last_name", "Doe");

const response = await fetch("https://verification.didit.me/v3/document-ai/", {
  method: "POST",
  headers: { "x-api-key": "YOUR_API_KEY" }, // let fetch set the multipart boundary
  body: form,

Dynamic attribute access via getattr()

Low
Category
Dangerous Code Execution
Confidence
50% confidence
Finding

Dynamic getattr() with a non-literal attribute name can access arbitrary object attributes, potentially bypassing access controls.

Content

Scanner excerpt · scripts/extract_document.py (reported line 86)May include surrounding context.

python
if args.threshold is not None:
        data["document_ai_name_match_score_threshold"] = str(args.threshold)
    for dest, field_name in ACTION_FIELDS.items():
        value = getattr(args, dest)
        if value:
            data[field_name] = value
    if args.no_save: