Back to skill

Security audit

Barcode Generation And Recognition - 条码生成识别

Security checks for vulnerabilities and agentic risk

Overview

This skill does what it claims: it uses JisuAPI to generate or read barcodes, but users should treat submitted barcode images and the API key as data sent to a third party.

Install only if you are comfortable using JisuAPI for barcode processing. Use a restricted and revocable JISU_API_KEY, avoid submitting sensitive barcode images or private/internal image URLs, and be aware that the API key and barcode data are sent in request query parameters where provider or proxy logs may retain them.

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
barcode.py:19
Finding

API Credential and Barcode Image Data Exposed in URL Query Strings

Content
View full analysis

Vulnerability Details

File Location: barcode.py:19-25
Vulnerability Type: Sensitive data exposure through URL query parameters
Risk Level: Medium

Vulnerable Code

python
all_params = {"appkey": appkey}
all_params.update({k: v for k, v in params.items() if v not in (None, "")})

url = f"{BASE_URL}/{path}"
try:
    resp = requests.get(url, params=all_params, timeout=10)

Technical Analysis

The _call_api function places JISU_API_KEY and all request parameters into an HTTP GET query string. For barcode recognition, those parameters can include a user-supplied image URL or an entire base64-encoded image.

TLS encrypts the request while it is in transit, but it does not prevent the complete URL from being retained by the destination server, reverse proxies, application performance monitoring systems, access logs, or diagnostic tooling. Consequently, systems with access to URL logs may capture both the API credential and user-provided barcode data.

Sending base64 images in a query string also creates oversized URLs. Such requests can exceed limits imposed by clients, proxies, web servers, or security appliances, causing request rejection or unreliable operation.

Attack Path

  1. A user invokes the read command with a barcode image encoded as base64 or supplied as a URL.
  2. The script obtains the API credential from JISU_API_KEY.
  3. _call_api combines the credential and barcode value in all_params.
  4. requests.get serializes those values into the request URL.
  5. The destination API or intermediary infrastructure records the complete URL in an access, monitoring, or diagnostic log.
  6. A person or compromised service with access to that log recovers the API key and barcode data.
  7. The exposed key may then be used to consume the associated API quota or invoke APIs available to that credential.

Impact Assessment

An attacker does not gain local operating-system privileges through this issue. The affected scope is l ...[truncated 514 chars]

Remediation
View remediation

Remediation Suggestions

  1. Use an HTTP POST request and place barcode data in the request body when the provider supports it.
  2. Send the API credential in an authorization header rather than in the query string when supported by the provider.
  3. If the provider requires query-string authentication:
    • Use a restricted, revocable credential with the minimum necessary API permissions.
    • Rotate the credential regularly and immediately after suspected exposure.
    • Ensure clients, proxies, monitoring systems, and API infrastructure redact query strings.
    • Avoid submitting base64 images through URLs; use a supported body or file-upload endpoint.
    • Prefer narrowly scoped, short-lived image references where an image URL is required.
  4. Enforce documented image-size limits before transmission and reject oversized inputs locally.
  5. Document that submitted barcode images and URLs are transferred to JisuAPI and may be processed under that provider's data-handling policy.
  6. Avoid returning raw upstream response bodies where they could contain sensitive operational details; sanitize error output before presenting it to users.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • 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
Findings (10)

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

The skill declares access to environment variables and implicitly requires network access to call a third-party API, but it does not define an explicit tool scope such as permissions or allowed-tools. This weakens least-privilege controls and makes it harder for a host system or reviewer to understand and constrain what the skill can access at runtime.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The trigger description includes broad language like 'or similar barcode generation/recognition,' which can cause the agent to invoke the skill for loosely related requests without clear user intent. Overbroad triggering increases the risk of unnecessary third-party data transmission or unintended use of credentials.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The documentation does not clearly warn that barcode images, URLs, or base64 content supplied by the user will be sent to a third-party service for recognition. This creates a privacy and data-handling risk because users may provide sensitive images or internal URLs without informed consent.

Content

No source excerpt is available for this finding.

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 · SKILL.md (reported line 80)May include surrounding context.

md
import requests


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


def _call_api(path: str, appkey: str, params: dict = None):

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 · barcode.py (reported line 14)May include surrounding context.

python
import requests


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


def _call_api(path: str, appkey: str, params: dict = None):

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 · barcode.py (reported line 89)May include surrounding context.

python
import requests


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


def _call_api(path: str, appkey: str, params: dict = None):

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 · barcode.py (reported line 106)May include surrounding context.

python
import requests


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


def _call_api(path: str, appkey: str, params: dict = None):

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

Barcode image content or base64-encoded images supplied by the user are transmitted to a third-party API for recognition, but the skill provides no explicit user-facing disclosure or consent step. This can expose sensitive product, shipment, or embedded metadata to an external service contrary to user expectations.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The skill's stated purpose is limited to generating barcode images or recognizing barcode contents. Accessing environment variables to obtain credentials is an additional capability not mentioned in the manifest and is not inherent from the user-facing description alone, even though it supports the external API integration.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.