More screenshots
Works with the AI Agents you already use
Java Code Safety Check
WHERE email = '" + email + "'") or one new ObjectInputStream(request.getInputStream()) is enough to lose your data or your server.
$5
Java Code Safety Check
Example session with this skill installed
Check this project with java-code-safety-check.
- Read your context and instructions
- Compiled the java code safety
$ python3 scripts/check_java.py examples/risky
BLOCK src/main/java/com/example/shop/config/SecurityConfig.java:41 J04 HARDCODED_SECRET
ds.setPassword("<redacted>");
Why: A password, API key, token or signing key is written in the code: a secret-named constant or field, setPassword("...") or .password("..."), a JWT or HMAC key (Keys.hmacShaKeyFor, Algorithm.HMAC256, SecretKeySpec, signWith), a @Value default, a DriverManager password or a password inside a JDBC URL. Everyone with the code or the JAR has it; a known JWT key lets anyone forge logins.
Safer: Read secrets from the environment or a secret manager (@Value("${jwt.secret}") with no default, System.getenv("DB_PASSWORD"), Spring Cloud Vault), fail at start-up when they are missing, and rotate the exposed secret.
BLOCK src/main/java/com/example/shop/order/OrderRepository.java:18 J01 SQL_INJECTION
BLOCK src/main/java/com/example/shop/report/ReportController.java:31 J02 COMMAND_FROM_INPUT
BLOCK src/main/java/com/example/shop/report/ReportController.java:44 J03 UNSAFE_DESERIALIZATION
BLOCK src/main/java/com/example/shop/security/JwtService.java:17 J04 HARDCODED_SECRET
BLOCK src/main/java/com/example/shop/security/JwtService.java:33 J05 JWT_SIGNATURE_NOT_CHECKED
REVIEW src/main/java/com/example/shop/config/SecurityConfig.java:24 J14 FAST_PASSWORD_HASH
REVIEW src/main/java/com/example/shop/config/SecurityConfig.java:29 J16 TRUST_ALL_TLS
REVIEW src/main/java/com/example/shop/config/SecurityConfig.java:31 J16 TRUST_ALL_TLS
REVIEW src/main/java/com/example/shop/payment/CardVault.java:16 J13 WEAK_CIPHER
REVIEW src/main/java/com/example/shop/report/ReportController.java:25 J17 FILE_PATH_FROM_REQUEST
REVIEW src/main/java/com/example/shop/report/ReportController.java:37 J11 XML_EXTERNAL_ENTITIES
REVIEW src/main/java/com/example/shop/report/ReportController.java:51 J12 DESERIALIZER_WITHOUT_TYPE_LIMIT
REVIEW src/main/java/com/example/shop/security/JwtService.java:26 J18 SECRET_IN_LOG
REVIEW src/main/java/com/example/shop/security/JwtService.java:38 J15 WEAK_RANDOM_TOKEN
REVIEW src/main/java/com/example/shop/user/UserService.java:24 J14 FAST_PASSWORD_HASH
REVIEW src/main/java/com/example/shop/user/UserService.java:26 J18 SECRET_IN_LOG
(Each finding also has Why and Safer lines, as in the first one.)
Verdict: BLOCK. Checked 6 files, 6 with Java content.
This is a static check of file text. NOT FLAGGED is not a guarantee.
Connects securely to your tools. The creator never sees your data.
About this skill
One jdbc.query("... WHERE email = '" + email + "'") or one new ObjectInputStream(request.getInputStream()) is enough to lose your data or your server. This skill finds those and eleven other Java security mistakes before you deploy, and tells you how to fix each one.
Your agent runs a scanner on your .java files. It skips comments, tests and generated code, understands strings, text blocks and concatenation, follows SQL built in a variable or a StringBuilder to the call that runs it, and knows which values come from the request (getParameter, @RequestParam, @PathVariable, JAX-RS parameters, upload file names). It knows the safe patterns: ? and :name placeholders, constants and numbers, nCopies placeholder lists, sort columns checked against an allowlist, ObjectInputFilter, disallow-doctype-decl, SecureRandom, and normalize() with startsWith. It never compiles or runs Java. It returns BLOCK, REVIEW, or NOT FLAGGED, with the file, line, reason, and a safer approach. Secrets are never printed.
What it checks
BLOCK
- J01: SQL or JPQL built with +, String.format or StringBuilder and run with JDBC, JdbcTemplate, JdbcClient, JPA or Hibernate, and ${} in MyBatis annotations
- J02: Runtime.exec or ProcessBuilder running sh -c with a changing command, one command string built from a value, or a program name from the request
- J03: ObjectInputStream without a filter, SerializationUtils.deserialize, XMLDecoder, XStream any-type permission, Jackson default typing or Id.CLASS on Object fields, SnakeYAML allowing every tag
- J04: hard-coded passwords, API keys, tokens, JWT and HMAC keys, @Value defaults and passwords in JDBC URLs
- J05: JWTs accepted without a signature (Algorithm.none(), parseClaimsJwt, unsecured()) or decoded and never verified
REVIEW
- J11: XML parsers (JAXP, dom4j, JDOM) without DTDs or external entities turned off (XXE)
- J12: XStream without an allowlist and SnakeYAML new Yaml() without SafeConstructor
- J13: DES, triple DES, RC4, Blowfish, ECB mode and Cipher.getInstance("AES")
- J14: MD5 or SHA on passwords and NoOpPasswordEncoder or other weak Spring encoders
- J15: java.util.Random, Math.random(), ThreadLocalRandom or RandomStringUtils for tokens, OTPs and reset codes
- J16: trust-all TrustManagers and hostname verifiers, NoopHostnameVerifier, TrustSelfSignedStrategy
- J17: file paths from the request in new File, Paths.get, resolve or FileSystemResource
- J18: passwords, tokens and the Authorization header written to logs
What's included
- The scanner (Python 3.9+, standard library only)
- A rules guide with the reason and safer approach for each rule
- A risky and a safe example Spring Boot service, and the real report the scanner produces on the risky one
Limits It reads code as text, not with the Java compiler: types are not known and values are followed within one file. application.properties and application.yml, dependencies and known CVEs, Kotlin and JSP files are not checked. NOT FLAGGED is not a guarantee.
Static check of Java text. Values are followed within one file only; configuration files, dependencies and data flow across classes are not checked. NOT FLAGGED is not a guarantee.
How to use
- 1
Connect your agent to the Agensi MCP
Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup
- 2
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 3
Ask for what you need
Your agent loads this skill and uses it on your task. It always asks before any payment.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill goes through the trust checks below.
Security scanned
Checked by our 8-point scan before listing
Fresh listing
Recently published to Agensi
Money-back guarantee
Doesn't do what its page promises? You get your money back.
Trust & safety
Security scan
Security scan passed 5 days ago
Permissions
Runs one local Python script in the terminal. It reads your project's files, writes nothing, and makes no network calls. The example service includes clearly fake, inert secrets (not-a-real-..., NOTREAL-...) for the scanner to find. It is never compiled or run.