Skip to content

[codex] Bound proof file reads#191

Merged
ryan-wong-coder merged 1 commit into
mainfrom
codex/bound-proof-file-reads
Jul 15, 2026
Merged

[codex] Bound proof file reads#191
ryan-wong-coder merged 1 commit into
mainfrom
codex/bound-proof-file-reads

Conversation

@ryan-wong-coder

Copy link
Copy Markdown
Collaborator

Summary

  • Decode .sproof files through the bounded CBOR reader instead of reading the whole file into memory first.
  • Add bounded reads for desktop local proof, global proof, anchor, and single-proof inputs before CBOR type detection.
  • Add oversized-input regression coverage for core .sproof and desktop proof-bundle reads.

Root cause

Proof-file readers applied CBOR size limits only after os.ReadFile loaded the entire selected file. A very large local file could therefore consume memory before the existing decode limits had a chance to reject it.

Validation

  • go test ./internal/sproof ./clients/desktop
  • go test ./...
  • go vet ./...

@ryan-wong-coder
ryan-wong-coder merged commit c4dffb3 into main Jul 15, 2026
9 checks passed
@ryan-wong-coder
ryan-wong-coder deleted the codex/bound-proof-file-reads branch July 15, 2026 15:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant