Repository navigation
Code-review fixes: grace cache hardening, live revocation freshness, docs/hygiene - #11
Merged
Merged
Conversation
… nits From a full end-to-end code review (three independent reviewers): Security / correctness: - grace cache: store the content key (not the per-license secret); authenticate cached_at/not_after in the AEAD AAD and enforce both plus the window. - cryptship-server re-reads --revoke-file every request (no mtime/size cache that could miss a same-length edit); warns once if it becomes unreadable; wipes the per-license secret after signing. - revocation grace timer refreshes only on a signed answer. - bind signing_key_id into the signed response/check inputs. - loader: drop the extract-marker file (recognise the dir by the manifest) to avoid an O_EXCL collision with payload contents. - cryptship: propagate crypto/rand errors when generating ids. Docs / hygiene: - add SECURITY.md, CONTRIBUTING.md, CHANGELOG.md; link from README. - README: go install targets cryptship + cryptship-server only; roadmap fixed. - HOWTO: fingerprint is Linux-only; document the cryptship_devfp dev hatch and the "-- <command>" default. - ARCHITECTURE: honest grace trade-off. Tests: grace timestamp-tamper rejection, same-length revoke-file swap.
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.
A full end-to-end review (three independent reviewers: security/protocol, correctness/robustness, usability/docs) found issues concentrated in the recently-added online/revocation code. This fixes the verified ones.
Security / correctness
cached_at/not_afterin the AEAD AAD, enforcing both and the window. Editing the on-disk timestamps now fails the open.cryptship-serverre-reads--revoke-fileon every request (the old mtime/size cache could miss a same-byte-length edit and keep honouring a just-revoked license). Warns once if the file becomes unreadable.signing_key_idis bound into the signed response/check inputs.O_EXCLcollision if a payload ships that filename.cryptshippropagatescrypto/randerrors when generating ids.Docs / hygiene
go installnow targetscryptship+cryptship-serveronly (not the loader); roadmap corrected (online grace is shipped).fingerprintis Linux-only; document thecryptship_devfp/CRYPTSHIP_FINGERPRINTdev hatch and the-- <command>default.Tests
New: grace timestamp-tamper rejection, same-length
--revoke-fileswap. Fullgo test -race ./..., vet, gofmt, mermaid, and all three demos (baseline/compiled/online) pass.Validated as sound (no change)
v2 KEK-context binding stops claim tampering + v2→v1 downgrade; online response verification is complete; tar extraction is hardened; check ordering is correct. Still roadmap (hardware/protocol): real SEV-SNP/TDX verifier + attested replay fix, memfd extraction.