feat: Phase 3 - CRUD core for Techniques, Tests and Evidence (T-014 to T-017)

- Add Pydantic schemas for Technique, Test and Evidence
- Add CRUD endpoints for Techniques (list with filters, detail, create, update, review)
- Add CRUD endpoints for Tests (create, detail, update, validate, reject)
- Add evidence upload with SHA-256 integrity and presigned download URLs
- Add MinIO/S3 storage client with bucket auto-creation on startup
- Add status_service to recalculate technique coverage from test results
- Add require_any_role RBAC dependency for multi-role authorization
- Update README with API endpoints reference and project structure
This commit is contained in:
2026-02-06 13:52:27 +01:00
parent 508f0723af
commit 4f6dd838fd
12 changed files with 958 additions and 5 deletions

View File

@@ -0,0 +1,23 @@
"""Pydantic schemas for Evidence endpoints."""
import uuid
from datetime import datetime
from pydantic import BaseModel, ConfigDict
class EvidenceOut(BaseModel):
"""Representation of an evidence record returned by the API.
``download_url`` is a presigned URL generated at response time.
"""
id: uuid.UUID
test_id: uuid.UUID
file_name: str
sha256_hash: str
uploaded_by: uuid.UUID | None = None
uploaded_at: datetime | None = None
download_url: str | None = None
model_config = ConfigDict(from_attributes=True)