spring-security-configurator-auditor
Skill15 starsChanged 9 months agoMITView on GitHub
Design and audit Spring Security configurations for Kotlin plus Spring services, including filter chains, JWT or OAuth2 resource server setup, method security, CORS, CSRF rationale, and public endpoint exposure. Use when adding or reviewing authentication and authorization, narrowing access rules, validating token handling, or checking for insecure defaults and accidental exposure.
1 other project uses a version of this, 1 of them edited.
Adopted by
Most recently taken up by
- JetBrains/skillsedited, first seen Apr 28, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 1
- JetBrains/skills★ 38696% same
Wrote their own version · 0
None found.
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository24 other files it gives its agents.
- ci-cd-containerization-advisorSkill
- configuration-properties-profiles-kotlin-safeSkill
- dependency-conflict-resolverSkill
- domain-decomposition-api-design-advisorSkill
- error-model-validation-architectSkill
- gradle-kotlin-dsl-doctorSkill
- integration-resilience-engineerSkill
- jackson-kotlin-serialization-specialistSkill
- java-kotlin-migration-assistantSkill
- jpa-spring-data-kotlin-mapperSkill
- kotlin-idiomatic-refactorer-spring-awareSkill
- kotlin-spring-proxy-compatibilitySkill
- observability-integratorSkill
- performance-concurrency-advisorSkill
- production-incident-responderSkill
- project-context-ingestionSkill
- schema-migration-plannerSkill
- spring-context-di-reasoningSkill
- spring-kotlin-code-reviewSkill
- spring-mvc-webflux-api-builderSkill
- stacktrace-log-triageSkill
- test-suite-builderSkill
- transaction-consistency-designerSkill
- upgrade-breaking-change-navigatorSkill
The file
We split this skill into the rules it gives an agent
12 rules. About 0 are common, 12 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈12
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 30
Add tests for the critical allowed and denied paths.
- Distinctive: line 34
Prefer explicit allowlists for public endpoints.
- Distinctive: line 37
Keep method security and request security aligned.
- Distinctive: line 38
Treat CORS as a policy surface, not a browser nuisance.
- Distinctive: line 62
Prefer deny-by-default designs where new endpoints start closed unless explicitly opened.
- Distinctive: line 63
If browser and machine clients coexist, treat them as separate security surfaces even inside one service.
- Distinctive: line 64
If an endpoint is operationally sensitive but "internal," still secure it explicitly.
- Distinctive: line 79
Do not disable CSRF or frame options without explaining the trust model.
- Distinctive: line 80
Do not rely on default matcher behavior without checking path coverage.
- Distinctive: line 81
Do not leave actuator, Swagger, or internal diagnostics exposed by convenience.
- Distinctive: line 82
Do not generate security config without tests for the key routes.
- Distinctive: line 83
Do not conflate authentication failure with authorization failure.
≈ “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.
Files
Spring Security Configurator Auditor
Source mapping: Tier 2 high-value skill derived from Kotlin_Spring_Developer_Pipeline.md (SK-13).
Mission
Produce a security model that is explicit, minimal, and testable. Optimize for least privilege and correct failure semantics, not for shortest config.
Read First
- Current
SecurityFilterChainor chains. - Endpoint inventory, including actuator, docs, and internal admin routes.
- Authentication model: session, JWT, OAuth2 resource server, API keys, mTLS, or mixed.
- Authorization model: roles, scopes, claims, method security, tenant boundaries.
- CORS, CSRF, and security-related tests.
Design Sequence
- Define who the clients are: browser, internal service, public API consumer, job, or operator.
- Define authentication mechanism and token trust boundaries.
- Enumerate public endpoints explicitly.
- Define authorization at URL and method level.
- Define 401 and 403 behavior.
- Add tests for the critical allowed and denied paths.
Core Security Rules
- Prefer explicit allowlists for public endpoints.
- Validate JWT issuer, audience, expiration, signature, and clock-skew assumptions deliberately.
- Map claims to authorities with a documented rule. Do not assume the default claim mapping is correct for the identity provider.
- Keep method security and request security aligned. One should not silently compensate for the other.
- Treat CORS as a policy surface, not a browser nuisance.
Advanced Security Traps
- Multiple filter chains are ordered. A broad matcher in the wrong chain can shadow a more specific secure chain.
permitAllfor docs or actuator endpoints often expands further than intended when matchers are too broad.- CSRF is not automatically irrelevant just because the app uses tokens somewhere. Browser-based flows and cookie-backed auth change the answer.
- Async execution, schedulers, and message listeners may not carry the same security context as request threads.
- Method security on internal helper methods does not help if the call never crosses the proxy boundary.
- JWT validation without issuer or audience checks is weaker than many teams realize.
- CORS preflight failures can look like auth failures even when the backend logic is correct.
- Security behavior differs between servlet and reactive stacks; do not transplant config blindly.
Advanced AuthZ And Token Nuances
- Path-based authorization is often necessary but rarely sufficient. Tenant, ownership, or resource-state checks may belong in method or domain-level authorization.
- JWT key rotation, JWKS caching, and clock skew policy are operational concerns as well as security concerns. Token validation must keep working during key rollover.
- Opaque token introspection, JWT validation, and gateway-terminated auth have different failure modes and trust boundaries. Be explicit about which layer owns what.
- Custom claim mapping can accidentally drop scopes or elevate privileges if the mapping rule is too permissive.
- Security headers, session creation policy, and stateless assumptions should match the actual client model rather than copied boilerplate.
Expert Heuristics
- Model "who can do what to which resource under which tenant or context" before writing matcher code.
- Prefer deny-by-default designs where new endpoints start closed unless explicitly opened.
- If browser and machine clients coexist, treat them as separate security surfaces even inside one service.
- If an endpoint is operationally sensitive but "internal," still secure it explicitly. Internal does not mean safe.
Output Contract
Return these sections:
Threat surface: what must be protected and from whom.Authentication model: how identity is established and verified.Authorization model: how access decisions are made.Critical findings or risks: insecure defaults, over-broad rules, missing checks, missing tests.Minimal secure config plan: the smallest safe configuration or patch.Verification: security tests for both allowed and denied access.
Guardrails
- Do not disable CSRF or frame options without explaining the trust model.
- Do not rely on default matcher behavior without checking path coverage.
- Do not leave actuator, Swagger, or internal diagnostics exposed by convenience.
- Do not generate security config without tests for the key routes.
- Do not conflate authentication failure with authorization failure.
Quality Bar
A good run of this skill makes the access model explicit and auditable. A bad run produces a working login flow while leaving route exposure, token validation, or test coverage dangerously vague.
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
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.

