Install any skill in seconds. Free to start, no credit card required.
Get Started Free →xu-xiang/springboot-security
Spring Boot 服务的身份验证/授权、校验、CSRF、机密管理、响应头、速率限制及依赖安全的 Spring Security 最佳实践。
Passed 20 of 23 test cases with the skill, and 18 of 23 without it.
and 1 more in the full report
3 fixed17 passed either way2 still failing1 broke
Tokens, turns and time describe resource use, not a dollar price.
One of 3 test cases the skill fixed. Same model, same prompt, with and without the skill.
我们系统即将上线一个新的文件上传功能和高频调用的公共接口。请帮我设计一套 Spring Boot 接口安全防护方案,针对文件接收和防刷限流提出具体措施,并提供配套的 Spring Security 配置示例。
| Checked | Without skill | With skill |
|---|---|---|
| Recommends Bucket4j for rate limiting high-cost endpoints. | Missed | Passed |
| Configures Content Security Policy with policy directive default-src 'self'. | Passed | Passed |
| Specifies storing uploaded files outside the Web root directory. | Passed | Passed |
The instructions your model reads when the skill loads.
在添加身份验证、处理输入、创建端点或处理敏感密钥时使用。
httpOnly、Secure、SameSite=Strict 的 CookieOncePerRequestFilter 或资源服务器中验证令牌@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);
}
}
@EnableMethodSecurity@PreAuthorize("hasRole('ADMIN')") 或 @PreAuthorize("@authz.canEdit(#id)")test cases passed, vs 18 / 23 without
Published skills whose descriptions closely match this one, with their headline benchmark lift.
More skills from the same source and nearby in the registry, with their headline benchmark lift.