docs: add security model describing trust boundaries and TCB#305
Merged
Conversation
Adds docs/security-model.md documenting the SDK's trust model, the Normal World vs. Secure World trust boundary, the obligations on TA boundary code (treat all parameters as attacker-controlled, copy-then- validate to avoid TOCTOU on shared memory), a trust-posture map of the repository, dependency/supply-chain considerations (a TA's full transitive crate tree runs inside the TEE and is part of the TCB), and guidance for both developers and automated security reviewers. Links the new doc from SECURITY.md and the docs index. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Contributor
Author
|
@DemesneGH @ivila I am planning to merge these docs changes tomorrow, please take a look if any correction needed when you are available. |
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.
What
Adds
docs/security-model.md, a document describing the SDK's security model. The repository previously had no SDK-level security/trust-model documentation — onlySECURITY.md(a vulnerability-reporting policy) and a per-demo "Security Assumptions" section ineth_wallet.Why
TrustZone development differs from ordinary application development: code is partitioned into an untrusted Normal World and a trusted Secure World, and the boundary between them is the central security property. A single document that maps this trust model onto the codebase helps both human developers and automated/LLM security reviewers reason correctly — in particular, to focus on the real trust boundary and avoid false positives on code where the concern does not apply.
Contents
docs/security-model.mdcovers:Value*vs. shared-memoryMemref*); and the invariants TA boundary code must enforce (validateparam_types, treat every memref byte as adversarial, bound lengths, copy-then-validate to avoid TOCTOU/double-fetch, don't leak via output buffers, fail closed).no-stdvsstdas a TCB-size decision; software crypto and entropy considerations; build-time supply-chain risk; and vetting recommendations.Also links the new doc from
SECURITY.mdand the docs index (docs/README.md).This is documentation only; no code or behavior changes.
🤖 Generated with Claude Code