Repository navigation
feat: add evidence service CRUD endpoints - #17
Merged
Merged
Conversation
Adds POST /api/v1/evidence/ (create), GET /api/v1/evidence/ (list, org-scoped), GET /api/v1/evidence/{id} (get).
Evidence is job-scoped and tenant-scoped to the job's assessment's organization.
EvidenceCreate validates sha256 as a 64-character hex digest (trust-boundary validation).
Mirrors the findings CRUD pattern; adds EvidenceCreate/EvidenceOut schemas and registers the router in main.py.
Adds 6 tests; ruff, ruff format, mypy clean; 50/50 tests pass.
danishkumar26
added a commit
that referenced
this pull request
Nov 25, 2026
…report Update PROJECT_STATUS.md and ROADMAP.md (evidence service Supported), add reports/daily/2026-11-25.md.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds the Phase 3 evidence service: job-scoped evidence records with SHA-256 integrity.
POST /api/v1/evidence/— create evidence (job_id, sha256, storage_uri, size_bytes)GET /api/v1/evidence/— list evidence, org-scoped through job → assessment → projectGET /api/v1/evidence/{id}— get a single evidence recordEvidenceCreate/EvidenceOutschemas;sha256validated as a 64-char hex digestbackend/app/main.py(prefix/api/v1/evidence)Evidence is tenant-scoped to the evidence's job's assessment's organization, matching the findings CRUD pattern. The
evidencetable/model already existed (migration 0001); this adds the API layer.Test Plan
backend/tests/test_evidence.py: create/list/get, cross-org 403, nonexistent job 404, tenant-scoped listing, invalid sha256 rejected (422)ruff check,ruff format --check,mypy backend/appcleanCloses Phase 3 evidence-service follow-up (next task #2 in PROJECT_STATUS.md).