agentleFS
XData-siXData-si/xdata-agenthub/skills/java-spring-review/SKILL.md

java-spring-review

Skill1 starsChanged 32 days agoMITView on GitHub

Review Java and Spring Boot services for security, transactions, persistence performance and operability — Spring Security configuration, input validation, JPA N+1 queries, transaction boundaries, Actuator exposure and dependency risk. Use when reviewing or hardening a Spring Boot application or upgrading Spring versions.

The file

We split this skill into the rules it gives an agent

3 rules. About 0 are common, 2 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Actuator: only health and info exposed publicly.

    line 21
  2. Distinctive:

    Every endpoint has an explicit authorization rule.

    line 33
  3. Distinctive:

    Test against non-production data.

    line 41

≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Java and Spring Boot Review

Goal

A Spring service that authorizes every endpoint, validates input, uses transactions deliberately, queries efficiently and exposes only safe operational endpoints.

Inputs

  • Spring Boot and Java versions, build file (Maven or Gradle), security configuration, entity model, application.yml per environment.

Review checklist

  1. Security configuration: a SecurityFilterChain bean with deny-by-default (anyRequest().authenticated()); method security (@PreAuthorize) for object-level rules; CSRF enabled for browser sessions, deliberately disabled only for stateless token APIs; CORS restricted to known origins.
  2. Validation: request DTOs with Bean Validation (@Valid, @NotNull, @Size); entities are not bound directly from requests (mass assignment); error handler returns problem details without stack traces.
  3. Injection: JPQL/SQL with parameters, never string concatenation; no SpEL evaluation of user input; safe deserialization (no default typing in Jackson for untrusted data).
  4. Transactions: @Transactional on service methods, not controllers; read-only where applicable; self-invocation does not bypass proxies; no remote calls inside long transactions.
  5. Persistence performance: detect N+1 queries (enable SQL logging or Hibernate statistics in tests); use fetch joins or entity graphs; paginate collections; open-session-in-view disabled (spring.jpa.open-in-view=false).
  6. Actuator: only health and info exposed publicly; env, heapdump, configprops and loggers never public; management port or authentication for the rest.
  7. Configuration and secrets: secrets from environment or a secret manager, not committed application.yml; profiles do not enable debug features in production.
  8. Dependencies and runtime: dependency check (OWASP Dependency-Check, Snyk or similar); supported Spring Boot line; virtual threads or thread pools sized for the workload.

Example fixture

@GetMapping("/orders/{id}")
public Order get(@PathVariable Long id) { return repo.findById(id).orElseThrow(); }

Expected findings: no ownership check (IDOR), entity returned directly (field exposure), unhandled not-found returns 500.

Acceptance checks

  • Every endpoint has an explicit authorization rule; a test proves a user cannot read another user's resource.
  • Actuator exposure verified from outside (negative test: /actuator/env returns 401/404).
  • N+1 checks on the main list endpoints with query counts recorded.

Output

Findings with file and line, configuration changes, tests added.

Safety

Test against non-production data. Never enable sensitive Actuator endpoints publicly, even temporarily, to debug.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.