feat(F-100): completed feature

This commit is contained in:
chattie
2026-08-21 13:28:14 +02:00
parent 7418624df1
commit da919d705f
16 changed files with 413 additions and 49 deletions

View File

@@ -0,0 +1,16 @@
{
"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": []
}