java-security-audit

Reviews Java code against OWASP Top 10 security risks and secure coding practices.

Updated Apr 20, 2020
One-click install
npx skills add https://github.com/UnterrainerInformatik/java-rdb-utils --skill java-security-audit-unterrainerinformatik
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: java-security-audit
Source: https://github.com/UnterrainerInformatik/java-rdb-utils/tree/main/.agents/skills/java-security-audit
Command: npx skills add https://github.com/UnterrainerInformatik/java-rdb-utils --skill java-security-audit-unterrainerinformatik

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Java applications frequently ship with preventable vulnerabilities like SQL injection, XSS, hardcoded secrets, and weak password hashing. This Skill provides a structured security checklist so reviewers can systematically audit Java code against the OWASP Top 10 before release. ## Core Features & Use Cases - OWASP Top 10 Coverage: Maps each risk category (A01-A10) to concrete Java mitigations with code examples. - Framework-Specific Guidance: Includes patterns for Spring Security, Quarkus, Jakarta EE, JPA/Hibernate, and plain JDBC. - Secure Coding Patterns: Provides ready-to-use examples for Bean Validation, parameterized queries, BCrypt/Argon2 password hashing, CSRF protection, security headers, and safe Jackson deserialization. - Use Case: Before a production release, ask the AI to audit your Spring Boot REST controller and service layer; it will flag string-concatenated JPQL queries, missing authorization checks, and hardcoded credentials. ## Quick Start Review this Java codebase for security vulnerabilities using the OWASP Top 10 checklist and report any injection, authentication, or secrets management issues.

Frequently Asked Questions about java-security-audit

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I prevent SQL injection in Java JPA and Hibernate?▼

Use parameterized queries with named parameters in JPQL, the Criteria API, or PreparedStatement for JDBC. Never concatenate user input into query strings, as string concatenation in JPQL or native SQL is the primary injection vector.

What password hashing algorithm should I use in Java?▼

Use BCrypt with a strength factor of 12 or Argon2 for new projects, both available via Spring Security's PasswordEncoder. Never use MD5, SHA1, or unsalted SHA-256 for password storage since they are vulnerable to rainbow table and brute-force attacks.

Does this security checklist work with Spring Boot and Quarkus?▼

Yes, the checklist covers Spring Security configuration, Quarkus CSRF properties, Jakarta EE, and framework-agnostic patterns like Bean Validation (JSR 380). Core mitigations such as parameterized queries and output encoding apply to all Java frameworks.

How do I check Java dependencies for known vulnerabilities?▼

Run the OWASP Dependency Check Maven plugin with mvn dependency-check:check, which generates an HTML report of CVEs in your dependencies. Configure failBuildOnCVSS to fail builds on high-severity findings and keep dependencies updated with mvn versions:display-dependency-updates.

Why is Java ObjectInputStream deserialization dangerous?▼

ObjectInputStream.readObject on untrusted data allows remote code execution through gadget chains in the classpath. Use JSON with Jackson instead, disable default typing, and avoid polymorphic deserialization of untrusted input.