Back to skill

Security audit

java-coding-guide-pro

Security checks for vulnerabilities and agentic risk

Overview

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.

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
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
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (13)

Vague Triggers

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

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.

Content

No source excerpt is available for this finding.

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
80% confidence
Finding

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).

Content

Scanner excerpt · references/05-concurrency.md (reported line 176)May include surrounding context.

md
UserContext ctx = USER_CTX.get();  // 作用域内只读
    handle(ctx);
});
// 作用域结束自动清理,无需 remove

// ✓ 嵌套绑定
ScopedValue.where(REQ_ID, requestId).run(() ->

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

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.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

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.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

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.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · references/04-io-http-json.md (reported line 136)May include surrounding context.

java
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());

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

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.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

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.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

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.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
79% confidence
Finding

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.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
82% confidence
Finding

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.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
77% confidence
Finding

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.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
82% confidence
Finding

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.

Content

No source excerpt is available for this finding.