Back to skill

Security audit

goods-search-v2

Security checks for vulnerabilities and agentic risk

Overview

The skill appears intended for shopping search, but it can send API credentials and user query data to an arbitrary configured host.

Review before installing. Use only trusted Volcengine HTTPS endpoints, avoid --api-key on the command line, provide credentials through protected environment or secret management, and do not send sensitive user, location, image, or session data unless that remote transmission is acceptable.

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

Error
Location
scripts/aisearch.py:193
Finding

Bearer Credential and Sensitive Request Data Can Be Redirected to an Arbitrary Host

Content
View full analysis
Dict[str, str]: headers = { "Authorization": f"Bearer {self.api_key}", "Content-Type": "application/json", "Accept": accept, } if self.extra_headers: headers.update(self.extra_headers) return headers def _post_json(self, path: str, payload: Dict[str, Any]) -> Any: url = f"{self.base_url}{path}" headers = self._headers(accept="application/json") try: resp = requests.post(url, headers=headers, json=payload, timeout=self.timeout) except requests.exceptions.RequestException as e: raise RuntimeError(str(e)) from e ``` ```python def _post_stream(self, path: str, payload: Dict[str, Any]) -> requests.Response: url = f"{self.base_url}{path}" headers = self._headers(accept="text/event-stream") try: resp = requests.post( url, headers=headers, json=payload, stream=True, timeout=self.timeout, ) ``` ```python parser.add_argument("--base-url", default="", help="覆盖 VIKING_AISEARCH_API_BASE") parser.add_argument("--api-key", default="", help="覆盖 VIKING_AISEARCH_API_KEY") ``` ### Technical Analysis The destination base URL is accepted from either a command-line argument or an environment variable without validating its scheme, hostname, port, or relationship to the documented Volcengine service. The same client then attaches the Viking AI Search bearer credential to requests sent to that destination. The implementation do ...[truncated 2183 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/viking_aisearch.py:111
Finding

API Key Can Be Exposed Through Command-Line Process Arguments

Content
View full analysis
`. 2. The key becomes part of the process argument vector. 3. The shell may save the command in history, or another local process may inspect the argument vector while the command is running. 4. A local user, CI log reader, monitoring operator, or other party with access to those records obtains the API key. 5. The exposed key is reused against the Viking AI Search service within its assigned permissions. ### Impact Assessment An attacker can obtain the remote service permissions associated with the disclosed API key. Potential consequences include unauthorized API requests, quota consumption, access to application-level search functionality, and access to information available to that credential. The issue does not independently grant local privilege escalation. Exploitation generally requires access to process metadata, command h ...[truncated 70 chars]
Remediation
View remediation

T08 · Insecure Dependencies

Note
Location
requirements.txt:1
Finding

Dependency Version Is Not Reproducibly Pinned

