Use when you need to apply Java secure coding best practices — including validating untrusted inputs, defending against injection attacks with parameterized queries, minimizing attack surface via least privilege, applying strong cryptographic algorithms, handling exceptions securely without exposing sensitive data, managing secrets at runtime, avoiding unsafe deserialization, and encoding output to prevent XSS. This should trigger for requests such as Review Java code for secure coding. Part of cursor-rules-java project
88
85%
Does it follow best practices?
Impact
—
No eval scenarios have been run
Passed
No known issues
Identify and apply Java secure coding practices to reduce vulnerabilities, protect sensitive data, and harden application behaviour against common attack vectors.
What is covered in this Skill?
PreparedStatement and parameterized APIsScope: The reference is organized by examples (good/bad code patterns) for each core area. Apply recommendations based on applicable examples.
Before applying any secure coding changes, ensure the project compiles. If compilation fails, stop immediately — do not proceed until resolved. After applying improvements, run full verification.
./mvnw compile or mvn compile before applying any changes./mvnw clean verify or mvn clean verify after applying improvementsRun ./mvnw compile or mvn compile and stop immediately if compilation fails.
Read references/124-java-secure-coding.md and identify applicable vulnerabilities and hardening opportunities.
Implement selected protections for input validation, crypto, secrets, deserialization, and output encoding.
Run ./mvnw clean verify or mvn clean verify after applying improvements.
For detailed guidance, examples, and constraints, see references/124-java-secure-coding.md.
762cb86
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.