CtrlK
BlogDocsLog inGet started
Tessl Logo

tessl-labs/fastapi-security-basics

Security defaults that belong in every FastAPI application from day one.

93

7.00x
Quality

90%

Does it follow best practices?

Impact

98%

7.00x

Average score across 5 eval scenarios

SecuritybySnyk

Passed

No known issues

Overview
Quality
Evals
Security
Files

task.mdevals/scenario-4/

E-commerce Order API

Problem/Feature Description

An online marketplace is building a FastAPI backend to handle product orders. Customers submit orders specifying the product, quantity, and preferred shipping speed (standard, express, or overnight). The team has had incidents where bad data reached the fulfillment system -- empty product names, impossible quantities, and shipping options that don't exist -- causing errors downstream.

The customer also provides their name and email address when placing an order.

Output Specification

Produce a single Python file named main.py that contains:

  • A FastAPI application
  • A request model for placing an order (must include: customer name, email, product name, quantity, and shipping speed)
  • A POST /orders route that accepts the order model and returns a confirmation

The file must be complete and importable Python. Stub return values are fine; no real database is needed.

evals

tile.json