Springboot Security
Spring Boot 服务的身份验证/授权、校验、CSRF、机密管理、响应头、速率限制及依赖安全的 Spring Security 最佳实践。
Install
/plugin marketplace add xu-xiang/everything-claude-code-zhThe repo is a Claude Code plugin marketplace. Run /plugin afterwards to pick the plugin that includes this skill.
npx skills add xu-xiang/everything-claude-code-zh --skill springboot-securitygit clone --depth 1 https://github.com/xu-xiang/everything-claude-code-zh.git /tmp/everything-claude-code-zh
mkdir -p ~/.claude/skills
cp -r /tmp/everything-claude-code-zh/skills/springboot-security ~/.claude/skills/springboot-securityPersonal skills live in ~/.claude/skills. Use .claude/skills in a project folder to share a skill with your team.
From the SKILL.md
# Spring Boot 安全审查(Security Review)
在添加身份验证(Auth)、处理输入、创建端点或处理机密信息时使用。
## 何时激活(When to Activate)
- 添加身份验证(JWT、OAuth2、基于 Session 的认证)
- 实现授权(`@PreAuthorize`、基于角色的访问控制)
- 校验用户输入(Bean Validation、自定义校验器)
- 配置 CORS、CSRF 或安全响应头
- 管理机密信息(Vault、环境变量)
- 添加速率限制(Rate Limiting)或暴力破解防护
- 扫描依赖项的 CVE 漏洞
## 身份验证(Authentication)
- 优先使用无状态 JWT 或带撤回列表的模糊令牌(Opaque Tokens)
- 为 Session 使用 `httpOnly`、`Secure`、`SameSite=Strict` 属性的 Cookie
- 使用 `OncePerRequestFilter` 或资源服务器校验令牌
```java
@Component
public class JwtAuthFilter extends OncePerRequestFilter {
private final JwtService jwtService;
public JwtAuthFilter(JwtService jwtService) {
this.jwtService = jwtService;
}
@Override
protected void doFilterInternal(HttpServletRequest request, HttpServletResponse response,
FilterChain chain) throws ServletException, IOException {
String header = request.getHeader(HttpHeaders.AUTHORIZATION);
if (header != null && header.startsWith("Bearer ")) {
String token = header.substring(7);
Authentication auth = jwtService.authenticate(token);
SecurityContextHolder.getContext().setAuthentication(auth);
}
chain.doFilter(request, response);
}
}
```
## 授权(Authorization)
- 启用方法安全:`@EnableMethodSecurity`
- 使用 `@PreAuthorize("hasRole('ADMIN')")` 或 `@PreAuthorize("@authz.canEdit(#id)")`
- 默认拒绝访问(Deny by default);仅公开所需的权限范围(Scopes)Details
- Skill name
springboot-security- Repository
- xu-xiang/everything-claude-code-zh
- Path
skills/springboot-security/SKILL.md- License
- MIT
- Repo updated
- 5 March 2026
FAQ
What does the Springboot Security skill do?
Spring Boot 服务的身份验证/授权、校验、CSRF、机密管理、响应头、速率限制及依赖安全的 Spring Security 最佳实践。
How do I install the Springboot Security skill?
Claude Code plugin: /plugin marketplace add xu-xiang/everything-claude-code-zh. Skills go in ~/.claude/skills (personal) or .claude/skills (project), and Claude loads them automatically when a task matches the description.
Is Springboot Security popular?
It lives in xu-xiang/everything-claude-code-zh, which has 2,037 GitHub stars and 332 forks.
Related skills
Backend Patterns
2kxu-xiang/everything-claude-code-zh
Backend architecture patterns, API design, database optimization, and server-side best practices for Node.js, Express, and Next.js API routes.
Coding Standards
2kxu-xiang/everything-claude-code-zh
Universal coding standards, best practices, and patterns for TypeScript, JavaScript, React, and Node.js development.
Frontend Patterns
2kxu-xiang/everything-claude-code-zh
Frontend development patterns for React, Next.js, state management, performance optimization, and UI best practices.
Dependency Management Deps Audit
2krmyndharis/antigravity-skills
Audit project dependencies for known vulnerabilities, licensing issues, outdated packages, and supply chain risk, and provide actionable remediation strategies. Use when reviewing or hardening the dependencies of a project.
Springboot Security
2kxu-xiang/everything-claude-code-zh
Java Spring Boot 服务中认证/授权、验证、CSRF、密钥、标头、速率限制和依赖安全性的 Spring Security 最佳实践。
Frontend Security Coder
2krmyndharis/antigravity-skills
Expert in secure frontend coding practices specializing in XSS prevention, output sanitization, and client-side security patterns. Use for frontend security implementations or client-side security code reviews.
Browse the most popular Claude skills, all security skills, or write your own with the skills generator.