Back to skill

Security audit

DeepSeek AI Search

Security checks for vulnerabilities and agentic risk

Overview

This web-search skill does what it claims, but it sends queries and an API bearer token to a default third-party endpoint while publishing a shared API key and giving limited privacy/scoping disclosure.

Review this skill before installing. Use your own limited API key, avoid sending secrets or private code in search queries, and only configure AI_SEARCH_BASE_URL to a provider you trust because that endpoint receives both your query text and bearer credential.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
Findings (3)

other

Error
Location
scripts/search.py:13
Finding

Search Queries and API Credentials Are Disclosed to a Third-Party Proxy

Content
View full analysis
dict: """Execute search using AI model with built-in search capability.""" base_url = os.environ.get("AI_SEARCH_BASE_URL", "https://ai.ch66.top") api_key = os.environ.get("AI_SEARCH_API_KEY") if not api_key: raise ValueError("AI_SEARCH_API_KEY environment variable is not set") url = f"{base_url}/v1/chat/completions" headers = { "Content-Type": "application/json", "Authorization": f"Bearer {api_key}" } payload = { "model": model, "messages": [ {"role": "system", "content": "你是一个具有联网搜索能力的AI助手,每次回答前请先搜索互联网获取最新信息。"}, {"role": "user", "content": query} ], "stream": stream, "tools": [{"type": "web_search", "web_search": {"enabled": True}}], "search_enabled": True } response = requests.post(url, json=payload, headers=headers, timeout=90) response.raise_for_status() return response.json() ``` The third-party endpoint is also explicitly recommended in `SKILL.md:20-24` and `README.md:38-41`: ```bash export AI_SEARCH_API_KEY="sk-5AgmPI8AvsgsR5nYktz8Bs5D7xhrmFiPpQU6feh0XH0QPjCa" export AI_SEARCH_BASE_URL="https://ai.ch66.top" ``` ### Technical Analysis The search operation necessarily requires network communication, so transmitting a search query to a search provider is consistent with the Skill's declared functionality. However, the implementation defaults to `https://ai.ch66.top`, which is presented as a proxy rather than an identified official DeepSeek endpoint. Each request discloses two security-sensitive values to that endpoint: 1. The complete user-supplied search query in the JSON request body. 2. The configured API key in the `Authorizati ...[truncated 2267 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
SKILL.md:15
Finding

Reusable API Credential Is Hard-Coded in Project Documentation

Content
View full analysis
Remediation
View remediation
" ``` 8. If anonymous testing is required, expose a deliberately unauthenticated, rate-limited test service rather than publishing a bearer credential. ]]>

T08 · Insecure Dependencies

Note
Location
README.md:16
Finding

Installation Instructions Use Mutable and Unpinned Dependencies

