T09 · Insecure Skill Coding Practices
- Location
instreet_game_controller.js:147- Finding
Hard-Coded Third-Party API Credential Enables Unauthorized API Use
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This game skill mostly matches a local party game, but it also ships undisclosed remote InStreet automation with a hardcoded API key and inaccurate no-network documentation.
Review before installing. The main game appears to run locally, but the package includes extra runnable InStreet integration code with a hardcoded credential and undocumented network behavior. Install only if you trust the publisher, are comfortable with the bundled auxiliary scripts, and preferably after the credential is removed/rotated and the documentation is corrected.
instreet_game_controller.js:147Hard-Coded Third-Party API Credential Enables Unauthorized API Use
multiplayer_index.js:504Any Joined Participant Can Terminate the Shared Multiplayer Game
声明描述的是一个完整的“谁是卧底”AI游戏技能,强调支持多人、AI对手和完整游戏机制;但代码实际只是一个 API 适配层,负责向外部服务发送 HTTP 请求来创建房间、查询状态、提交行动和加入房间。代码中没有看到本地实现的游戏规则、玩家管理、AI对手逻辑,也没有体现 4-10 人范围(默认 6 人,参数可传但未强约束)。此外,声明未说明会访问外部 InStreet 服务,而代码明确依赖远程 API 和 Bearer Token 鉴权。这属于主要用途和能力上的明显不一致。
The description says this is a classic AI version of 谁是卧底 with 4–10 player support, intelligent AI opponents, and full game mechanics. The code shown is narrower and materially different: it is a controller for an external InStreet game service, creates one hardcoded 6-player room, saves room details to disk, and uses very simple random strategies for description and voting. It does not demonstrate full game mechanics or intelligent AI behavior as claimed. It also contains undeclared capabilities/resource use, including filesystem writes and use of an embedded API key/external API automation. Therefore the declared description does not accurately represent the actual behavior.
The declared description says this skill implements the 'Who is Undercover' game with AI opponents and gameplay mechanics. However, the supplied code does not implement any game logic, player handling, or AI behavior. Instead, it is a development/publishing utility script that reads the local filesystem to validate packaging requirements and file contents. That is a materially different primary purpose from the declared game functionality, so this is a clear mismatch.
The declared description presents an end-user game skill with gameplay functionality, but the supplied code chunk is purely a developer/deployment script for publishing the skill to ClawHub. It does not implement game logic, AI opponents, player handling, or any gameplay mechanics described in the declaration. This is a material purpose mismatch: the code performs release engineering tasks rather than the advertised game behavior.
虽然代码主题与声明一致,确实属于“谁是卧底”游戏相关逻辑,并包含一定AI对手行为,但描述与实际代码存在明显偏差。实际代码的主要功能是监控并持久化游戏状态,依赖本地文件读写,这是声明权限中未体现的能力。生成的状态报告还直接显示存活玩家角色(卧底/平民),这不符合普通游戏玩家视角下的经典游戏机制,更像后台管理或调试工具。此外,代码只实现了非常有限的一部分流程,不足以支撑“支持4-10人游戏,包含智能AI对手和完整游戏机制”的完整表述。因此应判定为存在描述与行为不完全一致,且包含未声明能力的 mismatch。
Skill manipulates agent memory, state, or stored context. Memory corruption can alter personality, override safety rules, or cause unpredictable behavior.
}
currentGames.delete(gameId);
delete context.gameId;
return {
success: true,
The entire user guide is written in Chinese and labels itself as a 用户指南, but it does not indicate that Chinese is optional, nor does it provide any language-selection guidance. Under the language/locale policy, forcing a specific language without user opt-in is a natural-language policy concern unless the locale restriction is explicitly justified.
This markdown file instructs the user to set and use a ClawHub API token directly in environment variables and command lines, but it does not warn that the token is sensitive or advise against exposing it in shell history, screenshots, or shared terminals. Because markdown files should disclose behaviors affecting privacy or system integrity, the absence of any credential-handling warning is a meaningful omission.
The fallback curl example includes an Authorization bearer token in a command that users may copy into terminals, logs, or support chats, yet the documentation provides no warning about credential leakage risks. For markdown guidance involving network transmission of credentials, a brief user-facing warning is expected when privacy-sensitive data is involved.
The skill description and all usage examples are presented as a Chinese-only experience, starting with the primary description in Chinese and showing Chinese input content for gameplay. There is no indication that users may choose another language or that the language restriction is intentional for a region-specific audience, which creates a locale-policy concern.
The skill description is primarily written in Chinese and presents command usage and gameplay context as Chinese-only, with no indication that users may choose another language or that the skill is intentionally limited to a Chinese-speaking audience. This can violate language/locale policy when a skill implicitly forces one language without opt-in or justification.
The manifest description and all user-facing documentation are written in Chinese, which effectively forces a specific language for users without any opt-in or alternative locale support. This matches the policy category for language or locale restrictions that are not explicitly optional or justified as region-specific.
The skill hardcodes Chinese words for game content and later returns user-facing Chinese status messages, which indicates the skill is designed to operate in a single language. There is no opt-in, fallback, or documented justification for restricting the skill to Chinese, so this is a locale-policy concern.
Several returned messages are in English, but the gameplay content and many user-visible messages elsewhere are in Chinese, showing the skill enforces a specific locale for core interaction. Because the file does not offer users a language choice or clearly document a justified locale restriction, this conflicts with the stated policy.
This code file contains natural-language metadata and command descriptions entirely in Chinese, and later user-facing responses are also hardcoded in Chinese. Because the skill does not offer language selection or explain that it is intentionally region-specific, it violates the language/locale policy criteria.
The file routes core gameplay actions to a remote API despite the skill being described as a self-contained AI game. This creates a trust and transparency gap: user interactions, room metadata, and game state are handled by an external service, which can affect privacy, availability, and expected execution boundaries.
The adapter requires an API key and establishes authenticated communication with a third-party game service, but that external account/integration is not justified by the local-game description. Undisclosed external integration expands the attack surface by introducing credential handling, third-party data processing, and dependency on a remote operator outside user expectations.
The manifest describes a complete AI version of the social deduction game, which implies the skill itself provides the game mechanics and AI opponents. Here, the code delegates core gameplay to an external platform by creating a remote room via the adapter, so the implemented behavior is managing a third-party game session rather than implementing the described standalone game.
A hardcoded API key in source code is a real credential exposure issue. Anyone with access to the code, logs, repository history, or distributed package can reuse the key to access the external service, potentially incurring cost, impersonating the application, or abusing associated resources.
This code file contains natural-language descriptions and command usage text entirely in Chinese, indicating the skill is designed to operate in a single language. The policy explicitly says to flag language or locale constraints when the skill does not offer user opt-in or choice, and no alternative language option or justification is present in this file.
The comments and naming imply passive monitoring, but the report explicitly reveals hidden roles for alive players using role-dependent emoji and the script also mutates gameplay state. In a social deduction game, exposing undercover status destroys the secrecy model and compromises the fairness and integrity of the game if the report is viewed by participants or otherwise leaked.
The script writes a detailed status report to disk without access restrictions or warnings, and that report contains sensitive game information including player descriptions, votes, and hidden-role indicators. Persisting this to a predictable local file increases the chance of unintended disclosure to other processes, users, or logs, undermining game secrecy.
The file is presented as a realtime status monitor, but it also advances gameplay and mutates persistent game state by generating AI moves and rewriting current_game.json. This hidden coupling breaks least surprise and can let any caller of a supposedly read-only monitor influence game outcomes, creating integrity issues and accidental or unauthorized state changes.
The script silently modifies and overwrites the main game state file while performing AI actions and phase transitions. Undisclosed persistent mutation can corrupt expected flow, create race conditions with other game components, and allow a monitoring task to become an unintended authority over gameplay state.
This markdown file is entirely Chinese-language, including headings and instructions, and does not indicate that the skill is intended specifically for a Chinese-speaking audience or provide an alternative language option. Under the policy, forcing a specific language without user opt-in can be a natural-language policy violation.