Back to skill

Security audit

Xborder Ecom Check - 跨境电商合规检查

Security checks for vulnerabilities and agentic risk

Overview

The skill is mostly purpose-aligned, but needs review because it sends compliance answers to a cloud service, keeps a local trial identifier, and has an unsafe HTML report path.

Install only if you are comfortable sending compliance answers to compliancehub.cn and storing a local trial id or API key reference. Prefer text or JSON reports, or only use HTML reports when you trust the cloud response source, until the report renderer escapes untrusted fields and the persistence/network disclosures are corrected.

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
scripts/xborder-ecom-check.py:310
Finding

Unescaped Cloud-Controlled Data in Generated HTML Reports

Content
View full analysis
= 80 else "#ff9800" if score >= 60 else "#f44336" rows = "" current_cat = "" for r in items: if r.get("category_name") != current_cat: current_cat = r.get("category_name", "") rows += f'{current_cat}\n' icon = "✅" if r.get("passed") else "❌" cls = "pass" if r.get("passed") else "fail" rec = r.get("recommendation") or "Keep it up" rows += f"""{icon}{r.get('name')}{r.get('legal_ref') or ''}{cls.upper()}{rec}\n""" ``` ### Technical Analysis The HTML renderer directly interpolates `category_name`, `name`, `legal_ref`, and `recommendation` into HTML without applying context-appropriate output encoding. These fields can originate from responses supplied by the remote rules or evaluation service. Consequently, the cloud service crosses a trust boundary before its content is written into a local HTML report. A compromised service, malicious backend response, or corrupted rule entry could insert active markup such as an element with an event handler. Because the generated document is intended to be opened in a browser, injected markup may be interpreted rather than displayed as text. The exact capabilities of injected script depend on browser restrictions for local files, but the payload could alter the report, display deceptive content, initiate external requests, or execute JavaScript in the report's document context. ### Attack Path 1. An attacker compromises the configured cloud service or gains the ability to modify a rule or evaluation respo ...[truncated 1490 chars]
Remediation
View remediation
``` This provides defense in depth but must not be treated as a substitute for output encoding. 6. Add regression tests using payloads such as: ```text ``` Verify that the generated file contains escaped text such as `<script>` and does not create executable elements. ]]>
Vulnerability Patterns
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Rogue AgentSelf-Modification, Session Persistence
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
Findings (6)

Session Persistence

Medium
Category
Rogue Agent
Confidence
60% confidence
Finding

Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Content

Scanner excerpt · SKILL.md (reported line 80)May include surrounding context.

Get a free API Key

bash
# 1. Open the account page and create a free account (100 free calls):
#    https://compliancehub.cn/account.html?skill=xborder-ecom-check
# 2. Copy your API Key.
# 3a. Export it as an environment variable:

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
80% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

Scanner excerpt · SKILL.md (reported line 86)May include surrounding context.

3a. Export it as an environment variable:

export COMPLIANCEHUB_API_KEY=your_key

3b. Or save it to a file (mode 0600):

echo your_key > ~/.config/compliancehub/xborder-ecom-check.key && chmod 600 ~/.config/compliancehub/xborder-ecom-check.key

text
Or open: https://compliancehub.cn/account.html?skill=xborder-ecom-check

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The documentation makes a materially inconsistent security claim: it says no state is kept beyond the API key file, yet it also documents a persistent anon_id stored on disk. This can mislead users and reviewers about local persistence and privacy behavior, reducing informed consent and weakening trust in the skill’s data-handling guarantees.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The docstring states that network usage is limited to scoring runs with a valid API key and that no other data leaves the machine, but the code later performs cloud evaluation in anonymous trial mode by sending the user's responses plus a persistent anon_id to the remote service. This is dangerous because users and downstream tooling may rely on the inaccurate disclosure and unintentionally transmit compliance answers off-device under a false assumption of offline or key-gated behavior.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
88% confidence
Finding

The only natural-language content in this file is written in Chinese ('无第三方依赖...'). This can violate language/locale policy if the skill expects a broader audience and does not offer any language choice or opt-in.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
91% confidence
Finding

The docstring states that item names, categories, and recommendations are presented in Chinese by default for Chinese-speaking teams, with English available only if requested. This imposes a default language choice rather than offering an explicit user opt-in at the point of use, which can conflict with language/locale policy expectations.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.