T09 · Insecure Skill Coding Practices
- Location
langchain_skill.py:26- Finding
Hard-Coded DeepSeek API Credential in Source Code
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This appears to be a real LangChain assistant, but it needs review because it sends prompts to external AI providers and includes a credential-like API key in source.
Review before installing. Avoid sending secrets, personal data, or proprietary material unless you are comfortable with Google Gemini and DeepSeek processing the prompts. The publisher should remove and rotate the embedded DeepSeek key, load credentials from user-controlled environment variables, clearly disclose provider data flows, offer provider selection or local routing, and pin all dependencies.
langchain_skill.py:26Hard-Coded DeepSeek API Credential in Source Code
langchain_skill.py:9Every User Query Is Disclosed to an Additional External LLM Provider
SKILL.md:29Unpinned and Incomplete Third-Party Dependency Installation Instructions
The skill contains a hardcoded DeepSeek API key directly in source code, which is a real secret exposure. Anyone with code access can reuse the credential for unauthorized API calls, incur cost, access associated account resources, and propagate the secret through logs, repos, or model-generated output.
A sensitive API credential is embedded in the code with no warning or disclosure, which creates direct secret leakage risk. In this context, the skill has no legitimate reason to expose a reusable provider credential in source, so the finding is a true and serious vulnerability.
The skill advertises conversation memory but does not clearly warn that prior messages in the session are retained and reused. This creates a privacy risk because users may disclose sensitive information without realizing it can persist in memory and influence later outputs.
The description says the skill supports answering "bằng tiếng Việt," which reads as a fixed language behavior rather than an option the user can choose. Under the language policy, forcing a specific language without opt-in is a natural-language policy concern.
The trigger guidance is inconsistent ('langchain ' and 'langchain: ') and broad enough that a host system may invoke the skill unexpectedly when users casually mention the keyword. Unintended invocation can expose conversation contents to the skill and increase the chance of unauthorized processing of user input.
Telling users to continue chatting with the same keyword 'langchain' is overly broad and may cause the skill to capture unrelated prompts across a session. In a skill with memory, accidental activation is more dangerous because retained context may be reused or disclosed in later responses.
The description mentions future web search and external API integrations without warning that user data may be transmitted to third-party services. Even if framed as extensibility, this normalizes off-system data flows without consent language or handling guidance.
The skill sends user input to Gemini for routing and may later send the query and chat history to Gemini or DeepSeek without any visible consent, notice, or policy disclosure. This is dangerous because users may provide sensitive data under the assumption processing is local, while the code actually forwards content to third-party services.
The code transmits data to an external API endpoint at api.deepseek.com, which is a real external data egress path. In this skill, that path becomes more sensitive because user queries and potentially summarized conversation context are sent off-box, and the same codebase also contains an exposed credential.
# Chọn LLM dựa trên router
if "deepseek" in selected_model:
llm = OpenAI(
openai_api_base="https://api.deepseek.com/v1",
openai_api_key="sk-e7ec5...39506694", # key DeepSeek của Sếp
model_name="deepseek-chat",
temperature=0.7,
The system prompt instructs the assistant to always respond in Vietnamese, which imposes a specific language policy on all users. The file does not offer opt-in/choice or explain a justified region-specific constraint, so this is a natural-language policy violation.
The comment suggests benign internal prompt caching, but the implementation actually transmits user queries and summarized chat history to external LLM providers. This mismatch can mislead reviewers and users about where data goes, increasing the risk of unintentional disclosure of sensitive prompts or conversation context.