T09 · Insecure Skill Coding Practices
- Location
2037.py:27- Finding
Credential and bearer-token transmission to unrestricted API endpoints
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This appears to be a real Earth2037 game-control skill, but it handles credentials and can perform broad account-changing game actions without enough scoping or safeguards.
Install only if you intend to let this skill operate your Earth2037 account, not just register or log in. Avoid putting passwords or keys directly in command arguments, do not set a custom apiBase unless you trust it, keep the skill directory private, and require explicit approval before chat posts, troop movement, construction, recruitment, inventory discard/disassembly, or cache sync/bootstrap.
2037.py:27Credential and bearer-token transmission to unrestricted API endpoints
2037.py:423Passwords and registration keys exposed through process arguments
cache.py:250Sensitive account and session caches are created without explicit restrictive permissions
build_ops.py:92Unrestricted file-backed payloads can transmit arbitrary readable local files
The documentation includes troop recruitment queue management and other low-level operational helpers that exceed the declared key/register/login purpose. Recruitment changes in-game state and consumes resources, so concealing it behind an underspecified description increases the chance of unsafe delegation or accidental misuse.
The documentation includes troop recruitment queue management and other low-level operational helpers that exceed the declared key/register/login purpose. Recruitment changes in-game state and consumes resources, so concealing it behind an underspecified description increases the chance of unsafe delegation or accidental misuse.
The documentation includes troop recruitment queue management and other low-level operational helpers that exceed the declared key/register/login purpose. Recruitment changes in-game state and consumes resources, so concealing it behind an underspecified description increases the chance of unsafe delegation or accidental misuse.
The documentation includes troop recruitment queue management and other low-level operational helpers that exceed the declared key/register/login purpose. Recruitment changes in-game state and consumes resources, so concealing it behind an underspecified description increases the chance of unsafe delegation or accidental misuse.
The documentation includes troop recruitment queue management and other low-level operational helpers that exceed the declared key/register/login purpose. Recruitment changes in-game state and consumes resources, so concealing it behind an underspecified description increases the chance of unsafe delegation or accidental misuse.
The documentation includes troop recruitment queue management and other low-level operational helpers that exceed the declared key/register/login purpose. Recruitment changes in-game state and consumes resources, so concealing it behind an underspecified description increases the chance of unsafe delegation or accidental misuse.
The documentation includes troop recruitment queue management and other low-level operational helpers that exceed the declared key/register/login purpose. Recruitment changes in-game state and consumes resources, so concealing it behind an underspecified description increases the chance of unsafe delegation or accidental misuse.
This Python skill's docstring and all user-facing prompts and status messages are written in Chinese, and the --lang option only affects server selection rather than output language. That creates a locale-policy concern because the skill effectively imposes a specific language on users without opt-in or an alternative.
The recover command allows credential-based recovery of a long-lived skill token using only username and password, even though the manifest does not disclose this capability. In an agent setting, this increases the sensitivity of handling raw credentials and can let the skill mint or recover reusable API access beyond the narrow login flow a user may think they are invoking.
The skill metadata says it should be used for key/apikey, registration, and login, but the CLI also exposes authenticated gameplay/state-changing actions like setcity, airdrop, sync, and bootstrap. This mismatch is dangerous because it broadens the skill's real authority beyond what users, reviewers, or orchestrators may expect, enabling unexpected account-affecting actions once a token is present.
The file points the agent to build, march, and chat operations and frames them as normal next steps, but does not warn that these commands can modify live game state, spend resources, move units, or send messages on behalf of the user. In a skill intended for LLM use, that omission can lead to unauthorized or accidental state-changing actions if the agent acts without explicit confirmation.
Skill enumerates or reads other installed skills. Access to other skills' SKILL.md files or the skills directory reveals prompt instructions, capabilities, and secrets that should be invisible to peer skills.
| `skills/earth2037-game/build_ops.py` | 升级 / 取消队列 |
| `skills/earth2037-game/march_ops.py` | 出征 |
| `skills/earth2037-game/chat_ops.py` | 世界/联盟聊天 |
| `skills/earth2037-game/SKILL.md` | 完整命令与 HTTP 约定 |
---
The skill declares broad operational capabilities—shell, network, file read/write, and environment access—without any explicit tool-scoping or permission boundaries in the manifest. In practice this increases risk because the skill instructs immediate command execution, handles credentials/tokens, writes local cache files, and performs authenticated remote actions, yet gives the host no least-privilege constraints to enforce.
The manifest says the skill is mainly for key/register/login flows, while the body documents broad authenticated game control and state-management behavior. This is a real security issue because it undermines informed consent and makes policy or human review likely to underestimate the skill's reach.
The skill tells the agent to immediately execute account-related commands but does not warn that usernames, passwords, keys, and bearer tokens will be sent to a remote API and that account/session data may be cached locally. That lack of disclosure is dangerous because it can trick users into sharing sensitive credentials without informed consent and expands exposure through local persistence.
Social/chat and alliance capabilities are unrelated to the manifest's narrow authentication-focused purpose and enable authenticated interactions with other users. Because these are externally visible actions, undocumented support for reading and sending messages raises impersonation, spam, and abuse risks.
The documentation includes destructive inventory actions such as dropping and disassembling items, despite a manifest centered on key/register/login. These operations can irreversibly destroy in-game assets, making the mismatch particularly dangerous because a user may grant trust to an auth helper that can actually perform loss-causing actions.
This Python file contains user-facing natural-language strings entirely in Chinese, including the top-level description and command-line help, with no indication that the skill is intentionally region-specific or that users may select another language. That creates a language/locale policy concern under the rule for natural-language policy violations.
The code exposes a cancel-queue command that invokes CANCELBUILDQUEUE, which can irreversibly alter in-game state, but there is no confirmation prompt or user-facing warning before execution. The brief help text only names the command and does not disclose that it performs a destructive cancellation.
This code performs authenticated HTTP requests to remote endpoints and writes the returned multi-route game data into local JSON cache files. Although the module docstring mentions local caching in general, the bootstrap path itself lacks an in-function confirmation or explicit user-facing disclosure at the point where sensitive account/game data is fetched and persisted.
This code's user-facing natural language is entirely in Chinese, beginning with the module description and continuing through command descriptions and error messages. Under the policy, forcing a specific language without user opt-in or a documented justified locale scope is a natural-language policy violation.
The configuration defines separate API bases for "zh" and "en", which indicates the skill routes behavior based on language/locale. There is no visible indication in this file that users can opt in to that locale handling or that the restriction is documented and justified as region-specific.
This Python file exposes a raw-json mode that accepts an entire CombatQueue JSON payload and later transmits it via gc(api, token, "ADDCOMBATQUEUE", line). While the script's overall purpose is game marching, this mode lacks any confirmation prompt or explicit user-facing warning near the interface that it will submit arbitrary queued actions to the remote API.
The file-level docstring is entirely in Chinese and presents the skill’s commands and usage only in that language. This is a natural-language locale constraint with no indication that the user can choose another language or that the restriction is justified by a region-specific requirement.
The document instructs authenticated HTTP use with a Bearer token and references environment/config token sources, but does not warn that these credentials grant access to a live game account and may expose user data or permit actions under that account. In an agent/skill context, omission of credential-handling guidance increases the chance of unsafe token use, logging, or unintended access.
No suspicious patterns detected.