Back to skill

Security audit

test-jiaodian-lin-demo

Security checks for vulnerabilities and agentic risk

Overview

This is a simple Chinese-language paid-skill demo that checks a license key and prints demonstration output, with no active network calls, persistence, or destructive behavior.

Install only if you are comfortable with a Chinese-language demo skill that reads SKILL_LICENSE_KEY from the environment. Treat the included license check as a template, not production-grade licensing, and consider narrowing the generic trigger phrase before publishing broadly.

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/check_license.py:14
Finding

Hardcoded License Key Enables Authorization Bypass

Content
View full analysis
str: """计算授权码哈希""" return hashlib.sha256((license_key + salt).encode()).hexdigest() def check_license() -> Tuple[bool, str]: """ 检查授权码 返回: (是否有效, 消息) """ license_key = os.environ.get("SKILL_LICENSE_KEY", "").strip() if not license_key: return False, "未配置授权码,请设置环境变量 SKILL_LICENSE_KEY" # 这里存储已授权的哈希,实际可以从你的服务器动态验证 # 示例:license "demo-license-123" 哈希后是: expected_hash = hash_license("demo-license-123") ``` ### Technical Analysis The accepted license key, `demo-license-123`, and the salt used by the SHA-256 calculation are embedded directly in code distributed to users. Hashing a hardcoded value does not protect it because users can inspect the source and recover the original accepted key without cracking the hash. Authorization is performed entirely on the client. An attacker can therefore supply the disclosed key through `SKILL_LICENSE_KEY`, causing `check_license()` to return a successful result. SHA-256 does not mitigate this issue because the security boundary depends on secrecy of data that is included in the package itself. ### Attack Path 1. Obtain or inspect the distributed skill package. 2. Open `scripts/check_license.py`. 3. Identify the hardcoded accepted key, `demo-license-123`. 4. Configure the environment: ```bash export SKILL_LICENSE_KEY=demo-license-123 ``` 5. Run the skill entry point: ```bash python3 scripts/demo_function.py ``` 6. The supplied value produces the expected hash, the license check succeeds, and the guarded functionality executes without a purchased license. ### Impact Assessment An unauthenticated user with access to t ...[truncated 529 chars]
Remediation
View remediation
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
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (7)

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
87% confidence
Finding

The skill documentation indicates use of environment variables for a license key and the static analysis detected environment and network capabilities, but the manifest does not declare an explicit tool scope such as permissions or allowed-tools. This creates an authorization boundary problem: an agent platform may grant broader access than users expect, and the undeclared network/env usage could enable secret handling or outbound requests without clear disclosure.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The module docstring and all user-facing status messages are written only in Chinese, which effectively fixes the skill's interaction language without any user opt-in or documented locale justification. Under the stated policy, language constraints should either be optional or clearly justified as region-specific.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
70% 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 · scripts/check_license.py (reported line 44)May include surrounding context.

python
# 生产环境可以在这里增加联网验证
    # import requests
    # response = requests.post("https://your-server.com/verify", json={"key": license_key})
    # return response.json().get("valid", False)
    
    return False, "授权码无效,请检查 SKILL_LICENSE_KEY 配置"

External Transmission

Medium
Category
Data Exfiltration
Confidence
80% 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 · scripts/check_license.py (reported line 44)May include surrounding context.

python
# 生产环境可以在这里增加联网验证
    # import requests
    # response = requests.post("https://your-server.com/verify", json={"key": license_key})
    # return response.json().get("valid", False)
    
    return False, "授权码无效,请检查 SKILL_LICENSE_KEY 配置"

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The natural-language content in the manifest, including the description and all trigger phrases, is exclusively Chinese with no indication that users may choose another language. This creates a locale/language policy concern because the skill appears to require a specific language without opt-in or documented justification.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The trigger phrase at line 23 ("某某收费") is highly generic and can plausibly appear in unrelated normal conversation, increasing the chance that the skill activates when the user did not intend to invoke it. In a paid skill with license-gated behavior, accidental invocation can cause confusing prompts, unnecessary authorization flows, or unintended execution context, making this a real security/usability boundary issue rather than a harmless false positive.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
94% confidence
Finding

The docstring, comments, and all user-facing print messages are written only in Chinese, which effectively forces a specific language for user interaction. The file does not indicate that the skill is region-specific or provide any user opt-in or alternative language path.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.