Back to skill

Security audit

沟通三部曲

Security checks for vulnerabilities and agentic risk

Overview

The skill's communication helper is mostly simple local text processing, but its paid-license flow stores an API key in source and sends it to a remote verification service with limited disclosure.

Review this skill carefully before installing. It appears to perform the advertised communication workflow, but using the paid mode requires putting an API key into main.py, and after the trial expires that key is sent to the publisher's verification endpoint. Avoid committing or sharing the modified source file, and install only if you accept the remote licensing check and local hidden TTL state.

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

API Credential Stored in Source Code and Transmitted to an External Service

Content
View full analysis

Vulnerability Details

File Location: main.py, lines 14-15 and 62-79
Vulnerability Type: Insecure credential storage and external disclosure
Risk Level: Medium

Vulnerable Code

python
API_KEY = ""  # 付费后获得,填入这里
API_URL = "https://www.kaiwu8.com/verify"
python
# Local TTL has expired
# If an API_KEY exists, call the API to attempt renewal
if API_KEY:
    try:
        import urllib.request, urllib.error
        payload = json.dumps({"api_key": API_KEY, "skill_id": SKILL_ID}).encode()
        req = urllib.request.Request(
            API_URL,
            data=payload,
            headers={"Content-Type": "application/json"},
            method="POST"
        )
        with urllib.request.urlopen(req, timeout=10) as resp:
            result = json.loads(resp.read())
            if result.get("valid"):
                new_expires_at = result.get("expires_at", current + RENEWAL_INTERVAL)
                _save_local_ttl(new_expires_at)
                return True
    except Exception:
        pass
    return False

Technical Analysis

The implementation instructs users to insert a paid API credential directly into the API_KEY variable in main.py. Storing a credential in application source makes it accessible to anyone or any process that can read the project, and it can unintentionally propagate through source-control commits, archives, backups, logs, or redistributed copies of the Skill.

After the local seven-day trial expires, every invocation of communicate() reaches _check_and_renew_ttl() and may send the API key and Skill identifier to the fixed external endpoint https://www.kaiwu8.com/verify. HTTPS protects the credential in transit under normal TLS assumptions, and the documentation discloses the licensing endpoint. Nevertheless, remote credential transmission is not required for the declared local communication-analysis functionality; it exists ...[truncated 1627 chars]

Remediation
View remediation

Remediation Suggestions

  1. Remove the source-level API_KEY field and load the credential at runtime from a dedicated environment variable or operating-system credential store.
  2. Never place real credentials in tracked source files. Add local secret files to .gitignore if such files must be supported.
  3. Apply restrictive filesystem permissions to any local credential configuration, allowing access only to the account running the Skill.
  4. Clearly document the destination, transmitted fields, validation frequency, retention policy, and privacy implications of remote license verification.
  5. Obtain explicit user consent before enabling network-based verification, and keep the core communication workflow functional without unnecessary network access where licensing requirements permit.
  6. Consider signed offline license tokens that can be verified locally using a bundled public key, avoiding repeated transmission of a reusable secret.
  7. If remote verification remains necessary, use short-lived, revocable tokens rather than a long-lived API key and ensure the server never logs plaintext credentials.
  8. Pin verification to an allowlisted HTTPS origin, maintain strict TLS certificate validation, and define explicit handling for redirects.
  9. Replace the broad except Exception: pass with narrowly scoped exception handling and safe diagnostic reporting that never includes credentials.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (5)

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The entire skill documentation, including the invocation phrase and usage instructions, is presented only in Chinese. This creates a language/locale constraint without any indication that users may choose another language or that the skill is intended only for a Chinese-speaking context.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
83% confidence
Finding

The natural-language descriptions, prompts, and user-facing messages in the file are entirely Chinese, and the skill behavior is oriented around Chinese-language interaction without any opt-in or language selection mechanism. Under the stated policy, a forced language or locale without user choice or documented justification is a policy concern.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The skill contains licensing and TTL enforcement logic that is unrelated to its stated communication-processing purpose and introduces hidden control flow plus remote dependency. While not overtly malicious, this creates an availability and trust risk because a simple local text-processing function can be disabled remotely or behave differently based on undisclosed authorization checks.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The code sends an API key to a remote verification endpoint during normal authorization flow without any user-facing disclosure or consent at the time of transmission. This is dangerous because secrets are exfiltrated off-host to a third party, and users cannot meaningfully assess destination trust, data handling, or whether the network dependency is necessary for the advertised functionality.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Low
Category
Not specified by scanner
Confidence
87% confidence
Finding

The skill persists authorization state to a local hidden file even though its primary function is message analysis and response generation. This is a security/privacy concern because it introduces undeclared statefulness, can affect future executions silently, and may be abused to enforce behavior or track use without clear user awareness.

Content

No source excerpt is available for this finding.