CtrlK
BlogDocsLog inGet started
Tessl Logo

tessl-labs/springboot-security-basics

Security defaults that belong in every Spring Boot application from day one.

88

1.79x
Quality

83%

Does it follow best practices?

Impact

97%

1.79x

Average score across 5 eval scenarios

SecuritybySnyk

Passed

No known issues

Overview
Quality
Evals
Security
Files

task.mdevals/scenario-1/

Build a Blog Platform API with Spring Boot

Problem/Feature Description

A content team needs a REST API for their blogging platform. The API is built with Spring Boot and Java. A Next.js frontend hosted on a different domain will consume it. The API will run on Kubernetes behind an ingress controller.

The API needs the following endpoints:

  • GET /api/posts -- list all published posts (supports ?page=1&size=10 pagination)
  • GET /api/posts/{slug} -- get a single post by URL slug
  • POST /api/posts -- create a new blog post (accepts title, content, tags array, authorName)
  • PATCH /api/posts/{slug} -- update an existing post
  • DELETE /api/posts/{slug} -- delete a post
  • POST /api/posts/{slug}/comments -- add a comment (accepts authorName, body)
  • GET /api/posts/{slug}/comments -- list comments for a post

Use an in-memory data store. Posts should have id, title, slug, content, tags, authorName, comments, published, and createdAt fields. Generate slugs from titles.

Output Specification

Produce:

  • PostController.java -- REST controller with all blog post endpoints
  • Post.java -- Post model
  • CreatePostRequest.java -- Request DTO
  • SecurityConfig.java -- Security configuration
  • GlobalExceptionHandler.java -- Exception handling
  • pom.xml -- With all required dependencies

evals

scenario-1

criteria.json

task.md

tile.json