T09 · Insecure Skill Coding Practices
- Location
scripts/speedtest.py:30- Finding
Credentials and Session Cookies Transmitted over Plaintext HTTP
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill mostly does what it claims, but it distributes shared API credentials and can send sensitive request details to a third-party testing service without enough safeguards.
Review before installing. Use only test targets you are authorized to probe, avoid sending private/internal URLs or production cookies through this skill, and do not rely on the bundled shared 17CE credential. Prefer a revised version that removes embedded credentials, uses protected per-user secrets, requires confirmation before external or bulk tests, disables cookie forwarding by default, escapes generated HTML reports, and pins dependencies.
scripts/speedtest.py:30Credentials and Session Cookies Transmitted over Plaintext HTTP
SKILL.md:33Hard-Coded Shared API Credential and Command-Line Secret Exposure
scripts/report.py:65HTML and Script Injection in Generated Reports
scripts/speedtest_ws.py:69Authenticated Cookies Forwarded to Third-Party Monitoring Infrastructure
requirements.txt:1Dependencies Are Not Reproducibly Pinned
The README embeds shared 17CE credentials and instructs the agent to use them by default in normal operation. Hard-coded third-party credentials are a real secret-handling vulnerability because they enable unauthorized use, quota theft, account abuse, and accidental disclosure to users, logs, or downstream tooling.
The skill embeds and operationalizes shared account secrets, explicitly telling the agent to use and potentially expose them during standard execution. In context, this is especially dangerous because the secrets are not incidental examples; they are the prescribed authentication path for all users, magnifying the chance of credential leakage, abuse, quota exhaustion, and downstream compromise of the third-party account.
The documented behavior says the skill performs a WebSocket-based speed test, but the actual described behavior includes authenticated API submission, secret handling, and extra request-shaping features outside that scope. This mismatch can mislead users and reviewers about what data is sent, what credentials are used, and what the skill is really capable of doing.
The skill embeds hard-coded shared account credentials and instructs the agent to use them by default. Exposed credentials can be abused by anyone with access to the skill, lead to quota theft or account compromise, and normalize unsafe secret distribution practices.
The skill both embeds shared credentials and encourages passing user-provided API passwords through bot actions and command-line arguments. Secrets in skill docs, prompts, process arguments, logs, or agent traces may be exposed to other users, operators, or telemetry systems.
The script sends authentication material and optional sensitive metadata such as cookies, referer, host, and user-agent to 17CE over plain HTTP via both API_BASE and LEGACY_API_BASE. This allows any network observer or active man-in-the-middle to intercept or modify credentials and request contents, potentially leading to account compromise, session leakage, and tampered test submissions.
The trigger list is broad enough to activate on generic phrases like 'check website' or 'website slow', which can cause the skill to run in situations the user did not clearly intend. In this skill, unintended activation is more dangerous because execution sends targets to an external service and may consume shared credentials and external quota automatically.
The skill description says it retrieves real-time speed data from global monitoring nodes via WebSocket but does not clearly warn users that their supplied URL will be transmitted to an external service. This is a genuine privacy and consent issue because users may provide internal, sensitive, or non-public endpoints without realizing they will be probed by third-party infrastructure.
The instructions direct the agent to automatically test multiple AI API endpoints without warning the user that this initiates outbound probes to several third-party services. This increases risk because the action is autonomous, multi-target, and can create unexpected network activity, disclosure of user intent, and potential terms-of-service or monitoring issues.
The instruction to 'automatically execute' external tests is a real safety issue because it authorizes autonomous network actions without an explicit confirmation boundary. In this skill, that is more dangerous than usual because the action fans out to multiple external endpoints and uses shared credentials, compounding consent, privacy, and abuse risks.
**1. "Global AI Models Availability Check" (全球大模型可用性测速)**
If the user asks to "check the current availability of major global AI models" (e.g., "全球各大模型的当前可用性情况查看"):
1. You MUST automatically execute `scripts/speedtest_ws.py --json` against the following known core AI API endpoints locally.
**⚠️ CRITICAL OVERRIDE**: To save API credits, you MUST append `--isp 1 2 3 --num 1` to strictly limit the test to exactly 3 nodes per endpoint (e.g., `python scripts/speedtest_ws.py api.openai.com --isp 1 2 3 --num 1 --json`).
**Global LLM API Endpoints Array:**
The skill declares shell and network-capable behavior but does not declare any tool scope or permissions, making it harder to constrain or review what actions the agent may take. In a skill that can execute commands and contact external services, missing scope increases the chance of unintended or overbroad execution.
The description omits a clear warning that target URLs and test activity will be sent to external 17CE infrastructure and potentially fanned out to global monitoring nodes. Users may unknowingly submit internal, sensitive, or private endpoints to a third party, causing confidentiality and exposure risks.
Broad trigger phrases like 'check website' or 'website slow' can activate the skill in many contexts where the user did not intend an external speed test. In a networked skill, accidental activation may transmit URLs or cause shell execution without clear user awareness.
The skill extends from website speed testing into broad probing of multiple third-party AI API endpoints, which is outside the declared scope. This can cause unauthorized or unexpected external traffic, increase legal and policy risk, and turn a narrow utility into a generalized reconnaissance tool.
The instruction to 'automatically execute' tests against a predefined list of third-party AI endpoints enables autonomous network actions without an explicit per-run approval step. In this context, that can generate unsolicited traffic to external services and expand the blast radius of accidental or malicious prompts.
**1. "Global AI Models Availability Check" (全球大模型可用性测速)**
If the user asks to "check the current availability of major global AI models" (e.g., "全球各大模型的当前可用性情况查看"):
1. You MUST automatically execute `scripts/speedtest_ws.py --json` against the following known core AI API endpoints locally.
**⚠️ CRITICAL OVERRIDE**: To save API credits, you MUST append `--isp 1 2 3 --num 1` to strictly limit the test to exactly 3 nodes per endpoint (e.g., `python scripts/speedtest_ws.py api.openai.com --isp 1 2 3 --num 1 --json`).
**Global LLM API Endpoints Array:**
The skill tells the agent to use shared public credentials but does not warn users about credential exposure, quota exhaustion, logging, or responsibility for actions taken under that account. This can lead to accidental misuse and weak accountability around authenticated third-party operations.
The HTML report interpolates untrusted fields such as url, Province, ISP, and SrcIP directly into HTML without escaping. If the input JSON or upstream WebSocket data is attacker-controlled or tampered with, this can produce stored/reflected HTML/JavaScript injection in the generated report, leading to XSS when a user opens the report in a browser.
All human-facing strings in the docstring, argument help, error messages, and console output are hard-coded in Chinese. There is no opt-in, locale selection, or documented justification that this tool is intended only for a Chinese-speaking or region-specific audience.
The skill description says it 'retrieves real-time speed data from monitoring nodes globally via WebSocket.' In the code, both API endpoints are plain HTTP URLs, and the implementation only submits a test job via requests.post and reports a task/result URL; there is no WebSocket client or logic to stream or collect real-time node results.
Data from a source is assigned to a variable that is later passed to a sink, creating a variable-mediated taint flow.
data.append(("agent", agent))
try:
response = requests.post(
f"{API_BASE}/http",
data=data,
timeout=30
Data from a source is assigned to a variable that is later passed to a sink, creating a variable-mediated taint flow.
data.append(("agent", agent))
try:
response = requests.post(
f"{LEGACY_API_BASE}/http",
data=data,
timeout=30
This code builds a WebSocket URL from the provided account email and API password-derived authentication code, then sends the测速 task to the remote 17CE service. Although the script prints basic progress messages, it does not warn the user that their supplied account identifier and request details will be transmitted externally.
The built-in command is presented with a Chinese name and example phrasing for activation, without indicating that users may choose another language. This can be a language/locale policy issue because the skill appears to privilege a specific language path without explicit user choice or justification.
The document declares lang="zh-CN", and the visible UI text throughout the page is Chinese-only. This imposes a specific language/locale without any indication of user opt-in or justification for a region-specific constraint, which matches the policy-violation category for language/locale handling.
The document declares lang="zh-CN", and all visible UI text is presented in Chinese, which imposes a specific language/locale on users. Under the policy, locale-specific behavior should either provide user opt-in/choice or be clearly justified as region-specific.