Back to skill

Security audit

Hunter Search v1.0

Security checks for vulnerabilities and agentic risk

Overview

The skill does what it claims for Hunter batch exports, but its download code can let a remote response choose a local file path and overwrite writable files.

Review before installing. Use a limited-scope Hunter API key if available, prefer HUNTER_API_KEY over --api-key, avoid verbose HTTP logging, and run the tool from a low-risk working directory until the download path is constrained and overwrite protection is added.

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)

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/hunter_batch_cli.py:139
Finding

Hunter API Key Transmitted in URL Query Parameters

Content
View full analysis
bool: # 轮询导出任务,直到完成或超时 status_url = f"{API_URL}/{task_id}" params = {"api-key": api_key} deadline = time.time() + timeout_sec print("\n开始轮询任务进度...") while time.time() < deadline: try: # 查询当前任务进度 resp = requests.get(status_url, params=params, timeout=30) ``` ```python def _download_result(task_id: str, api_key: str, output_file: Optional[str] = None) -> Optional[Path]: """下载导出结果文件,成功返回本地文件路径。""" download_url = f"{DOWNLOAD_BASE_URL}/{task_id}" params = {"api-key": api_key} fallback_name = output_file or f"hunter_task_{task_id}.csv" try: resp = requests.get(download_url, params=params, timeout=60, stream=True) ``` ```python response = requests.post(API_URL, params=params, timeout=30) ``` ### Technical Analysis The code includes the Hunter API key in the `params` argument of both GET and POST requests. Python Requests serializes `params` into the URL query string, so the resulting URLs contain `api-key=`. TLS protects the request from passive network interception, but it does not prevent URLs from being recorded by components that legitimately process or observe the request. Potential recording locations include: - Hunter server access logs - Forward or reverse proxy logs - Endpoint monitoring and observability systems - Debug-level HTTP client logs - Exception and diagnostic output containing the prepared request URL - Redirect-handling infrastructure The network connection itself is necessary for the Skill's declared Hunter export functionality, and the requests are directed to the documented `hunter.qianxin.com` service. The is ...[truncated 1109 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
scripts/hunter_batch_cli.py:164
Finding

Server-Controlled Download Filename Allows Path Traversal and File Overwrite

Content
View full analysis
str: # 优先从响应头提取服务端建议文件名 cd = resp.headers.get("Content-Disposition", "") match = re.search(r'filename="?([^";]+)"?', cd) if match: return match.group(1) return fallback_name ``` ```python filename = _guess_filename(resp, fallback_name) # 下载接口通常会重定向到对象存储,这里按流式写入避免大文件占内存 path = Path(filename) with path.open("wb") as f: for chunk in resp.iter_content(chunk_size=8192): if chunk: f.write(chunk) ``` ### Technical Analysis The script extracts a filename from the remote `Content-Disposition` header and passes it directly to `Path`. It does not: - Remove directory components - Reject absolute paths - Reject `..` traversal components - Constrain the destination to an approved output directory - Check whether an existing file will be overwritten Opening the resulting path with `"wb"` creates the file or truncates an existing file. A filename such as `../../target-file`, or an absolute path on the current platform, can therefore escape the expected working directory. Python Requests follows redirects by default for GET requests. The download may consequently receive its final headers and content from redirected object-storage infrastructure. A compromised service, compromised redirected endpoint, or malicious response path could control the filename. ### Attack Path 1. The user runs a Hunter export and the script requests the download endpoint. 2. The endpoint or a redirected download service returns a `Content-Disposition` header containing a crafted filename, such as `../../.bashrc`. 3. `_guess_filename` returns the value without sanitization. 4. `Path(filename)` resolves the relative ...[truncated 989 chars]
Remediation
View remediation

T08 · Insecure Dependencies

Note
Location
scripts/requirements.txt:1
Finding

Unpinned Third-Party Dependency Reduces Supply-Chain Integrity

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
Findings (5)

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
94% confidence
Finding

The skill advertises executable behavior that uses environment variables and network access, but the manifest declares no explicit tool scope or permission boundaries. In an agent system, this can cause the skill to be invoked without clear operator awareness of its capability to exfiltrate secrets from env or make outbound API calls, increasing the risk of misuse or over-privileged execution.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The trigger description is broad enough that common mentions of Hunter, asset mapping, bulk export, or task_id downloads may auto-load this skill outside a clearly intended context. That raises the chance of unintended invocation of a network-capable skill that can process user-supplied queries and use sensitive API credentials, which is a security and governance risk even if the underlying API is legitimate.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
73% confidence
Finding

All user-facing natural-language instructions and the description are written only in Chinese, with no indication that the skill supports or allows another language. Under the stated policy, a locale or language constraint should be explicitly optional or justified if the skill is intended to operate only for a specific language context.

Content

No source excerpt is available for this finding.

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
98% confidence
Finding

The dependency manifest includes requests without a version pin, which makes builds non-reproducible and can silently pull in vulnerable or breaking releases. In a security-focused skill that interacts with external APIs and may handle credentials or downloaded export artifacts, this increases supply-chain and operational risk because the exact installed version cannot be audited or guaranteed.

Content

Scanner excerpt · scripts/requirements.txt (reported line 1)May include surrounding context.

text
requests

Unverifiable Dependency: requests has 16 known advisory(ies) (CVE-2014-1830 (Exposure of Sensitive Information to an Unauthorized Actor in Requests); CVE-2024-47081 (Requests vulnerable to .netrc credentials leak via malicious URLs); CVE-2024-35195 (Requests `Session` object does not verify requests after making first request wi) +13 more), but the manifest does not pin a version, so it is unknown whether the installed release is affected

Low
Category
Supply Chain
Confidence
95% confidence
Finding

Because requests is unpinned, it is impossible to verify whether deployment will use a version affected by known advisories, including issues involving credential leakage or TLS/verification weaknesses. Given this skill is used for Hunter OpenAPI asset export and may process API tokens, network responses, and file downloads, an affected requests release could expose sensitive credentials or weaken transport security.

Content

No source excerpt is available for this finding.