T09 · Insecure Skill Coding Practices
- Location
src/document_processor.py:149- Finding
Cloud transmission of document and query content contradicts local-data claims
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This skill appears to be a real knowledge-base manager, but its privacy and access-control claims do not match behavior that can send enterprise document text and queries to external APIs and share/delete data across agents.
Review before installing in any environment with confidential documents. Treat uploaded document text, search queries, and reranked passages as potentially transmitted to DashScope, OpenAI, or any configured compatible endpoint. Do not rely on the documented access-control/isolation claims without adding external controls, run it under a restricted account/virtual environment, protect API keys, validate or lock provider endpoints, and keep backups before using delete/reset commands.
src/document_processor.py:149Cloud transmission of document and query content contradicts local-data claims
src/embedder.py:108Unvalidated custom embedding endpoint can receive API credentials and knowledge-base content
src/manager.py:36Shared knowledge-base operations lack user, tenant, and role authorization
requirements.txt:9Non-reproducible dependency installation expands supply-chain exposure
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
*.db
# Environment
.env
.env.local
# Documents
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
# Environment
.env
.env.local
# Documents
documents/
The use of subprocess or external command execution is materially more sensitive than the declared KB-management purpose suggests. If command execution is present but undocumented, reviewers may underestimate the skill's ability to affect the host system, increasing the chance of unsafe deployment or prompt-triggered command invocation.
The use of subprocess or external command execution is materially more sensitive than the declared KB-management purpose suggests. If command execution is present but undocumented, reviewers may underestimate the skill's ability to affect the host system, increasing the chance of unsafe deployment or prompt-triggered command invocation.
The use of subprocess or external command execution is materially more sensitive than the declared KB-management purpose suggests. If command execution is present but undocumented, reviewers may underestimate the skill's ability to affect the host system, increasing the chance of unsafe deployment or prompt-triggered command invocation.
The use of subprocess or external command execution is materially more sensitive than the declared KB-management purpose suggests. If command execution is present but undocumented, reviewers may underestimate the skill's ability to affect the host system, increasing the chance of unsafe deployment or prompt-triggered command invocation.
The use of subprocess or external command execution is materially more sensitive than the declared KB-management purpose suggests. If command execution is present but undocumented, reviewers may underestimate the skill's ability to affect the host system, increasing the chance of unsafe deployment or prompt-triggered command invocation.
The use of subprocess or external command execution is materially more sensitive than the declared KB-management purpose suggests. If command execution is present but undocumented, reviewers may underestimate the skill's ability to affect the host system, increasing the chance of unsafe deployment or prompt-triggered command invocation.
The use of subprocess or external command execution is materially more sensitive than the declared KB-management purpose suggests. If command execution is present but undocumented, reviewers may underestimate the skill's ability to affect the host system, increasing the chance of unsafe deployment or prompt-triggered command invocation.
The use of subprocess or external command execution is materially more sensitive than the declared KB-management purpose suggests. If command execution is present but undocumented, reviewers may underestimate the skill's ability to affect the host system, increasing the chance of unsafe deployment or prompt-triggered command invocation.
The use of subprocess or external command execution is materially more sensitive than the declared KB-management purpose suggests. If command execution is present but undocumented, reviewers may underestimate the skill's ability to affect the host system, increasing the chance of unsafe deployment or prompt-triggered command invocation.
The documentation claims all data remains local and is not uploaded to the cloud, yet it also instructs users to configure external embedding providers such as DashScope or OpenAI. This is materially misleading because document text or chunks sent for embeddings/reranking may leave the local environment, creating confidentiality and compliance risk for enterprise data.
The code sends both the user query and candidate document text to an external reranker via gte_reranker.rerank(). Because the skill is for enterprise knowledge-base management and business Q&A, those texts may contain internal policies, proprietary data, or sensitive user prompts, making this an actual exfiltration risk.
The external reranker call explicitly transmits the query and candidate document texts without any visible disclosure, consent, or data-minimization controls. In a corporate KB product, this materially increases the chance of leaking sensitive internal content to a third-party API provider.
The code allows a caller to set an arbitrary base_url for the embedding API client, which can redirect all embedded text to any third-party endpoint. In a knowledge-base skill, that may include internal documents, company policies, or user queries, creating a clear exfiltration path and weakening trust boundaries around sensitive enterprise data.
The database reset troubleshooting step instructs users to forcibly remove the local database path and reinitialize it, but does not warn that all indexed content will be lost. Because this skill manages enterprise knowledge, accidental execution could erase operational data and require costly reprocessing or re-upload of source documents.
The quickstart documents recursive force-delete commands for the vector database and document store without any explicit warning that the operation is irreversible. In a knowledge-base management skill, operators are likely to run maintenance commands directly, so missing deletion warnings can realistically cause accidental permanent loss of indexed documents and business knowledge.
The README claims all data remains local and is not uploaded to the cloud, yet the documented use of DashScope or OpenAI implies document text or derived content may be sent to external providers for embeddings or generation. This is dangerous because users may upload confidential enterprise documents under a false privacy assumption, creating compliance, confidentiality, and third-party data exposure risks.
The setup instructions direct users to configure external provider API keys but omit a clear warning that uploaded documents, extracted text, and user queries may be sent to those providers. In an enterprise knowledge-base context, this omission is significant because operators may ingest internal policies, HR data, or other sensitive material without informed consent about third-party processing.
The README asserts that API keys are encrypted, but the documented configuration uses plain environment variables and provides no evidence of encryption at rest or secret-management controls. This can mislead operators into storing sensitive credentials under weaker assumptions than actually implemented, increasing the chance of credential exposure through host compromise, shell history, process inspection, or misconfigured environment dumps.
The skill advertises capabilities that imply shell execution, environment access, and filesystem reads/writes, but it does not declare any explicit tool scope or permission boundaries. This creates an authorization gap where a host agent may invoke a broadly capable skill without clear least-privilege constraints, increasing the risk of unintended file modification, command execution, or secret exposure.
The skill is configured to always load and its description says it should activate for broad classes of business questions, without tight scope constraints. Overbroad triggering can cause the agent to route ordinary conversation or sensitive prompts through a skill that has filesystem, environment, and possible network capabilities, expanding the attack surface and increasing chances of unintended data access.
Instructing the system to activate on direct questions without strong scope limitations creates ambiguous trigger behavior. In context, this is more dangerous because the skill handles enterprise documents and may consult shared KB data or remote APIs, so casual questions could unintentionally expose or process sensitive internal information.
Automatic document search for any direct question is an overly broad activation policy that can silently pull enterprise knowledge into responses. In a shared system-level KB context, that increases the risk of over-disclosure, inappropriate cross-context retrieval, and unnecessary transmission of query/content to external model providers if configured.
The file claims per-instance storage isolation while separately stating that all skills automatically share a fixed system-level data directory. In a multi-agent enterprise setting, shared storage can permit unintended cross-skill or cross-user data access, weakening tenant isolation and confidentiality assumptions.
Detected: suspicious.exposed_secret_literal