Content
View full analysis
=2.25.0 ``` ### Technical Analysis The project specifies only a minimum version of `requests` and does not define an upper bound, exact lock, or package hash. Each installation can therefore resolve to a different future version that was not reviewed with the Skill. The dependency name is legitimate, and the audit found no evidence of typosquatting or a currently malicious package. The risk is that non-reproducible resolution broadens the trusted supply-chain surface and can introduce unexpected behavior through a future release or compromised package distribution. ### Attack Path 1. The Skill is installed in a new environment. 2. The package resolver selects a later `requests` release satisfying `>=2.25.0`. 3. That release differs from the version originally audited. 4. If the selected release or its dependency chain contains a vulnerability or supply-chain compromise, its code executes when imported or used by the Skill. 5. The compromised dependency inherits the Skill process's access to query data, API credentials, network access, and local process permissions. ### Impact Assessment The practical impact depends on the behavior of the unexpectedly resolved package. A compromised dependency executing in the Skill process could potentially read the API credential, inspect request payloads, alter network traffic, or access resources available to the process. No current compromise was identified. This is a preventative supply-chain and reproducibility weakness rather than evidence that the installed dependency is malicious. ]]>
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • 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
Findings (15)

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/aisearch.py (reported line 27)May include surrounding context.

python
return None


def _load_dotenv(dotenv_path: str = ".env") -> None:
    try:
        base_dir = os.path.dirname(__file__)
        path = dotenv_path or ".env"

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/aisearch.py (reported line 30)May include surrounding context.

python
return None


def _load_dotenv(dotenv_path: str = ".env") -> None:
    try:
        base_dir = os.path.dirname(__file__)
        path = dotenv_path or ".env"

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
92% confidence
Finding

The skill documentation instructs use of a Python script and references capabilities consistent with environment access, file reads, and outbound requests, but it does not declare any explicit tool scope such as permissions or allowed-tools. This creates an authorization gap: the orchestrator may invoke a networked, file-reading skill without a clear least-privilege boundary or user-visible declaration of what resources it can access.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The trigger phrases are very broad and include ordinary shopping language like '推荐', '有没有', and '适合什么', which can match many benign conversations. Over-broad invocation can route unrelated user prompts into a networked commerce/search skill unexpectedly, increasing the chance of unnecessary data exposure, incorrect tool use, or policy bypass through accidental tool selection.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The natural-language instructions and trigger definitions are entirely in Chinese and direct the agent to use this skill whenever matching queries are detected, but there is no indication that language selection is optional or that the skill is intentionally limited to a Chinese-speaking region or audience. This can violate locale policy when used in broader multilingual environments.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

This markdown file describes sending an Authorization bearer token, user fields, and later geolocation context to a remote API, but it does not warn users that these values are sensitive and will be transmitted off-system. Under the markdown-specific warning rule, documentation should disclose behaviors that may affect privacy or system integrity when such data is involved.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

Multiple returned error and status messages are hard-coded in Chinese, such as the messages in _build_chat_input_message, _build_search_query, and later API error/success paths. This enforces a specific language for user-visible outputs without offering locale selection or documenting a justified region-specific constraint.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

This code sends request payloads to an external API via HTTP in both _post_json and _post_stream, and those payloads can include user text, image URLs, context, and user objects supplied by callers. There is no confirmation prompt, user-facing disclosure, or inline warning in this file that such potentially sensitive data will be transmitted off-system.

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/aisearch.py (reported line 241)May include surrounding context.

python
url = f"{self.base_url}{path}"
        headers = self._headers(accept="application/json")
        try:
            resp = requests.post(url, headers=headers, json=payload, timeout=self.timeout)
        except requests.exceptions.RequestException as e:
            raise RuntimeError(str(e)) from e

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/aisearch.py (reported line 269)May include surrounding context.

python
url = f"{self.base_url}{path}"
        headers = self._headers(accept="text/event-stream")
        try:
            resp = requests.post(
                url,
                headers=headers,
                json=payload,

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

Natural-language strings in argument descriptions, epilog text, and error messages are presented only in Chinese. The file does not offer language selection or indicate that the tool is intentionally restricted to a Chinese-speaking or region-specific context, which conflicts with the policy against forcing a language without user opt-in.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
84% confidence
Finding

This code performs chat/search API requests and includes potentially sensitive fields such as user, context, image URLs, and session identifiers in outbound network calls. Although the CLI help describes parameters, there is no confirmation prompt or runtime disclosure warninging the user that these values will be sent to a remote service.

Content

No source excerpt is available for this finding.

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
97% confidence
Finding

The dependency is specified as requests>=2.25.0, which allows installation of any newer version without guaranteeing a reviewed, reproducible, or patched release. This weakens supply-chain control and can unintentionally pull in a vulnerable or breaking version during future installs.

Content

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

text
requests>=2.25.0

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
92% confidence
Finding

requests has multiple historical advisories, and because the manifest does not pin a specific version, there is no way to verify whether deployments will use a fixed or affected release. In a skill that likely performs external search or shopping-related network requests, using an unknown requests version increases the chance of exposure to known HTTP/client-side flaws.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
70% confidence
Finding

The validate action inspects authentication configuration and reports API-key presence, which is credential-related behavior. There is no comment, help text, or user-facing warning about how credentials are sourced from command-line arguments or environment variables, nor guidance to avoid passing secrets via shell history.

Content

No source excerpt is available for this finding.