{"id":"c0808488-bc36-4b88-b6ec-9cf36a6848b1","shortId":"enPW9d","kind":"skill","title":"304-frameworks-spring-boot-security","tagline":"Use when you need to design, review, or improve security in Spring Boot applications — including SecurityFilterChain, OAuth2/JWT resource server patterns, form login basics, method security (@PreAuthorize), CSRF and CORS for APIs, session fixation, security headers, exception han","description":"# Spring Boot Security Guidelines\n\nApply Spring Boot security best practices with secure-by-default API boundaries.\n\n**What is covered in this Skill?**\n\n- Spring Security configuration and SecurityFilterChain setup\n- Authentication and authorization policies for endpoints\n- Method-level security (@PreAuthorize / @Secured)\n- Principle of least privilege for roles and scopes\n- Secure error handling and denial responses\n- Sensitive data handling in logs and responses\n\n**Scope:** Apply recommendations based on the reference rules and good/bad examples.\n\n## Constraints\n\nBefore applying security changes, ensure the project compiles. After improvements, run full verification.\n\n- **MANDATORY**: Run `./mvnw compile` or `mvn compile` before applying any change\n- **SAFETY**: If compilation fails, stop immediately\n- **VERIFY**: Run `./mvnw clean verify` or `mvn clean verify` after applying improvements\n- **BEFORE APPLYING**: Read the reference for detailed rules and examples\n\n## When to use this skill\n\n- Add Spring Boot security support\n- Review Spring Boot security configuration\n- Improve API authorization in Spring Boot\n- Add JWT resource server security in Spring Boot\n- Harden Spring Boot security headers and CSRF settings\n- Implement method security with @PreAuthorize in Spring Boot\n\n## Workflow\n\n1. **Read reference and assess project context**\n\nRead `references/304-frameworks-spring-boot-security.md` and inspect the current project setup before proposing changes.\n\n2. **Gather scope and decide target improvements**\n\nIdentify requested outcomes, constraints, and the minimum safe set of changes to apply.\n\n3. **Apply framework-aligned changes**\n\nImplement or refactor security-related configuration/code following the reference patterns and project conventions.\n\n4. **Run verification and report results**\n\nExecute appropriate build/tests and summarize what changed, what was verified, and any follow-up actions.\n\n## Reference\n\nFor detailed guidance, examples, and constraints, see [references/304-frameworks-spring-boot-security.md](references/304-frameworks-spring-boot-security.md).","tags":["304","frameworks","spring","boot","security","cursor","rules","java","jabrena","agent-skills","ai-skills","claude"],"capabilities":["skill","source-jabrena","skill-304-frameworks-spring-boot-security","topic-agent-skills","topic-ai-skills","topic-claude","topic-claude-code","topic-claude-code-skills","topic-claude-code-subagents","topic-claude-skills","topic-cursor-agent","topic-cursor-ai","topic-cursor-skills","topic-cursorai","topic-github-copilot"],"categories":["cursor-rules-java"],"synonyms":[],"warnings":[],"endpointUrl":"https://skills.sh/jabrena/cursor-rules-java/304-frameworks-spring-boot-security","protocol":"skill","transport":"skills-sh","auth":{"type":"none","details":{"cli":"npx skills add jabrena/cursor-rules-java","source_repo":"https://github.com/jabrena/cursor-rules-java","install_from":"skills.sh"}},"qualityScore":"0.631","qualityRationale":"deterministic score 0.63 from registry signals: · indexed on github topic:agent-skills · 362 github stars · SKILL.md body (2,102 chars)","verified":false,"liveness":"unknown","lastLivenessCheck":null,"agentReviews":{"count":0,"score_avg":null,"cost_usd_avg":null,"success_rate":null,"latency_p50_ms":null,"narrative_summary":null,"summary_updated_at":null},"enrichmentModel":"deterministic:skill-github:v1","enrichmentVersion":1,"enrichedAt":"2026-04-26T12:53:36.843Z","embedding":null,"createdAt":"2026-04-26T12:53:36.843Z","updatedAt":"2026-04-26T12:53:36.843Z","lastSeenAt":"2026-04-26T12:53:36.843Z","tsv":"'/mvnw':133,150 '1':216 '2':234 '3':254 '304':1 '4':274 'action':295 'add':175,191 'align':258 'api':37,59,186 'appli':48,107,119,139,158,161,253,255 'applic':20 'appropri':281 'assess':220 'authent':73 'author':75,187 'base':109 'basic':29 'best':52 'boot':5,19,45,50,177,182,190,198,201,214 'boundari':60 'build/tests':282 'chang':121,141,233,251,259,286 'clean':151,155 'compil':125,134,137,144 'configur':69,184 'configuration/code':266 'constraint':117,244,302 'context':222 'convent':273 'cor':35 'cover':63 'csrf':33,205 'current':228 'data':100 'decid':238 'default':58 'denial':97 'design':12 'detail':166,298 'endpoint':78 'ensur':122 'error':94 'exampl':116,169,300 'except':42 'execut':280 'fail':145 'fixat':39 'follow':267,293 'follow-up':292 'form':27 'framework':3,257 'framework-align':256 'frameworks-spring-boot-secur':2 'full':129 'gather':235 'good/bad':115 'guidanc':299 'guidelin':47 'han':43 'handl':95,101 'harden':199 'header':41,203 'identifi':241 'immedi':147 'implement':207,260 'improv':15,127,159,185,240 'includ':21 'inspect':226 'jwt':192 'least':87 'level':81 'log':103 'login':28 'mandatori':131 'method':30,80,208 'method-level':79 'minimum':247 'mvn':136,154 'need':10 'oauth2/jwt':23 'outcom':243 'pattern':26,270 'polici':76 'practic':53 'preauthor':32,83,211 'principl':85 'privileg':88 'project':124,221,229,272 'propos':232 'read':162,217,223 'recommend':108 'refactor':262 'refer':112,164,218,269,296 'references/304-frameworks-spring-boot-security.md':224,304,305 'relat':265 'report':278 'request':242 'resourc':24,193 'respons':98,105 'result':279 'review':13,180 'role':90 'rule':113,167 'run':128,132,149,275 'safe':248 'safeti':142 'scope':92,106,236 'secur':6,16,31,40,46,51,56,68,82,84,93,120,178,183,195,202,209,264 'secure-by-default':55 'security-rel':263 'securityfilterchain':22,71 'see':303 'sensit':99 'server':25,194 'session':38 'set':206,249 'setup':72,230 'skill':66,174 'skill-304-frameworks-spring-boot-security' 'source-jabrena' 'spring':4,18,44,49,67,176,181,189,197,200,213 'stop':146 'summar':284 'support':179 'target':239 'topic-agent-skills' 'topic-ai-skills' 'topic-claude' 'topic-claude-code' 'topic-claude-code-skills' 'topic-claude-code-subagents' 'topic-claude-skills' 'topic-cursor-agent' 'topic-cursor-ai' 'topic-cursor-skills' 'topic-cursorai' 'topic-github-copilot' 'use':7,172 'verif':130,276 'verifi':148,152,156,289 'workflow':215","prices":[{"id":"deeb072a-4db9-42be-b7ba-3aa11c6bd0c9","listingId":"c0808488-bc36-4b88-b6ec-9cf36a6848b1","amountUsd":"0","unit":"free","nativeCurrency":null,"nativeAmount":null,"chain":null,"payTo":null,"paymentMethod":"skill-free","isPrimary":true,"details":{"org":"jabrena","category":"cursor-rules-java","install_from":"skills.sh"},"createdAt":"2026-04-26T12:53:36.843Z"}],"sources":[{"listingId":"c0808488-bc36-4b88-b6ec-9cf36a6848b1","source":"github","sourceId":"jabrena/cursor-rules-java/304-frameworks-spring-boot-security","sourceUrl":"https://github.com/jabrena/cursor-rules-java/tree/main/skills/304-frameworks-spring-boot-security","isPrimary":false,"firstSeenAt":"2026-04-26T12:53:36.843Z","lastSeenAt":"2026-04-26T12:53:36.843Z"}],"details":{"listingId":"c0808488-bc36-4b88-b6ec-9cf36a6848b1","quickStartSnippet":null,"exampleRequest":null,"exampleResponse":null,"schema":null,"openapiUrl":null,"agentsTxtUrl":null,"citations":[],"useCases":[],"bestFor":[],"notFor":[],"kindDetails":{"org":"jabrena","slug":"304-frameworks-spring-boot-security","github":{"repo":"jabrena/cursor-rules-java","stars":362,"topics":["agent-skills","ai-skills","claude","claude-code","claude-code-skills","claude-code-subagents","claude-skills","cursor-agent","cursor-ai","cursor-skills","cursorai","github-copilot","intellij-idea","java","prompting","system-prompts"],"license":"apache-2.0","html_url":"https://github.com/jabrena/cursor-rules-java","pushed_at":"2026-04-26T12:50:01Z","description":"A curated and opinionated collection of Skills and Agents to be used in modern SDLC workflows for Java Enterprise development with your favorite AI Agent harness.","skill_md_sha":"4c9055a265242ded840f3a007277ff15f54f254d","skill_md_path":"skills/304-frameworks-spring-boot-security/SKILL.md","default_branch":"main","skill_tree_url":"https://github.com/jabrena/cursor-rules-java/tree/main/skills/304-frameworks-spring-boot-security"},"layout":"multi","source":"github","category":"cursor-rules-java","frontmatter":{"name":"304-frameworks-spring-boot-security","license":"Apache-2.0","description":"Use when you need to design, review, or improve security in Spring Boot applications — including SecurityFilterChain, OAuth2/JWT resource server patterns, form login basics, method security (@PreAuthorize), CSRF and CORS for APIs, session fixation, security headers, exception handling, password encoding, and sensitive-data-safe logging. This should trigger for requests such as Add Spring Boot security support; Review Spring Boot security configuration; Improve API authorization in Spring Boot; Add JWT resource server security in Spring Boot; Harden Spring Boot security headers and CSRF settings. Part of cursor-rules-java project"},"skills_sh_url":"https://skills.sh/jabrena/cursor-rules-java/304-frameworks-spring-boot-security"},"updatedAt":"2026-04-26T12:53:36.843Z"}}