Repository navigation
feat(encryption): always encrypt uploads; ignore --no-encrypt and DCD_ENCRYPT=0 - #363
Merged
Merged
Conversation
…_ENCRYPT=0 The app binary, flow zip and env vars are now always encrypted before upload. There is no client-side opt-out any more: - --no-encrypt and DCD_ENCRYPT=0 (and the legacy DCD_ENCRYPT_BINARIES=0) are ignored with a one-line warning, so scripts that pass them still run. - --encrypt is kept as a no-op. - The MCP tool dcd_run_cloud_test no longer takes an `encrypt` input, and DCD_ENCRYPT is gone from server.json. - The CLI no longer reads encryption.defaultOn from the compatibility data. An API that publishes no KEK public key still gets plaintext uploads with a notice, so the server keeps one way to turn encryption off. An API that cannot be asked for its KEK fails the upload, as before. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
Code reviewNo issues found. Checked for bugs and CLAUDE.md compliance. |
Merged
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
Client-side envelope encryption is no longer optional. The app binary, flow zip and env vars are always encrypted on the user's machine before upload.
--no-encrypt,DCD_ENCRYPT=0and the legacyDCD_ENCRYPT_BINARIES=0are ignored with a warning, not refused. Scripts and CI configs that still pass them keep working:--encryptstays as a no-op, for the same reason. Its--helptext now says it is no longer needed.dcd_run_cloud_testno longer takes anencryptinput.DCD_ENCRYPTis removed fromserver.json.encryption.defaultOnfrom the compatibility data.dcd uploadand thedcd deviceapp and flow uploads no longer fetch that data at all.What still turns it off
Only the API. If the API publishes no KEK public key on
GET /cli-config, uploads go up in plaintext with a notice, as before.DCD_BINARY_KEK_PUBLICstill overrides that.An API that cannot be asked for its KEK still fails the upload, rather than falling back to plaintext. This now applies to
dcd uploadanddcd deviceas well. Before, a failed compatibility fetch there meant "encryption off".Telemetry
The
encrypt.sourcefield on command events is nowalways,no_kek(encryption skipped because the API publishes no KEK) oroff(the command never reached an upload). The old valuesflag,envandserverare gone.Tests
pnpm lint,pnpm typecheck,pnpm buildclean.pnpm test:unit: 741 passing. The encryption-decision,dcd uploadand help tests are rewritten for the new rules. Tests that upload a flow bundle now stub/cli-config, since every upload asks for the KEK.🤖 Generated with Claude Code