T09 · Insecure Skill Coding Practices
- Location
scripts/get_coupon.py:21- Finding
Obfuscated Hardcoded API Credential Transmitted to a Third-Party Service
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This coupon skill performs coupon lookup, but it also can run a local updater and includes shared service credentials and unsafe cache handling, so it should be reviewed before installation.
Install only if you trust the publisher and accept that it contacts a third-party coupon service and displays externally supplied coupon links. Avoid using the chat-triggered upgrade path; prefer a version that removes runtime self-updates, stores cache data in a protected per-user location, validates returned links, and does not ship shared API credentials in the skill package.
scripts/get_coupon.py:21Obfuscated Hardcoded API Credential Transmitted to a Third-Party Service
scripts/get_coupon.py:17Predictable Shared Temporary Cache Permits Local Cache Poisoning and Unsafe File Redirection
scripts/get_coupon.py:198Unverified Package Update Can Replace the Audited Skill with Remote Code
The declared purpose is a coupon query assistant, but the behavior includes local subprocess execution for skill upgrades and remote API access that are not disclosed. Hidden upgrade logic is especially dangerous because it can change code after review, and shell execution greatly expands the blast radius from simple data retrieval to arbitrary local actions.
A coupon-query skill should not perform self-update operations that can modify installed software. This creates a privilege and supply-chain risk: a simple user query such as asking to upgrade can cause external code retrieval/execution, which is dangerous if the update source, CLI, or local PATH is compromised.
The skill metadata declares no tool scope or permissions, yet the analyzed behavior indicates access to file operations, network, and shell execution. This creates a transparency and containment failure: reviewers and runtime policy may treat the skill as low-risk while it can perform far more powerful actions, including command execution and external communication.
The trigger language is broad enough to match common shopping conversation, which can cause the skill to activate unexpectedly. In a skill with external network access and possible upgrade behavior, accidental invocation increases exposure by sending user queries to third-party services or invoking risky code paths without clear user intent.
The example invocations are vague and insufficiently constrained, making it likely the skill will trigger on ordinary conversation such as asking about deals in general. Because the skill relies on third-party coupon aggregation and potentially risky implementation behavior, this ambiguity raises the chance of unintended data sharing and unauthorized execution paths.
Single-word triggers like platform names or generic terms such as '优惠券' and '折扣' are highly collision-prone in everyday dialogue. In this context, broad triggers are more dangerous because the skill is not a purely static responder; it may reach third-party services and, per analysis, includes undisclosed powerful capabilities.
The file contains mixed-script and obfuscated-looking coupon text, including unusual Unicode characters in fallback content. Such text can hide deceptive links, make phishing or social-engineering payloads harder to inspect, and can mislead users into copying attacker-controlled content into another app.
The skill's user-facing strings are entirely in Chinese and the suggested invocations are also Chinese-only, with no option to select another language or locale. This creates a language/locale policy issue because the behavior is enforced by the skill rather than chosen by the user.
The skill invokes an external CLI via subprocess, which introduces code execution behavior unrelated to coupon lookup. Even though arguments are passed as a list, this still allows the skill to trigger installation/update side effects and execution of whatever 'clawhub' binary is resolved in the environment, expanding the attack surface significantly.
print(f"🔍 正在检测 {SKILL_NAME} 最新版本...\n")
try:
result = subprocess.run(
["clawhub", "update", SKILL_NAME],
capture_output=True,
text=True,
The main command path explicitly interprets user input as an upgrade trigger, causing behavior beyond the declared coupon-query scope. This increases risk because ordinary interaction text can invoke state-changing maintenance actions, violating least privilege and making social-engineering abuse easier.