Spring Security Configuration

Spring Security Configuration is a skill for Claude Code, Codex from niels-emmer/myace. It costs 42 tokens per session (573 once invoked), scanned A, original, MIT.

A checklist for configuring Spring Security, the security system commonly used in Spring Boot applications. It covers login, access rules, browser protections, cross-origin requests, passwords, and tokens.

In plain words
What is it for?
Use it when adding or reviewing authentication and authorization, protecting service methods, configuring CSRF and CORS, or upgrading a Spring Boot security setup.
Why use it?
It helps prevent accidental open access and security settings that are too broad or impossible to test. It also highlights configuration changes needed when upgrading Spring Security.

Skill for Claude CodeCodex

Which agent this was written for is unclear — built for aider. Also seen: mentions Codex; built for aider; mentions OpenCode.

Good fit Use it when adding or reviewing authentication and authorization, protecting service methods, configuring CSRF and CORS, or upgrading a Spring Boot security setup.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/niels-emmer/myace/spring-security
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add niels-emmer/myace --skill spring-security
Clone the repo
git clone --depth 1 https://github.com/niels-emmer/myace

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for Spring Security Configuration

README.md
[![agentmods](https://agentmods.dev/badge/skills/niels-emmer/myace/spring-security/github.svg)](https://agentmods.dev/skills/niels-emmer/myace/spring-security)
Your own site
<a href="https://agentmods.dev/skills/niels-emmer/myace/spring-security"><img src="https://agentmods.dev/badge/skills/niels-emmer/myace/spring-security/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for Spring Security Configuration

Your own site · 80×15
<a href="https://agentmods.dev/skills/niels-emmer/myace/spring-security"><img src="https://agentmods.dev/badge/skills/niels-emmer/myace/spring-security.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 42 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 573 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00042 $0.00573
Opus 5.5 $0.00017 $0.00229
Sonnet 5.5 $0.00008 $0.00115
Haiku 4.5 $0.00004 $0.00057

Measured yesterday against content hash 105020f1bf6a, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

Spring Security Configuration scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

collections/additional/java-spring/skills/spring-security/SKILL.md · 34 lines

How it starts

The opening of the file, as written. The whole thing — 34 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Purpose

Keep authentication and authorization explicit, default-deny and testable.

When to use it

When adding security to a Spring Boot service, reviewing a security configuration, or upgrading Spring Security across a major version.

Checklist

  • Filter chain: one or more SecurityFilterChain beans using the lambda DSL; WebSecurityConfigurerAdapter is gone. Spring Security 7 requires the lambda DSL and replaces apply() with with(), so check the migration guide when upgrading.
  • Authorization: use authorizeHttpRequests with specific matchers first and anyRequest().authenticated() last. On recent versions prefer PathPatternRequestMatcher; the Ant and Mvc request matchers were removed in Spring Security 7.
  • Method security: enable with @EnableMethodSecurity and use @PreAuthorize on service methods for object-level rules; URL rules alone do not stop an authenticated user reading someone else's record.
  • CSRF: on by default and should stay on for cookie-session browser apps; disable only for stateless APIs authenticated by a bearer token.
  • CORS: an explicit allow-list of origins, methods and headers; never * with credentials.
  • Passwords: PasswordEncoder via DelegatingPasswordEncoder or a deliberate bcrypt, scrypt or Argon2 choice; never store or log plain text.
  • Tokens: for APIs use the OAuth2 resource server support with issuer validation and audience checks, not hand-rolled JWT parsing; keep lifetimes short.
  • Sessions: set stateless or session policy deliberately; regenerate the session on login (default).
  • Actuator: expose only the endpoints needed and secure them; do not publish env, heapdump or beans publicly.
  • Headers: keep the default security headers; change them with a reason.
  • Tests: use spring-security-test (@WithMockUser, jwt(), csrf()) to prove both allowed and denied cases for each role.

Expected output

A security configuration where every route is covered by a rule, object-level checks are in the service layer, and tests prove who can and cannot call each endpoint.

Read the full file on GitHub · 34 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday First seen · 34 lines · 42 tokens per session scan A 105020f1bf6a

Subscribe to this mod's changes

Spring Security Configuration is a skill published in the GitHub repository niels-emmer/myace (1 stars, last pushed 2d ago), licensed MIT. It adds 42 tokens to every session and 573 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-11-29.

Related

Spring Security Configuration compared with skills from other repositories

Spring Security Configuration next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
Spring Security Configurationniels-emmer/myaceSkill12d agoMITA42Claude Code, Codex
idiomatic-goTypeFox/agent-skillsSkill51mo agoMITA137Claude Code
eclipse-license-checkTypeFox/agent-skillsSkill51mo agoMITA110Claude Code
go-documentationTypeFox/agent-skillsSkill51mo agoMITA98Claude Code
publish-vscode-extensionTypeFox/agent-skillsSkill51mo agoMITA107Claude Code
domainmodel-dslTypeFox/agent-skillsSkill51mo agoMITA68Claude Code
statemachine-dslTypeFox/agent-skillsSkill51mo agoMITA63Claude Code