Skip to content
This repository was archived by the owner on Oct 7, 2024. It is now read-only.

Add Vault class - #222

Draft
danroc wants to merge 34 commits into
mainfrom
feat/vault-refactor
Draft

danroc wants to merge 34 commits into
mainfrom
feat/vault-refactor

Conversation

@danroc

@danroc danroc commented Apr 25, 2023

Copy link
Copy Markdown
Contributor

This PR adds a Vault class that will be used in the vault refactor.

The end goal of the refactor is to move the encryption logic out of the KeyringController into a separate class. This is the first step in this direction.

This PR doesn't modify the KeyringController, it will be done after the controller is migrated to the BaseControllerV2.

Closes #208

@danroc danroc added team-accounts This should be handled by the Accounts Team snap-keyring-epic labels Apr 25, 2023
@danroc
danroc requested a review from a team as a code owner April 25, 2023 21:13
@socket-security

socket-security Bot commented Apr 25, 2023 •

Copy link
Copy Markdown

New dependency changes detected. Learn more about Socket for GitHub ↗︎


👍 No new dependency issues detected in pull request

Bot Commands

To ignore an alert, reply with a comment starting with @SocketSecurity ignore followed by a space separated list of package-name@version specifiers. e.g. @SocketSecurity ignore foo@1.0.0 bar@* or ignore all packages with @SocketSecurity ignore-all

Pull request alert summary
Issue Status
Install scripts ✅ 0 issues
Native code ✅ 0 issues
Bin script shell injection ✅ 0 issues
Unresolved require ✅ 0 issues
Invalid package.json ✅ 0 issues
HTTP dependency ✅ 0 issues
Git dependency ✅ 0 issues
Potential typo squat ✅ 0 issues
Known Malware ✅ 0 issues
Telemetry ✅ 0 issues
Protestware/Troll package ✅ 0 issues

📊 Modified Dependency Overview:

➕ Added Package Capability Access +/- Transitive Count Publisher
@types/uuid@9.0.1 None +0 types
ajv-formats@2.1.1 None +6 esp
uuid@9.0.0 None +0 ctavan
ajv@8.12.0 eval +5 esp

- prepare
strategy:
matrix:
node-version: [14.x, 16.x, 18.x, 19.x]

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.

Does this break node14? In either case: Separate change.

Comment thread src/Vault.ts
Comment on lines +491 to +492
* If a state is given, the vault will be restored form it, otherwise, a new
* vault will be created.

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.

Suggested change
* If a state is given, the vault will be restored form it, otherwise, a new
* vault will be created.
* If a state is supplied, the originating vault will be restored.
* Otherwise, a new vault will be initialized.

This branch has not been deployed

No deployments
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

team-accounts This should be handled by the Accounts Team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Improve vault encryption

2 participants