Back to skill

Security audit

Enterprise Contact Information Query - 企业联系方式查询

Security checks for vulnerabilities and agentic risk

Overview

This is a straightforward JisuAPI enterprise contact lookup skill with some privacy and API-key handling caveats but no hidden or malicious behavior found.

Install only if you are comfortable sending company names, credit codes, registration numbers, or organization codes to JisuAPI. Use a dedicated, low-quota JISU_API_KEY, rotate it periodically, and avoid submitting sensitive identifiers unless the lookup is necessary and permitted.

Vulnerability Patterns
  • 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
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (1)

T09 · Insecure Skill Coding Practices

Warning
Location
enterprisecontact.py:31
Finding
API Credential Transmitted in URL Query Parameters## Vulnerability Details **File Location**: `enterprisecontact.py`, lines 31–41 **Vulnerability Type**: API credential exposure through URL query parameters **Risk Level**: Medium ### Vulnerable Code ```python params = {"appkey": appkey} if company not in (None, ""): params["company"] = company if creditno not in (None, ""): params["creditno"] = creditno if regno not in (None, ""): params["regno"] = regno if orgno not in (None, ""): params["orgno"] = orgno try: resp = requests.get(QUERY_URL, params=params, timeout=10) ``` ### Technical Analysis The value of `JISU_API_KEY` is assigned to the `appkey` query parameter and passed to `requests.get`. The `requests` library serializes this parameter into the request URL, producing a URL equivalent to: ```text https://api.jisuapi.com/enterprisecontact/query?appkey=SECRET&company=... ``` HTTPS encrypts the request while it is in transit, so passive network observers cannot normally read the URL. However, placing a credential in a URL increases its exposure because complete URLs may be retained by the API provider, reverse proxies, gateways, application performance monitoring systems, debug traces, or HTTP access logs. This issue does not expose the key directly to arbitrary remote users by itself. Exploitation requires access to infrastructure or diagnostic records that capture the complete request URL. ### Attack Path 1. An operator configures a valid API credential in the `JISU_API_KEY` environment variable. 2. A user invokes the enterprise contact query. 3. The skill places the credential in the `appkey` URL query parameter. 4. An intermediary, API endpoint, monitoring service, or diagnostic facility records the complete request URL. 5. An attacker with access to those records extracts the `appkey` value. 6. The attacker submits requests directly to the JisuAPI service using the compromised credential. ### Impact Asses ...[truncated 516 chars]
Remediation
## Remediation Suggestions 1. If the API supports it, transmit the credential in an authorization header rather than in the URL: ```python params = {} headers = {"Authorization": f"Bearer {appkey}"} resp = requests.get( QUERY_URL, params=params, headers=headers, timeout=10, ) ``` 2. If the provider mandates an `appkey` query parameter, apply compensating controls: - Disable or redact query-string logging in reverse proxies, gateways, monitoring agents, and application logs. - Ensure exception and debug telemetry never records prepared request URLs. - Restrict access to API-provider and infrastructure logs. - Use a dedicated key with the minimum available permissions and quota. - Rotate the key periodically and immediately after suspected disclosure. - Configure provider-side usage limits or source restrictions where available. - Document that the external API protocol requires the credential to appear in the request URL. 3. Avoid printing request objects, prepared URLs, or parameter dictionaries because they contain the credential. 4. Add automated secret-redaction tests covering `appkey` in URLs, logs, exceptions, and telemetry.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (8)

Tp2

High
Category
MCP Tool Poisoning
Confidence
85% confidence
Finding
Mixing characters from multiple Unicode scripts in a single identifier is a common technique to create visually ambiguous tool names.

Lp3

Medium
Category
MCP Least Privilege
Confidence
90% confidence
Finding
The skill declares environment and network capabilities via metadata requirements, but does not explicitly constrain tool scope with permissions or allowed-tools. This creates an authorization gap where the runtime may permit broader-than-expected access, increasing the chance of unintended outbound requests or secret exposure if the backing script is modified or misused.

Vague Triggers

Medium
Confidence
88% confidence
Finding
The activation text is broad enough that the skill may trigger on generic questions about company contact details without clearly signaling that user-supplied company identifiers will be sent to an external API. Over-broad invocation can cause unnecessary third-party data disclosure and surprise users who did not intend an external lookup.

Missing User Warnings

Medium
Confidence
95% confidence
Finding
The documentation explains how to query company names and identifiers through JisuAPI but does not clearly warn users that these identifiers will be transmitted to a third-party service. This is a privacy and transparency issue because business identifiers, while not always secret, may still be sensitive in context and should be disclosed before external transmission.

Natural-Language Policy Violations

Medium
Confidence
93% confidence
Finding
The module description and user-facing usage/help text are written entirely in Chinese, which effectively constrains interaction to a specific language without any opt-in or alternative. Under the stated policy, locale-specific behavior should either offer language choice or clearly justify the restriction.

External Transmission

Medium
Category
Data Exfiltration
Content
import requests


QUERY_URL = "https://api.jisuapi.com/enterprisecontact/query"


def cmd_query(appkey: str, req: dict):
Confidence
60% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Natural-Language Policy Violations

Medium
Confidence
90% confidence
Finding
Natural-language strings in the function docstring and CLI examples assume Chinese-only usage, and there is no mechanism for selecting another language. This creates a language policy issue because the skill forces a specific locale in user-visible interactions.

Missing User Warnings

Low
Confidence
87% confidence
Finding
This Python code sends user-supplied company data and the API key to an external HTTP endpoint via requests.get. Although the module and function docstrings describe the API purpose, there is no explicit warning, confirmation, or privacy disclosure that query inputs will be transmitted to a third-party service.

Static analysis

No suspicious patterns detected.