Integrate LavaDome private key protection#22381
Conversation
|
New dependencies detected. Learn more about Socket for GitHub ↗︎
|
|
👍 Dependency issues cleared. Learn more about Socket for GitHub ↗︎ This PR previously contained dependency changes with security issues that have been resolved, removed, or ignored. |
…tamask-extension into weizman/try-lavadome
…tamask-extension into weizman/try-lavadome
|
Once LavaMoat/LavaDome#18 is merged and published, eab7582 should work too |
Builds ready [65c6f87]
Page Load Metrics (852 ± 46 ms)
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
44a2bc7 to
2cc62b4
Compare
danjm
left a comment
There was a problem hiding this comment.
The code changes look good to me. I will approve when we get another QA pass
|
actually, I will QA this myself |
These tests continue to pass, and I can also see the implemented message upon clicking the private key |
Builds ready [1394bad]
Page Load Metrics (798 ± 55 ms)
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
georgewrmarshall
left a comment
There was a problem hiding this comment.
LGTM! Tested and it works well. Nice use of component-library components. Left 2 non-blocking comments
| style={{ wordBreak: 'break-word' }} | ||
| > | ||
| {privateKey} | ||
| <span onClick={() => setShowDisableSelectWarn(true)}> |
There was a problem hiding this comment.
nit: could we reduce html bloat and increase the click area of the text slightly by moving the onClick to the wrapping Text component?
| onClick={() => handlePrivateKeyCopy(privateKey)} | ||
| onClick={() => | ||
| setShowDisableSelectWarn(false) || handlePrivateKeyCopy(privateKey) | ||
| } |
There was a problem hiding this comment.
non-blocking: To improve the accessibility here we could add an ariaLabel={t('copyPrivateKey')} which would need to be created in messages.json. ariaLabel is a a required prop for the ButtonIcon component

Description
New LavaDome tool can help to better hide the private key from potential malicious code running in the app when the user asks to see it.
Related issues
None
Manual testing steps
This PR changes the "show private key" dialog, not in terms of appearance, and not in terms of interaction but only in terms of "behind the scenes" security, so nothing should change in terms of manual interaction with this feature - that is the most important thing to check here QA-wise.
One thing that is changed, is that the private key text is no longer selectable as it was before, and now the only way to copy it is to use the copy-to-clipboard button.
That is on purpose, allowing selection of sensitive information such as the private key is unsafe, and disablement of selection capabilities of sensitive info is done intentionally to enhance security.
Screenshots/Recordings
Before
After
Pre-merge author checklist
Pre-merge reviewer checklist