T09 · Insecure Skill Coding Practices
- Location
scripts/doc-search/client.py:428- Finding
Local PDF Files Are Uploaded to a Public Staging Service by Default
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This PDF skill is purpose-aligned, but its default setup can upload private PDFs to a public staging service despite claiming network features are opt-in.
Review the config before installing or using this skill. For private or regulated PDFs, change deployment_mode to local and clear server_url, avoid the public staging endpoint, do not run setup with elevated privileges, and expect local caches/logs to contain document-derived data unless manually cleared.
scripts/doc-search/client.py:428Local PDF Files Are Uploaded to a Public Staging Service by Default
scripts/setup.sh:43Setup Installs Broad, Unpinned Dependencies into the System Python Environment
The documented setup flow includes installing dependencies, modifying configuration, and writing local state, which goes beyond what a user may expect from a PDF-reading skill. Combining setup automation with broad activation increases the risk of unintended system modification or configuration drift.
The documented setup flow includes installing dependencies, modifying configuration, and writing local state, which goes beyond what a user may expect from a PDF-reading skill. Combining setup automation with broad activation increases the risk of unintended system modification or configuration drift.
The documented setup flow includes installing dependencies, modifying configuration, and writing local state, which goes beyond what a user may expect from a PDF-reading skill. Combining setup automation with broad activation increases the risk of unintended system modification or configuration drift.
The documented setup flow includes installing dependencies, modifying configuration, and writing local state, which goes beyond what a user may expect from a PDF-reading skill. Combining setup automation with broad activation increases the risk of unintended system modification or configuration drift.
The documented setup flow includes installing dependencies, modifying configuration, and writing local state, which goes beyond what a user may expect from a PDF-reading skill. Combining setup automation with broad activation increases the risk of unintended system modification or configuration drift.
The documented setup flow includes installing dependencies, modifying configuration, and writing local state, which goes beyond what a user may expect from a PDF-reading skill. Combining setup automation with broad activation increases the risk of unintended system modification or configuration drift.
The documented setup flow includes installing dependencies, modifying configuration, and writing local state, which goes beyond what a user may expect from a PDF-reading skill. Combining setup automation with broad activation increases the risk of unintended system modification or configuration drift.
The documented setup flow includes installing dependencies, modifying configuration, and writing local state, which goes beyond what a user may expect from a PDF-reading skill. Combining setup automation with broad activation increases the risk of unintended system modification or configuration drift.
The documented setup flow includes installing dependencies, modifying configuration, and writing local state, which goes beyond what a user may expect from a PDF-reading skill. Combining setup automation with broad activation increases the risk of unintended system modification or configuration drift.
The documented setup flow includes installing dependencies, modifying configuration, and writing local state, which goes beyond what a user may expect from a PDF-reading skill. Combining setup automation with broad activation increases the risk of unintended system modification or configuration drift.
The documented setup flow includes installing dependencies, modifying configuration, and writing local state, which goes beyond what a user may expect from a PDF-reading skill. Combining setup automation with broad activation increases the risk of unintended system modification or configuration drift.
The documented setup flow includes installing dependencies, modifying configuration, and writing local state, which goes beyond what a user may expect from a PDF-reading skill. Combining setup automation with broad activation increases the risk of unintended system modification or configuration drift.
The documented setup flow includes installing dependencies, modifying configuration, and writing local state, which goes beyond what a user may expect from a PDF-reading skill. Combining setup automation with broad activation increases the risk of unintended system modification or configuration drift.
The documented setup flow includes installing dependencies, modifying configuration, and writing local state, which goes beyond what a user may expect from a PDF-reading skill. Combining setup automation with broad activation increases the risk of unintended system modification or configuration drift.
The documented setup flow includes installing dependencies, modifying configuration, and writing local state, which goes beyond what a user may expect from a PDF-reading skill. Combining setup automation with broad activation increases the risk of unintended system modification or configuration drift.
The documented setup flow includes installing dependencies, modifying configuration, and writing local state, which goes beyond what a user may expect from a PDF-reading skill. Combining setup automation with broad activation increases the risk of unintended system modification or configuration drift.
The documented setup flow includes installing dependencies, modifying configuration, and writing local state, which goes beyond what a user may expect from a PDF-reading skill. Combining setup automation with broad activation increases the risk of unintended system modification or configuration drift.
The code transmits processed image regions to a cloud OCR SDK with no explicit user-facing notice that document contents are leaving the local environment. In a document-reading skill, this is especially dangerous because users may submit sensitive PDFs containing personal, financial, legal, or proprietary data under the assumption of local-only analysis.
The logger is explicitly designed to store all messages in memory and write them to disk, and because this module processes PDF text and LLM prompts/responses, those messages can contain sensitive document contents or derived summaries. In a document-exploration skill, such persistent logging materially increases context leakage risk by broadening access beyond the active processing path and creating durable artifacts that may be read later by other users, tools, or processes.
current_time = datetime.now().strftime("%Y%m%d_%H%M%S")
self.filename = f"{pdf_name}_{current_time}.json"
os.makedirs("./logs", exist_ok=True)
# Initialize empty list to store all messages
self.log_data = []
def log(self, level, message, **kwargs):
Package name closely resembles a popular package, suggesting possible typosquatting. Attackers publish malicious packages with similar names to trick developers into installing them.
Package name closely resembles a popular package, suggesting possible typosquatting. Attackers publish malicious packages with similar names to trick developers into installing them.
The skill declares network, file read/write, and environment-dependent behavior but does not define a restrictive tool scope such as allowed-tools or permissions. That creates an unnecessarily large operational surface for a skill that is advertised as a PDF-reading helper, making misuse, overreach, or accidental invocation of sensitive capabilities more likely.
Marking the skill as REQUIRED for essentially any PDF reading or understanding task is overly broad and increases the blast radius of all risky behaviors in the skill, including network use, file writes, setup actions, and caching. Over-broad activation makes accidental invocation on sensitive PDFs more likely.
The setup workflow instructs the agent to modify local configuration files for optional external services as part of a generally triggered PDF-reading skill. This is dangerous because it mixes content-processing with persistent system changes, increasing the chance of unauthorized or unexpected local modifications.
The mandatory instruction to append lessons learned to references/tips.md causes every PDF task to perform a file write unrelated to the user's request. This creates an unnecessary persistence channel that can leak document-derived information, accumulate prompt-influenced content, and enable cross-task contamination of future runs.
No suspicious patterns detected.