Add second part of a solution for secure JSON validation#1405
Merged
Add second part of a solution for secure JSON validation#1405
Conversation
Codecov Report
@@ Coverage Diff @@
## main #1405 +/- ##
=======================================
Coverage 96.34% 96.35%
=======================================
Files 151 151
Lines 4598 4606 +8
Branches 747 747
=======================================
+ Hits 4430 4438 +8
Misses 168 168
|
david0xd
commented
May 18, 2023
ritave
reviewed
May 18, 2023
packages/snaps-execution-environments/src/common/BaseSnapExecutor.ts
Outdated
Show resolved
Hide resolved
naugtur
reviewed
May 18, 2023
packages/snaps-execution-environments/src/common/validation.test.ts
Outdated
Show resolved
Hide resolved
031ac0c to
aadffc0
Compare
hmalik88
reviewed
May 18, 2023
packages/snaps-execution-environments/src/common/BaseSnapExecutor.ts
Outdated
Show resolved
Hide resolved
Mrtenz
reviewed
May 18, 2023
92a2633 to
8cb6fcb
Compare
|
No dependency changes detected. Learn more about Socket for GitHub ↗︎ 👍 No dependency changes detected in pull request Pull request alert summary
|
47b7300 to
b3b1530
Compare
Mrtenz
reviewed
May 31, 2023
packages/snaps-execution-environments/src/common/BaseSnapExecutor.ts
Outdated
Show resolved
Hide resolved
FrederikBolding
approved these changes
May 31, 2023
Mrtenz
approved these changes
May 31, 2023
FrederikBolding
pushed a commit
that referenced
this pull request
May 31, 2023
* Add second part of a solution for secure JSON validation * Add sanitization on few more places * Review refactoring (1) * Refactor solution (2) * Update function name * Update types related to getSafeJson * Review request refactoring * Update coverage thresholds * Review requests addressed for errors combined * Fix coverage * Replace part of an error
FrederikBolding
pushed a commit
that referenced
this pull request
May 31, 2023
* Add second part of a solution for secure JSON validation * Add sanitization on few more places * Review refactoring (1) * Refactor solution (2) * Update function name * Update types related to getSafeJson * Review request refactoring * Update coverage thresholds * Review requests addressed for errors combined * Fix coverage * Replace part of an error
Gudahtt
pushed a commit
that referenced
this pull request
May 31, 2023
* Add second part of a solution for secure JSON validation * Add sanitization on few more places * Review refactoring (1) * Refactor solution (2) * Update function name * Update types related to getSafeJson * Review request refactoring * Update coverage thresholds * Review requests addressed for errors combined * Fix coverage * Replace part of an error
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.
Fixes: https://github.com/MetaMask/MetaMask-planning/issues/574
This PR is the second part of the solution for fixing JSON Validation security issue which Superstruct does not handle internally.
First PR required for this is in
utilspackage: MetaMask/utils#103This PR will add sanitization process for JSON structures. New function
getSafeJsonadded toutilsis now used in this PR.