Content
View full analysis
Remediation
View remediation
``` 2. Publish signed releases and document how users can verify release signatures. 3. Add a dependency manifest or lock file with reviewed versions. 4. Use hashes for reproducible Python package installation, such as a hash-locked requirements file. 5. Review dependency updates before changing pinned versions. 6. Run automated dependency vulnerability and provenance checks in continuous integration. 7. Document the exact Python versions supported by the Skill. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • System Prompt LeakageDirect Leakage, Indirect Extraction, Tool-Based Exfiltration
  • Rogue AgentSelf-Modification, Session Persistence
  • Taint TrackingDirect Taint Flow, Variable-Mediated Taint Flow, Credential Exfiltration Chain
Findings (13)

Tainted flow: 'url' from os.environ.get (line 21, credential/environment) → requests.post (network output)

Critical
Category
Data Flow
Confidence
94% confidence
Finding

The request destination is taken directly from the AI_SEARCH_BASE_URL environment variable and combined with an Authorization bearer token, so anyone who can influence runtime environment configuration can redirect requests and exfiltrate the API key and all submitted search queries to an attacker-controlled service. In a skill whose purpose is web search, external transmission is expected, but allowing an unvalidated arbitrary base URL materially increases SSRF-style and credential-lelay risk beyond normal operation.

Content

Scanner excerpt · scripts/search.py (reported line 38)May include surrounding context.

python
"search_enabled": True
    }

    response = requests.post(url, json=payload, headers=headers, timeout=90)
    response.raise_for_status()
    return response.json()

Agent Config Directory Access

High
Category
Agent Snooping
Confidence
90% confidence
Finding

Skill reads from agent configuration directories (.claude/, .codex/, .gemini/). These directories may contain API keys, personal settings, and other credentials that the skill has no legitimate need to access.

Content

Scanner excerpt · README.md (reported line 42)May include surrounding context.

export AI_SEARCH_BASE_URL="https://ai.ch66.top"

text

Or add them to your `~/.claude/settings.json`:

```json
{

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The documentation embeds a hard-coded API key and instructs users to export it, along with a custom base URL, which can redirect credentials and traffic to an untrusted third-party endpoint. This creates a strong risk of secret misuse, unauthorized billing, data exfiltration, and supply-chain style abuse, especially because the key is presented as 'public' despite being used for authenticated API access.

Content

No source excerpt is available for this finding.

Session Persistence

Medium
Category
Rogue Agent
Confidence
60% confidence
Finding

Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Content

Scanner excerpt · README.md (reported line 24)May include surrounding context.

Option 2: Manual installation

  1. Create the skill directory:
bash
mkdir -p ~/.claude/skills/ai-search/scripts

Skill Enumeration

Medium
Category
Agent Snooping
Confidence
85% confidence
Finding

Skill enumerates or reads other installed skills. Access to other skills' SKILL.md files or the skills directory reveals prompt instructions, capabilities, and secrets that should be invisible to peer skills.

Content

Scanner excerpt · README.md (reported line 26)May include surrounding context.

  1. Create the skill directory:
bash
mkdir -p ~/.claude/skills/ai-search/scripts
  1. Download the files:

Skill Enumeration

Medium
Category
Agent Snooping
Confidence
80% confidence
Finding

Skill enumerates or reads other installed skills. Access to other skills' SKILL.md files or the skills directory reveals prompt instructions, capabilities, and secrets that should be invisible to peer skills.

Content

Scanner excerpt · README.md (reported line 30)May include surrounding context.

text

2. Download the files:
- `SKILL.md` → `~/.claude/skills/ai-search/SKILL.md`
- `scripts/search.py` → `~/.claude/skills/ai-search/scripts/search.py`

## Configuration

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The README instructs users to send search queries to a third-party API endpoint but does not clearly disclose that prompt contents and potentially sensitive user data will leave the local environment. This creates a real privacy and data-handling risk because users may assume a local skill only augments Claude Code rather than transmitting content to an external service.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
70% confidence
Finding

Without declared permissions the skill's intent is opaque and cannot be validated.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The usage examples provide only Chinese queries, and the documented default output labels include Chinese text such as '推理过程', '搜索结果', and '使用统计'. This indicates a language/locale constraint in the skill's natural-language interface without any opt-in, alternative language option, or justification that the skill is region-specific.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The embedded system message is written in Chinese and instructs the model to behave in that locale, without offering the user any language choice. This is a natural-language locale policy issue because the skill imposes a specific language context rather than allowing opt-in or selection.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
80% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · scripts/search.py (reported line 38)May include surrounding context.

python
"search_enabled": True
    }

    response = requests.post(url, json=payload, headers=headers, timeout=90)
    response.raise_for_status()
    return response.json()

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The skill sends raw user queries to a third-party API for processing, but the code provides no disclosure, consent prompt, or privacy notice at the point of use. Because search queries may contain sensitive internal data, this can cause unintended data exposure to an external provider even though network transmission is inherent to the feature.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
74% confidence
Finding

The natural-language examples and response format labels are shown in Chinese, which can imply a locale-specific user experience. The file does not state that Chinese output is optional, configurable, or intentionally limited to a region-specific use case.

Content

No source excerpt is available for this finding.

Static analysis

Detected: suspicious.exposed_secret_literal

File appears to expose a hardcoded API secret or token.

Critical
Code
suspicious.exposed_secret_literal
Location
SKILL.md:24