docs: end-to-end photo data-flow threat model (#20) #71
Closed
rockachopa
wants to merge 0 commits from
timmy/20-photo-dataflow-threat-model into main
pull from: timmy/20-photo-dataflow-threat-model
merge into: stackchain:main
stackchain:main
stackchain:timmy/19-metrics-operator-report
stackchain:timmy/16-image-ingress-hardening
stackchain:timmy/40-security-rc-evidence
stackchain:timmy/27-dataset-card
stackchain:timmy/26-review-adjudication
stackchain:timmy/32-abstention-policy
stackchain:timmy/29-evaluation-harness
stackchain:timmy/35-portable-backup-versions
stackchain:timmy/24-training-contribution-consent
stackchain:fix/demo-caption-pixels
stackchain:timmy/36-photo-lifecycle-controls
stackchain:timmy/release-notes-grounded-chat
stackchain:timmy/37-grounded-chat-citations
stackchain:timmy/21-escalation-regression
stackchain:timmy/34-explainable-pattern-summaries
stackchain:timmy/15-container-worker-receipts
stackchain:timmy/73-blank-first-ordering
stackchain:timmy/18-vision-corpus
stackchain:timmy/67-hard-stool-followup
stackchain:timmy/13-provisional-suggestion-state
stackchain:timmy/12-manual-fallback-draft-recovery
stackchain:timmy/11-mobile-capture-recovery
stackchain:free/hy3-timmy-16
stackchain:timmy/35-version-ledger-migrations
stackchain:timmy/41-release-observability-dashboard
stackchain:free/step-timmy-14
stackchain:timmy/21-escalation-regression-suite
stackchain:timmy/17-bounded-inference-queue
stackchain:timmy/58-strict-csp-runtime-config
stackchain:timmy/55-staging-deployment-tooling
stackchain:timmy/53-private-subpage-staging
stackchain:timmy/10-reproducible-smolvlm-bootstrap
stackchain:timmy/48-vomiting-phrase-hotfix
stackchain:timmy/48-server-safety-override
stackchain:timmy/47-sleek-hermes-agent
stackchain:timmy/9-product-boundary-decisions
stackchain:timmy/8-ci-gates
No Reviewers
Labels
Clear labels
area/backend
area/data
area/frontend
area/model
area/privacy
area/release
area/safety
blocked
human-gate
priority/P0
priority/P1
priority/P2
state:review
type/docs
type/epic
type/feature
type/ops
type/research
type/security
type/test
Application API and storage
Dataset and provenance
PWA and interaction design
Vision model and inference
Privacy and consent
Release engineering and distribution
Clinical safety boundary
Blocked on an explicit dependency or decision
Requires explicit human approval
Release-critical
High priority
Planned
Documentation and evidence
Roadmap epic
Product feature
Infrastructure and operations
Research or evaluation
Security hardening
Verification and quality gate
No labels
Milestone
No items
No Milestone
Projects
Clear projects
No projects
No Assignees
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: stackchain/timmy-talking-turd#71
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Closes #20
What
Adds the end-to-end photo data-flow threat model required before beta, as an enforced document rather than a one-off writeup.
docs/PHOTO-DATAFLOW-THREAT-MODEL.md— mermaid data-flow diagram covering the browser, API ingress, model worker, transient buffers, training opt-in store, sanitized logs, exports, and deletion; six trust boundaries; component-by-component data lifetimes (including "a photo awaiting consent is never written to disk"); and a numbered threat register — T1 replay, T2 oversized input, T3 metadata leakage, T4 dataset poisoning, T5 unauthorized training, T6 operator access — where each entry carries a mitigation, an owner, a tracked follow-up ticket, and the artifact that will count as evidence.tests/threat-model.test.js— enforces all of the above: diagram coverage of every byte-bearing component, owner + follow-up presence per abuse case with the follow-up number validated against ROADMAP ticket numbers, and the non-diagnostic / synthetic-fixtures boundary.package.json— registers the test innpm test, so it also runs in the CI quality gate and inscripts/build_release.py.docs/PRODUCT-DECISIONS.md— links the model from the accepted decision record so reviewers and the clinical/privacy gate can find it.TDD evidence
tests/threat-model.test.jsfirst and watched it fail — 3 ×ENOENT: no such file or directory ... docs/PHOTO-DATAFLOW-THREAT-MODEL.md, plus 1 ×AssertionError: the governing decision record must point reviewers at the threat model. Not typos.- **Owner:**line from T3 →not ok 2 ... 'metadata leakage needs a named owner'; restored → green. The content assertions bite, not just the file's existence.npm test108/108 (104 before, 4 new).npm audit --audit-level=high→ 0 vulnerabilities.npm run check:syntax,npm run check:diff, andpython3 tests/staging-deploy.test.py(20 tests) all pass.Demo path
No user-visible feature changed, so
scripts/record_release_demo.mjsand its visual acceptance assertions intests/release-demo.test.jsare deliberately untouched — this render path is docs + test only. The nearest honest user-visible effect is the consent, export, and deletion surface the model describes; no demo caption, tap, or UI state was invented for it.Boundary
The non-diagnostic boundary is unchanged and restated in the model, not relaxed. No real medical images, no model weights, no publicly exposed inference, no infrastructure purchases, no production service changes. Every abuse case that is not yet fully mitigated appears under Accepted residual risks with an owner and a bounded claim (host compromise, model accuracy, hosted provider profiles) rather than a claim of elimination.
Follow-ups referenced (not merged here)
#16, #17, #24, #25, #29, #32, #39, #41 — this PR only names them as the tickets that will prove each mitigation.
Pull request closed