T09 · Insecure Skill Coding Practices
- Location
scripts/verify_id.py:25- Finding
Unrestricted Local File Upload to an External Verification Service
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill does what it claims, but it handles government ID data with under-scoped defaults that could expose or retain sensitive personal information.
Review carefully before installing. Use only with informed consent from the document holder, prefer --no-save unless retention is explicitly required, avoid putting personal data in vendor_data, and do not run the helper script in transcripts, CI logs, or shared terminals unless sensitive output is redacted.
scripts/verify_id.py:25Unrestricted Local File Upload to an External Verification Service
scripts/verify_id.py:66Complete Identity Verification Response Printed to Standard Output
scripts/verify_id.py:18Remote Retention of Identity Verification Requests Enabled by Default
Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.
if back_image:
with open(back_image, "rb") as back_f:
files["back_image"] = (os.path.basename(back_image), back_f)
response = requests.post(API_URL, headers=headers, files=files,
data=data, timeout=60)
else:
response = requests.post(API_URL, headers=headers, files=files,
Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.
if back_image:
with open(back_image, "rb") as back_f:
files["back_image"] = (os.path.basename(back_image), back_f)
response = requests.post(API_URL, headers=headers, files=files,
data=data, timeout=60)
else:
response = requests.post(API_URL, headers=headers, files=files,
The documented save_api_request parameter defaults to true, meaning sensitive identity documents and related request data may be retained server-side unless the caller explicitly disables it. Enabling retention by default without a clear warning materially increases privacy exposure, breach impact, and regulatory risk for especially sensitive KYC document data.
The skill requires environment access to an API key and performs outbound network requests, but it does not declare an explicit tool scope such as permissions or allowed-tools. This weakens least-privilege controls and can cause the runtime or reviewer to underappreciate the skill's ability to exfiltrate sensitive identity data to an external service.
This skill transmits highly sensitive identity-document images and extracted PII to a third-party verification service, yet it provides no explicit warning about privacy implications or the need for informed user consent. Because the data includes government IDs, portraits, MRZ data, addresses, and dates of birth, silent transmission can create serious privacy, compliance, and trust risks.
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
import requests
response = requests.post(
"https://verification.didit.me/v3/id-verification/",
headers={"x-api-key": "YOUR_API_KEY"},
files={
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
formData.append("back_image", backImageFile);
formData.append("vendor_data", "user-123");
const response = await fetch("https://verification.didit.me/v3/id-verification/", {
method: "POST",
headers: { "x-api-key": "YOUR_API_KEY" },
body: formData,
The script transmits highly sensitive identity document images to a third-party verification service but provides no explicit runtime warning, consent check, or privacy notice before upload. In the context of KYC and document verification, this is expected functionality, but the sensitivity of passports and IDs makes undisclosed external transfer a meaningful privacy and compliance risk.
Optional vendor/session metadata is forwarded to the third-party API without any warning about disclosure or guidance to avoid placing sensitive personal data in that field. While less severe than uploading the document images themselves, this can still leak internal identifiers or user-linked metadata to an external processor.
No suspicious patterns detected.