Skip to content

Security: Remove Cloak and update Bandit - #337

Open
srzeszut wants to merge 4 commits into
mainfrom
voy-373-consider-removing-cloak-dep
Open

srzeszut wants to merge 4 commits into
mainfrom
voy-373-consider-removing-cloak-dep

Conversation

@srzeszut

Copy link
Copy Markdown
Collaborator

No description provided.

@srzeszut
srzeszut requested a balanced review from Copilot October 30, 2026 10:56
@srzeszut

Copy link
Copy Markdown
Collaborator Author

@claude review

@github-actions

github-actions Bot commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

Claude finished @srzeszut's task in 50s —— View job


🦀 Review

No findings at or above 60% confidence.

<verdict: 0 blocking, 0 should-fix, 0 nit>

@srzeszut srzeszut changed the title Security: Remove cloak dep Security: Remove Cloak and update Bandit Oct 30, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The decryption replacement lacks regression coverage verifying that load/1 rejects tampered IVs, authentication tags, and ciphertext, as well as truncated data and invalid headers.

1 open issue
What changed in this PR

Replaces Cloak-based credential encryption with a native :crypto Ecto type while preserving compatibility with existing encrypted values.

Changes:

  • Implements AES-256-GCM encryption and decryption directly in Voyager.Encrypted.Binary.
  • Removes Cloak dependencies and the supervised vault, configuring the encryption key directly.
  • Adds a compatibility test for ciphertext previously written by Cloak.
File Description
test/​voyager/​encrypted/​binary_test.exs Adds a Cloak ciphertext compatibility test.
mix.lock Removes Cloak dependency locks.
mix.exs Removes cloak and cloak_ecto dependencies.
lib/​voyager/​vault.ex Deletes the Cloak vault module.
lib/​voyager/​vault_key.ex Updates documentation to name the new key consumer.
lib/​voyager/​encrypted/​binary.ex Implements encryption and decryption using :crypto.
lib/​voyager/​application.ex Removes the vault from supervision.
config/​test.exs Configures the test encryption key directly.
config/​runtime.exs Sets the resolved runtime encryption key directly.
config/​e2e.exs Configures the end-to-end test encryption key directly.

Review effort: Balanced

Comment thread lib/voyager/encrypted/binary.ex Resolved
@srzeszut
srzeszut marked this pull request as ready for review October 30, 2026 11:06
@srzeszut
srzeszut requested review from GuzekAlan and hhubert6 and removed request for hhubert6 October 30, 2026 11:09

@GuzekAlan GuzekAlan left a comment •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After installing it, deleting valut.key Voyager app doesn't open. Please investigate it

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.

3 participants