Files
mercadodevida/work/artifacts/F-100/security.json
2026-08-21 13:28:14 +02:00

17 lines
1.1 KiB
JSON

{
"feature_id": "F-100",
"agent": "security",
"stage": "security_gate",
"verdict": "APPROVED",
"reviewed_at": "2026-08-21",
"summary": "No new attack surface. The title is normalised before being used as a SKU, and the schema gate is enforced on both read and write.",
"checks": [
{ "item": "SQL injection: the new listAllSkus uses a static SELECT; no user input goes into SQL string templates", "ok": true },
{ "item": "Output validation: SKU string pattern matches the gateway (^[A-Za-z0-9-]+$, 1..100); the admin input enforces the same regex on the client, and the existing zod schema enforces it on the server", "ok": true },
{ "item": "Authorization: /products/sku:generate requires admin; variants PATCH still requires admin", "ok": true },
{ "item": "Title content: ignored outside generateSkuFromTitle; the helper discards everything except alphanumerics", "ok": true },
{ "item": "Concurrency: uniqueness is enforced by the UNIQUE constraint on catalog_product_variants.sku; collisions are mapped to ProductVariantCodeAlreadyExistsError with code 409", "ok": true }
],
"issues": []
}