Back to skill

Security audit

Trademark Information Inquiry - 商标信息查询

Security checks for vulnerabilities and agentic risk

Overview

This skill is a disclosed trademark lookup wrapper that sends user-supplied trademark queries to JisuAPI and does not show hidden persistence, local data access, or destructive behavior.

Install this only if you are comfortable sending trademark keywords, registration numbers, class IDs, and your JisuAPI AppKey to JisuAPI. Use a dedicated key with quota or billing limits, avoid confidential pre-launch brand searches unless approved, and rotate the key if request URLs may have been logged.

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
trademark.py:15
Finding

API Credential Exposed in URL Query String

Content
View full analysis

Vulnerability Details

File Location: trademark.py, lines 15–21
Vulnerability Type: API credential exposure through URL query parameters
Risk Level: Medium

python
def _call_trademark_api(path: str, appkey: str, params: dict):
    all_params = {"appkey": appkey}
    all_params.update(params)
    url = f"{BASE_URL}/{path}"

    try:
        resp = requests.get(url, params=all_params, timeout=10)

Technical Analysis

The function inserts appkey into all_params and passes that dictionary to requests.get() through the params argument. The Requests library serializes these parameters into the URL query string, producing a request resembling:

text
https://api.jisuapi.com/trademark/search?appkey=SECRET_VALUE&keyword=...

HTTPS protects the request from passive interception while it is in transit, but it does not prevent the complete URL from being retained by systems that legitimately process or observe the request. Query strings may be captured in HTTP server access logs, reverse-proxy logs, API gateway telemetry, application-performance monitoring systems, debugging output, or prepared-request diagnostics.

Consequently, anyone with access to an insufficiently protected log or trace containing the request URL could recover the API key. No evidence indicates that the application itself logs the URL; the risk arises from placing a reusable credential in a URL that surrounding infrastructure may record.

Attack Path

  1. An authorized user invokes the trademark search or detail command.
  2. The skill reads JISU_API_KEY from the environment.
  3. The skill serializes that credential into the HTTPS request URL as the appkey query parameter.
  4. The complete URL is retained by an API endpoint, proxy, gateway, monitoring platform, or diagnostic system.
  5. An attacker or unauthorized operator with access to those records extracts the AppKey.
  6. The attacker submits independent requests to the JisuAPI service using the exposed cr ...[truncated 551 chars]
Remediation
View remediation

Remediation Suggestions

  1. Prefer an API-supported authorization header so the credential is not part of the request URL:
python
headers = {"Authorization": f"Bearer {appkey}"}
resp = requests.get(url, headers=headers, params=params, timeout=10)
  1. If the provider supports credential submission only in a POST body, use that documented mechanism rather than a query parameter.

  2. If JisuAPI strictly requires appkey in the query string:

    • Configure clients, proxies, gateways, servers, and monitoring platforms to redact appkey and preferably all query strings.
    • Do not log prepared request URLs or exception objects that may include URLs.
    • Use a dedicated, least-privileged key for this skill.
    • Apply provider-side IP restrictions, usage limits, and billing alerts where available.
    • Rotate the current key after confirming that historical logs do not retain it.
    • Establish regular key rotation and immediate revocation procedures.
    • Restrict access to infrastructure logs and apply appropriate retention limits.
  3. Add automated tests or static checks that reject logging of authorization values and sensitive query parameters.

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.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
94% confidence
Finding

The skill declares use of environment variables and implies outbound API access, but it does not define an explicit tool scope such as permissions or allowed-tools. This weakens least-privilege enforcement and can let the runtime grant broader execution/network capabilities than users or reviewers expect.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The invocation guidance is broad enough that the skill may trigger on loosely related user queries and automatically send those queries to a third-party service. Overbroad routing increases the chance of unnecessary external disclosure and unintended tool use, especially when user prompts contain sensitive business terms or names.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill documentation does not clearly warn users that their trademark search terms and related query parameters will be transmitted to an external third-party API provider. This undermines informed consent and may expose confidential product names, brand plans, or legal research terms to an outside service.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% 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 · SKILL.md (reported line 109)May include surrounding context.

md
"firsttrialdate": "2014-11-06",
      "announceno": "1442",
      "announcedate": "2015-02-07",
      "pic": "http://api.jisuapi.com/trademark/upload/201807/31173651574910.jpg",
      "agent": "杭州龙华知识产权代理有限公司",
      "status": "注册申请完成",
      "registrant": "浙江富春江移动通信科技有限公司"

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% 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 · SKILL.md (reported line 134)May include surrounding context.

md
"firsttrialdate": "2014-11-06",
      "announceno": "1442",
      "announcedate": "2015-02-07",
      "pic": "http://api.jisuapi.com/trademark/upload/201807/31173651574910.jpg",
      "agent": "杭州龙华知识产权代理有限公司",
      "status": "注册申请完成",
      "registrant": "浙江富春江移动通信科技有限公司"

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% 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 · trademark.py (reported line 14)May include surrounding context.

python
import requests


BASE_URL = "https://api.jisuapi.com/trademark"


def _call_trademark_api(path: str, appkey: str, params: dict):

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
82% confidence
Finding

This code file contains natural-language descriptions of the API and function behavior in Chinese, while the script otherwise uses English identifiers and CLI messages. That creates a language expectation without explicit user opt-in or documented locale constraint, which fits the language/locale policy check.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.