Back to skill

Security audit

Alibaba Url Builder

Security checks for vulnerabilities and agentic risk

Overview

The skill mostly does what it says, but it needs review because supplier URL inputs can produce non-Alibaba links and its install/release guidance uses broad or mutable commands.

Review before installing or using in automated workflows. Validate supplier subdomains as single DNS labels before navigation, be aware that every generated URL includes traffic_type=ags_llm, avoid unpinned npm/npx commands, and inspect release.sh carefully before running it because it can publish the skill and push repository contents.

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 (2)

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/build_url.py:79
Finding
Unvalidated supplier subdomain permits arbitrary-host URL generation<![CDATA[ ## Vulnerability Details **File Location**: `scripts/build_url.py:79-104` **Vulnerability Type**: Unvalidated URL authority construction **Risk Level**: Medium ### Vulnerable Code ```python def build_supplier_url(subdomain: str) -> str: """ Build supplier company profile URL. Args: subdomain: Supplier's subdomain (e.g., 'dgkunteng') Returns: Complete supplier profile URL with traffic_type=ags_llm """ return f"https://{subdomain}.en.alibaba.com/company_profile.html?traffic_type={TRAFFIC_TYPE}" def build_supplier_search_url(subdomain: str, query: str) -> str: """ Build supplier product search URL. Args: subdomain: Supplier's subdomain query: Search keywords within supplier's products Returns: Complete supplier search URL with traffic_type=ags_llm """ return f"https://{subdomain}.en.alibaba.com/search/product?SearchText={encode_search_query(query)}&traffic_type={TRAFFIC_TYPE}" ``` The affected value is accepted directly from the command line at `scripts/build_url.py:155-156` and used at `scripts/build_url.py:184-189`: ```python supplier_parser.add_argument('subdomain', help='Supplier subdomain') supplier_parser.add_argument('--search', '-s', help='Search within supplier products') elif args.command == 'supplier': if args.search: url = build_supplier_search_url(args.subdomain, args.search) else: url = build_supplier_url(args.subdomain) print(url) ``` ### Technical Analysis The supplier `subdomain` is interpolated into a URL without validating that it is a single DNS label. Although the generated string visually ends with `.en.alibaba.com`, URL delimiters supplied inside `subdomain` can change how a browser or URL parser interprets the destination. For example, the following value contains a path delimiter: ```text attacker.example/path? ``` It produces a URL resembling: ```text https://attacker.example/path? ...[truncated 1868 chars]
Remediation
<![CDATA[ ## Remediation Suggestions Validate `subdomain` before constructing either supplier URL: 1. Require exactly one DNS label. 2. Reject dots, slashes, backslashes, `@`, colons, percent-encoded delimiters, query markers, fragments, whitespace, and control characters. 3. Enforce normal DNS-label length and character constraints. 4. Parse the completed URL and verify the resulting hostname before returning it. 5. Add negative tests covering delimiter injection and arbitrary-host payloads. Example hardening: ```python import re import urllib.parse SUPPLIER_LABEL_RE = re.compile( r"^[A-Za-z0-9](?:[A-Za-z0-9-]{0,61}[A-Za-z0-9])?$" ) def validate_supplier_subdomain(subdomain: str) -> str: if not SUPPLIER_LABEL_RE.fullmatch(subdomain): raise ValueError("Supplier subdomain must be a single valid DNS label") return subdomain.lower() def verify_alibaba_supplier_url(url: str) -> str: parsed = urllib.parse.urlsplit(url) if ( parsed.scheme != "https" or not parsed.hostname or not parsed.hostname.endswith(".en.alibaba.com") ): raise ValueError("Generated URL is not an Alibaba supplier URL") return url def build_supplier_url(subdomain: str) -> str: label = validate_supplier_subdomain(subdomain) url = ( f"https://{label}.en.alibaba.com/company_profile.html" f"?traffic_type={TRAFFIC_TYPE}" ) return verify_alibaba_supplier_url(url) ``` Apply the same validation to `build_supplier_search_url()`. Where possible, build query strings with `urllib.parse.urlencode()` rather than manual concatenation. ]]>

T08 · Insecure Dependencies

Warning
Location
README.md:37
Finding
Unpinned third-party CLI installation creates a supply-chain execution risk<![CDATA[ ## Vulnerability Details **File Location**: `README.md:37-42` **Additional Locations**: `PUBLISH.md:14-18`, `CHECKLIST.md:37-46`, `PROJECT_OVERVIEW.md:130-138`, `release.sh:35-43` **Vulnerability Type**: Unpinned executable dependency and inconsistent package identity **Risk Level**: Medium ### Vulnerable Code `README.md:37-42` instructs users to install and execute an unpinned registry package: ```bash # Install ClawHub CLI if you haven't npm install -g clawdhub # Login to ClawHub clawdhub login ``` `PUBLISH.md:14-18` additionally recommends a mutable `latest` release: ```bash # 使用 npm 安装 npm install -g clawdhub # 或使用 npx 直接运行 npx clawdhub@latest --version ``` `CHECKLIST.md:37-46` uses a different package name while later invoking `clawdhub`: ```bash npm install -g clawhub # 或 npx clawhub@latest --version ``` ```bash clawdhub login ``` `release.sh:35-43` repeats the unpinned installation guidance when the executable is unavailable: ```bash if command -v clawdhub &> /dev/null; then echo -e "${GREEN}✓ ClawHub CLI 已安装${NC}" clawdhub --cli-version else echo -e "${RED}✗ ClawHub CLI 未安装${NC}" echo "请先安装:" echo " npm install -g clawdhub" echo "或" echo " npx clawdhub@latest" exit 1 fi ``` ### Technical Analysis Both `npm install -g <package>` without a version and `npx <package>@latest` resolve mutable content from a third-party package registry. npm packages can execute lifecycle scripts during installation, and `npx` can download and run package code. Consequently, the effective executable is not fixed to the code that was reviewed. The project also inconsistently refers to `clawdhub` and `clawhub`. This inconsistency increases the chance that users install the wrong package, including a similarly named or typosquatted package. The release script does not automatically install the dependency, which limits automatic exposure. However, it explicitly directs users to execute the unpinned installation comman ...[truncated 1816 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Confirm the authoritative npm package name and use it consistently in every file. 2. Pin an exact reviewed version instead of using an implicit current version or `@latest`: ```bash npm install --global clawdhub@<reviewed-version> npx --yes clawdhub@<reviewed-version> --version ``` 3. Record and verify package provenance, including the expected npm publisher, source repository, and release signature where supported. 4. Use a lockfile and integrity metadata when the CLI is managed as a project dependency. 5. Prefer a local development dependency over a global installation: ```bash npm install --save-dev --save-exact clawdhub@<reviewed-version> npx --no-install clawdhub --version ``` 6. Avoid running npm installation commands with `sudo`, as lifecycle scripts would then execute with elevated privileges. 7. Remove every contradictory `clawhub`/`clawdhub` reference after verifying the legitimate package identity. 8. In release automation, verify the installed executable version against an explicit allowlist before login or publication. 9. Consider executing release tooling in an isolated environment with narrowly scoped, short-lived credentials. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Rogue AgentSelf-Modification, Session Persistence
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (18)

Self-Modification

High
Category
Rogue Agent
Content
```bash
# Update version in SKILL.md frontmatter
# Edit SKILL.md and scripts as needed

# Package the skill
python3 scripts/package_skill.py .
Confidence
85% confidence
Finding
Skill modifies its own code, configuration, or behavior at runtime. Self-modification enables an agent to escalate privileges, disable safety constraints, or install persistent backdoors.

Rp1

Medium
Category
MCP Rug Pull
Confidence
70% confidence
Finding
npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.

Natural-Language Policy Violations

Medium
Confidence
88% confidence
Finding
This markdown file is predominantly written in Chinese and presents the release guidance as the default language without indicating that other languages are supported. Under the policy rule for natural-language violations, forcing a specific language without user opt-in can be a locale/language policy issue.

Missing User Warnings

Medium
Confidence
94% confidence
Finding
The documentation explicitly states that all generated Alibaba URLs automatically include the tracking parameter `traffic_type=ags_llm`, but it does not disclose privacy implications, provide user consent guidance, or offer an opt-out. In an agent skill context, this can cause users or downstream agents to unknowingly emit attribution or tracking data on every navigation, creating privacy, transparency, and compliance concerns.

Missing User Warnings

Medium
Confidence
94% confidence
Finding
The promotional copy highlights that all generated Alibaba URLs automatically include a tracking parameter (`traffic_type=ags_llm`) but does not disclose any privacy, consent, or analytics implications to users. Even if the parameter is framed as simple attribution, normalizing undisclosed tracking in agent workflows can mislead operators and downstream users about what metadata is being attached to requests.

Missing User Warnings

Medium
Confidence
92% confidence
Finding
The quick-start example embeds tracking-enabled URLs as the default usage pattern without warning that agent-generated traffic will carry attribution metadata. This encourages copy-paste adoption of tracking behavior in real workflows, making undisclosed analytics propagation more likely across integrations and automated systems.

Missing User Warnings

Medium
Confidence
95% confidence
Finding
The email template states that all URLs include `traffic_type=ags_llm` for analytics, but gives no caution about privacy expectations, disclosure duties, or whether recipients should evaluate compliance requirements before deployment. Because this is outbound promotional material, it can spread an unsafe default widely and cause organizations to adopt tracking behavior without informed review.

Rp1

Medium
Category
MCP Rug Pull
Confidence
89% confidence
Finding
The guide recommends `npx clawdhub@latest --version`, which fetches and executes the latest package version at runtime without pinning to a known-good release. This creates a supply-chain risk: if the package is compromised or a breaking/malicious version is published, users following the documentation may execute untrusted code on their machine.

Missing User Warnings

Medium
Confidence
93% confidence
Finding
The publish guide includes a destructive deletion command with `--yes`, which suppresses confirmation and may encourage irreversible or unintended removal of a published skill. Even if described as soft delete, presenting it without a cautionary note increases the chance of accidental misuse, especially in copy-paste workflows.

Missing User Warnings

Medium
Confidence
95% confidence
Finding
The README explicitly states that all generated URLs include a mandatory tracking parameter used to identify LLM-agent traffic, enable analytics, attribution, and A/B testing, but it provides no user-facing privacy notice, consent guidance, or opt-out. This creates a privacy and compliance risk because downstream users or agents may transmit identifiable behavioral metadata to a third party without transparency or policy controls.

Natural-Language Policy Violations

Medium
Confidence
94% confidence
Finding
The supplier URL patterns hardcode the `.en.alibaba.com` subdomain in both the company profile and supplier product search examples. This imposes an English locale choice in the skill instructions without user opt-in or documented justification, which is a natural-language locale policy concern.

Intent-Code Divergence

Medium
Confidence
95% confidence
Finding
The documented helper constructs `SearchText` incorrectly by appending an encoded query and then a second raw/plus-substituted copy, producing malformed input such as duplicated search terms. In an agent skill, this can break navigation reliability, cause incorrect searches, and create downstream bugs if other code assumes the parameter is properly encoded.

Intent-Code Divergence

Medium
Confidence
96% confidence
Finding
The header claims the script automates ClawHub publishing and GitHub repository creation, but the body also performs `git add .`, creates commits, and pushes to the remote. This mismatch can mislead users into running a script that exfiltrates or publishes unintended files from the entire working tree, including secrets, build artifacts, or unrelated local content. In a release automation skill, that hidden breadth is more dangerous because users are predisposed to trust publishing scripts with repository credentials already available.

Rp1

Medium
Category
MCP Rug Pull
Confidence
70% confidence
Finding
npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.

Natural-Language Policy Violations

Low
Confidence
86% confidence
Finding
This markdown file uses a single fixed language throughout, including headings and release notes, with no indication that users can choose another language or that the skill is intentionally region-specific. Under the policy, forcing a specific language without user opt-in is a natural-language policy concern.

Natural-Language Policy Violations

Low
Confidence
91% confidence
Finding
The file presents all guidance in Chinese and does not indicate that the language is optional, selectable, or intentionally limited to a Chinese-speaking audience. Under the policy, forcing a specific language without user opt-in can be a natural-language policy violation unless the locale constraint is clearly justified.

Missing User Warnings

Low
Confidence
82% confidence
Finding
This code file automatically includes `traffic_type=ags_llm` in every constructed URL, which affects outbound request metadata and tracking behavior. Although the docstring notes the parameter exists, there is no user-facing disclosure at runtime such as a prompt or warning when the script emits tracked URLs.

Intent-Code Divergence

Low
Confidence
77% confidence
Finding
The module docstring says this script packages the alibaba-url-builder skill into a .skill file, but the argparse description says only 'Package OpenClaw skill'. This is a direct documentation inconsistency about what the script is intended to package, even though the underlying behavior is generic packaging.

Static analysis

No suspicious patterns detected.