T09 · Insecure Skill Coding Practices
- Location
plugin.ts:92- Finding
Hardcoded Tavily API Credential Exposed in Source Code
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This search skill mostly matches its web-search purpose, but it under-discloses local script execution and hardcoded/shared Tavily credential use.
Review this skill before installing. It can send search queries to third-party services, uses a shared hardcoded Tavily fallback credential, and may execute an external Python script from a fixed Windows path that is not included in the reviewed package. Prefer a version that removes the embedded key, calls Tavily directly through reviewed code, and documents all network and subprocess behavior.
plugin.ts:92Hardcoded Tavily API Credential Exposed in Source Code
plugin.ts:94Execution of Unreviewed External Python Script with API Credential
This is a significant description-behavior mismatch: the skill claims to be a simple web search wrapper, but static analysis indicates undisclosed local script execution, hardcoded/default API key handling, inaccurate engine routing, and direct scraping behavior. Undisclosed execution paths and credential use can conceal risky actions, bypass user expectations, and expose secrets or create unauthorized network activity.
The search tool invokes a local Python script via subprocess for the Tavily path, which exceeds the minimally necessary capability for a web-search skill. Spawning local executables broadens the attack surface to local code execution, script tampering, and environment abuse, especially because the path is fixed and receives privileged credentials via environment variables.
The 'multi' engine path again launches a local Python script instead of performing a bounded search operation. This gives a nominal search skill unnecessary execution capability and creates risk of arbitrary local code execution or misuse if the script is modified, replaced, or behaves unexpectedly.
The skill advertises web-search functionality but does not declare tool scope despite requiring network and environment access. Missing explicit permissions reduces transparency and reviewability, making it easier for a skill to access sensitive resources or perform outbound requests without informed approval.
The automatic engine-selection logic is described and implemented around Chinese-language and China-specific query heuristics, using Chinese-only comments and routing rules for terms like 中国, 国内, 百度, 微信, and 抖音. This creates a locale-specific behavior bias without any user choice or documented opt-in, which matches the language/locale policy concern.
This path performs subprocess execution without any user-facing disclosure, even though users would reasonably expect a search tool to make network requests rather than execute local programs. Hidden execution semantics reduce transparency and can mask elevated-risk behavior such as local script execution and secret propagation to child processes.
The code comments and description claim a multi-engine path without an API key, but the implementation actually runs a Tavily script and injects a Tavily API key. This mismatch is dangerous because it conceals credential use and true behavior from reviewers and users, undermining informed consent and making abuse or unexpected billing/data exposure harder to detect.
The multi-engine path both accesses a sensitive API key and launches a subprocess without any user-facing warning. This combination is riskier than ordinary hidden implementation detail because it exposes credentials to a child process while presenting the action as a simple search operation.
The code embeds a fallback Tavily API key directly in source, which exposes a live credential to anyone with repository or package access. Hardcoded secrets are routinely harvested and abused for unauthorized API usage, cost fraud, quota exhaustion, and possible linkage to the project owner's account activity.
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
try {
// 使用 Tavily API
const response = await fetch('https://api.tavily.com/search', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
try {
// 使用 Tavily API
const response = await fetch('https://api.tavily.com/search', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
This code sends the user-provided query to https://api.tavily.com/search, which is a network operation that can transmit user data off-system. Although there is an internal comment and an error log, there is no user-facing prompt, disclosure, or warning in the file explaining that queries are sent to a third-party service.
The tool description is written only in Chinese and instructs use of the tool in that locale, while the manifest does not state that the skill is intended only for Chinese-speaking users or provide any language/locale opt-in. This creates a natural-language locale policy concern because the skill appears to impose a specific language without user choice or justification.
This code file contains natural-language comments and API documentation entirely in Chinese, with no indication that the skill is region-specific or that users may choose another language. Under the policy rule for language/locale constraints, this can be a documentation-level locale policy violation when no opt-in or justification is provided.
The file’s human-readable description and comments are written only in Chinese, including the skill description and usage notes. This imposes a specific language context without any indication of user opt-in or a documented region-specific requirement, which matches the locale/language policy concern.
The natural-language comments are written only in Chinese and do not indicate that language selection is optional or intentionally constrained to a Chinese-speaking context. Under the policy, a fixed language can be a locale-choice issue when no opt-in or justification is provided.
The code sends the user's search query to a SearXNG endpoint over HTTP by default when SEARXNG_URL is not set, which means queries may be exposed in cleartext to the local network, proxies, or other intermediaries if the service is reached over an unsecured interface. In a search skill, user queries can contain sensitive prompts, making this a real privacy and data-exposure issue even though it is not direct code execution.
The only human-readable instructional text in this file is written in Chinese, which can create a language/locale constraint for maintainers or users without any opt-in or justification. Under the policy, forcing a specific language without user choice or documented regional need is a natural-language policy concern.
Detected: suspicious.env_credential_access