-
Notifications
You must be signed in to change notification settings - Fork 0
feat(interop): pin untrusted-decode bounds as a cross-SDK invariant (LAB-2503) #59
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
bb8feb8
feat(interop): pin untrusted-decode bounds as a cross-SDK invariant (…
27Bslash6 a4bda44
docs(interop): apply LAB-2503 panel findings to decode-bounds spec an…
27Bslash6 277db51
fix(tools): address Kody review on decode-bounds-reference (LAB-2503)
2d56cce
fix(interop): address CodeRabbit review on decode-bounds (LAB-2503)
b75adac
fix(interop): address Kody round 2 on decode-bounds (LAB-2503)
27Bslash6 df24789
docs(matrix): refresh decode-bounds CI status for py/rs/ts; noqa TRY0…
2f88674
Merge branch 'main' into lab-2503-decode-bounds
7fd08cb
Merge remote-tracking branch 'origin/main' into agent/winston/b8b3693…
27Bslash6 6ff9141
Merge remote-tracking branch 'origin/main' into agent/winston/9bdeafc…
27Bslash6 98deb5a
Merge origin/main into lab-2503-decode-bounds (LAB-2503)
27Bslash6 173b214
Merge origin/main into lab-2503-decode-bounds (LAB-2503)
27Bslash6 83090b3
Merge origin/main into lab-2503-decode-bounds (LAB-2503)
27Bslash6 3695aa4
fix(interop): whole-document slot rule, three discriminating vectors,…
27Bslash6 6fb7d20
fix(interop): guard-level conformance MUST, map-depth and ext vectors…
27Bslash6 420f5ba
fix(interop): the guard-level MUST covers every read-path decode entr…
27Bslash6 0ea6c5b
docs(interop): conformance MUST names every untrusted entry point and…
27Bslash6 5164272
Merge origin/main into lab-2503-decode-bounds (LAB-2503)
27Bslash6 2c2b66d
Merge remote-tracking branch 'origin/main' into agent/winston/a57302d…
27Bslash6 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| ### Interop mode — untrusted-decode bounds pinned as a cross-SDK invariant (LAB-2503) | ||
|
|
||
| - New [`spec/interop-mode.md` → Decode bounds](spec/interop-mode.md#decode-bounds): | ||
| readers MUST bound nesting depth (≥ 32, ≤ 1024), MUST NOT pre-allocate beyond | ||
| what the input can back (Σ declared slots ≤ input bytes − 1), and MUST fail | ||
| closed with a catchable error. Follow-up to the LAB-2487 measurements. | ||
| - New [`test-vectors/decode-bounds.json`](test-vectors/decode-bounds.json) `1.1.0` | ||
| (17 reject + 3 accept) with [`tools/decode-bounds-reference.py`](tools/decode-bounds-reference.py), | ||
| which derives every vector's depth and slot tags with a structural walk, and its | ||
| mutation suite. The SDKs vendor earlier revisions; see the matrix's footnote 16. | ||
| - An SDK's conformance test MUST assert that its structural guard rejects each | ||
| reject vector at every untrusted decode entry point (including invalidation | ||
| events), before materialising it; a size cap that rejects first also counts. A | ||
| verdict alone does not show when a reader rejected, and a direct guard call alone | ||
| does not show that the read path runs the guard. | ||
| - [`spec/wire-format.md` → Security Limits](spec/wire-format.md#security-limits) | ||
| states the whole-document slot rule (per-header checks do not satisfy it; ext | ||
| lengths count) for the envelope bytes and the payload inside them, and the | ||
| Verification Flow pre-scans before it decodes. | ||
| - Matrix: ByteStorage is ⚠️ in all three SDKs, because each decodes the envelope with | ||
| `cachekit-core`'s `ByteStorage::retrieve`, which has no step-2 pre-scan. The | ||
| decode-bounds test cells for Python and Rust are ⚠️ until their tests assert the | ||
| guard's rejection, and TypeScript's until its envelope entry point has a guard to | ||
| assert. | ||
| - Open: the shared depth value, and any cap on the ~70× materialisation of *legal* | ||
| payloads, stay [protocol#20](https://github.com/cachekit-io/protocol/issues/20)'s | ||
| items. |
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.