Skip to content

fix(security): protect owned encryption secrets - #214

Merged
polaz merged 2 commits into
mainfrom
fix/#213-secret-hardening
Oct 11, 2026
Merged

polaz merged 2 commits into
mainfrom
fix/#213-secret-hardening

Conversation

@polaz

@polaz polaz commented Oct 11, 2026

Copy link
Copy Markdown
Member

Summary

  • Zeroize owned recipient KEKs and decryption-resolver keys on drop, including independent clones; leave borrowed caller material unchanged without creating a copy.
  • Compare recovered key bytes and recovery validity using constant-time primitives; retain handle identity for non-exportable keys.
  • Add secret-ownership regressions and a real cryptographic signature-wrapping test across compiled XML backends.
  • Document security invariants, their regression coverage, and caller ownership responsibilities.

Validation

  • All-feature workspace suite with isolated SoftHSM and pinned libxmlsec1 oracle: 4,398 passed, zero skipped.
  • Workspace all-feature build, all-target Clippy with warnings denied, formatting, and doctests passed.
  • Host and bare-metal alloc-only checks passed.
  • Dedicated roxmltree-only and xmloxide-only public suites: 20 passed each; C14N-only all-target check passed.
  • Capability and behavior ledger checks passed.

Closes #213

polaz added 2 commits October 11, 2026 17:33
Wipe owned recipient and resolver keys without copying borrowed material. Compare recovered candidates in constant time and test signature wrapping across XML backends. Document hardening invariants and their regression coverage.
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 11, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-11T14:40:47.924572Z ff0bf08 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@coderabbitai

coderabbitai Bot commented Oct 11, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 38 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

⚙️ Run configuration
  • Configuration used: Repository: structured-world/xml-sec/.coderabbit.yaml
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 13be67e0-76d2-48da-9d32-af08ca248f35

📥 Commits

Reviewing files that changed from the base of the PR and between be757dc and ff0bf08.


📒 Files selected for processing (6)
  • docs/security-invariants.md
  • src/provider.rs
  • src/xmlenc/decrypt.rs
  • src/xmlenc/types.rs
  • tests/secret_ownership.rs
  • tests/verification_evidence.rs

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@polaz
polaz enabled auto-merge (squash) October 11, 2026 14:42
@polaz
polaz merged commit bf3eac2 into main Oct 11, 2026
43 checks passed
@polaz
polaz deleted the fix/#213-secret-hardening branch October 11, 2026 14:46
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.

Protect owned encryption secrets and key comparisons

1 participant