T09 · Insecure Skill Coding Practices
- Location
scripts/upload_document.py:34- Finding
TLS Certificate Verification Disabled for Sensitive Uploads
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This Paperless-ngx upload skill does what it says, but it uses unsafe defaults for sending documents and API tokens.
Review before installing. Only use this with a Paperless-ngx server you control, prefer HTTPS with valid certificate verification, avoid placing real API keys directly in command history or shared prompts, and do not upload sensitive documents unless you have confirmed the destination and transport security.
scripts/upload_document.py:34TLS Certificate Verification Disabled for Sensitive Uploads
scripts/upload_document.py:56Plaintext HTTP Permitted and Recommended for Credential and Document Transmission
scripts/upload_document.py:57API Token Exposed Through Command-Line Arguments and Documentation
The script uploads document contents and sends an API token while explicitly disabling TLS certificate verification. In the context of a document-management skill, this is especially dangerous because it can expose sensitive documents and credentials to man-in-the-middle interception or server impersonation on untrusted networks.
File contents flow to a network sink. This may indicate data exfiltration of sensitive files.
data["document_type"] = document_type
try:
response = requests.post(url, headers=headers, files=files, data=data, verify=False) # verify=False for self-signed certs
response.raise_for_status() # Raise an HTTPError for bad responses (4xx or 5xx)
print("Document uploaded successfully!")
print(response.json())
The skill documents and enables network-capable behavior against a remote Paperless-ngx instance, but it does not declare any tool scope or permission boundaries. That omission can cause users or agents to invoke network actions without clear policy constraints, increasing the risk of unintended data transfer to external or misconfigured hosts.
The documentation instructs users to provide a host URL and API key for document upload without warning that local file contents and credentials will be transmitted to a remote service. In this context, the skill's core function is exfiltration-capable by design, so missing disclosure and trust-boundary guidance materially increases the chance of sensitive document or credential leakage.
The example command includes an API key inline and demonstrates uploading a local file to a remote host without any secret-handling or data-transfer warning. This encourages unsafe operator behavior, including leaking secrets through shell history, logs, screenshots, and AI-visible command context while simultaneously transmitting document contents off-host.
Embedding a full API key directly in the example shell command is dangerous because shell commands are commonly retained in terminal history, process listings, CI logs, chat transcripts, and screenshots. In the context of a document-upload skill, compromise of that key can enable unauthorized access to the Paperless-ngx instance and abuse of document-management operations.
Using verify=False disables server certificate validation, making HTTPS connections vulnerable to interception and spoofing. Because this skill handles both confidential document contents and an authentication token, the unsafe default materially increases the risk of credential theft and unauthorized document disclosure.
data["document_type"] = document_type
try:
response = requests.post(url, headers=headers, files=files, data=data, verify=False) # verify=False for self-signed certs
response.raise_for_status() # Raise an HTTPError for bad responses (4xx or 5xx)
print("Document uploaded successfully!")
print(response.json())
Including a realistic-looking concrete API key in documentation normalizes pasting secrets directly into prompts, config files, and commands. Even if the sample key is not live, this pattern trains insecure handling practices and can lead users to expose real credentials in places that are logged or shared.
The inline comments describe behavior where Paperless-ngx would create missing tags or associate existing ones by name, and suggest document type naming support, but the code does not perform any API lookup, creation, or translation to IDs. This is an intent/documentation mismatch that could mislead users about what the script actually guarantees.
No suspicious patterns detected.