T09 · Insecure Skill Coding Practices
- Location
references/07-crypto.md:85- Finding
Unsafe AES Template Uses Hardcoded Key Material and Does Not Require Authenticated Encryption
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This is a Markdown-only Java coding guide; its broad scope and a few imperfect examples warrant caution but do not show hidden, deceptive, persistent, or exfiltrating behavior.
Install only if you want a Chinese-language Java coding guide that may activate broadly on Java/Spring work. Review generated dependency changes before applying them, choose your own locale/time zone instead of copying the examples blindly, and do not copy the AES snippet as production crypto without authenticated encryption and proper key management.
references/07-crypto.md:85Unsafe AES Template Uses Hardcoded Key Material and Does Not Require Authenticated Encryption
The skill declares it should be used for virtually any Java or Spring Boot coding, modification, refactoring, or review task, even when the user did not ask for coding standards. That breadth can cause over-invocation, making the agent read project files and steer workflows unnecessarily, which increases attack surface and the chance of irrelevant or disruptive guidance being injected into unrelated tasks.
Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).
UserContext ctx = USER_CTX.get(); // 作用域内只读
handle(ctx);
});
// 作用域结束自动清理,无需 remove
// ✓ 嵌套绑定
ScopedValue.where(REQ_ID, requestId).run(() ->
The secondary triggers are broad code-pattern keywords without scope limits, confidence thresholds, or negative examples. This can cause the skill to activate on incidental mentions or partial snippets, leading to unnecessary instruction loading and increasing the likelihood of workflow interference or prompt-surface expansion.
The document recommends a hard-coded application-wide time zone of Asia/Shanghai, and the file is entirely written in Chinese, but it does not state that the skill is intended only for a China-specific or Chinese-language context. This can violate organizational language/locale policy when a skill implicitly forces a locale choice rather than offering user opt-in or documenting the regional constraint.
The document recommends FileUtil.del(file) for deletion, which is a destructive and potentially irreversible operation. In this markdown skill description, there is no accompanying warning about data loss, confirmation, or safe-use constraints for deletion behavior.
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
public User fetchUser(String userId) throws IOException {
Request req = new Request.Builder()
.url("https://api.example.com/users/" + userId).build();
try (Response resp = client.newCall(req).execute()) {
if (resp.code() == 404) return null;
if (!resp.isSuccessful()) throw new RuntimeException("status " + resp.code());
The entire skill reference is written in Chinese and does not indicate that the user may choose another language or that the content is intentionally limited to a Chinese-speaking or region-specific audience. Under the policy, forcing a specific language without opt-in is a natural-language locale violation.
The entire skill content is written in Chinese, and there is no indication that users may choose another language or that the skill is intentionally limited to a Chinese-speaking or region-specific context. Per the policy, forcing a specific language without user opt-in is a natural-language policy violation.
The entire skill content is written in Chinese and provides no indication that users may choose another language or locale. Under the stated policy, forcing a specific language without opt-in is a natural-language policy violation unless the locale constraint is explicitly documented and justified.
The POST JSON example sends serialized objects to a remote URL, and the document generally recommends HTTP request patterns. The markdown does not warn that requests may transmit user or system data to external services or that endpoints should be trusted and data minimized.
The example hard-codes Chinese status labels such as "活跃", "停用", "待审", and "未知". Under the policy, forcing a specific language without offering a user choice can be a natural-language locale violation, even in instructional examples.
The markdown explicitly recommends Locale.US to avoid European decimal separators, which imposes a fixed locale choice in natural-language guidance rather than offering a user-selectable or context-dependent locale. This can violate language/locale policy when the skill is reused in broader contexts where user locale should be respected.
The guidance in this section states that pinyin and English should not be mixed and recommends using fully English names consistently. This is a natural-language locale/language preference presented as a mandatory rule, without offering user choice or documenting a region-specific policy justification.