-
Notifications
You must be signed in to change notification settings - Fork 564
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add harden events utilities #1221
Conversation
dd92974
to
83a8171
Compare
b9ded0e
to
8dae818
Compare
59b39bf
to
816847d
Compare
packages/snaps-controllers/src/services/iframe/IframeExecutionService.test.browser.ts
Outdated
Show resolved
Hide resolved
packages/snaps-controllers/src/services/iframe/IframeExecutionService.test.browser.ts
Outdated
Show resolved
Hide resolved
packages/snaps-controllers/src/services/iframe/test/event-test.js
Outdated
Show resolved
Hide resolved
packages/snaps-controllers/src/services/iframe/test/events.html
Outdated
Show resolved
Hide resolved
packages/snaps-execution-environments/src/common/lockdown/lockdown-events.ts
Outdated
Show resolved
Hide resolved
packages/snaps-execution-environments/src/common/lockdown/lockdown-events.ts
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
important comments
Codecov Report
@@ Coverage Diff @@
## main #1221 +/- ##
==========================================
+ Coverage 95.30% 95.62% +0.32%
==========================================
Files 141 140 -1
Lines 4383 4388 +5
Branches 718 725 +7
==========================================
+ Hits 4177 4196 +19
+ Misses 206 192 -14
... and 2 files with indirect coverage changes Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
c413012
to
f4458df
Compare
packages/snaps-execution-environments/src/common/lockdown/lockdown-events.ts
Outdated
Show resolved
Hide resolved
packages/snaps-controllers/src/services/iframe/IframeExecutionService.test.browser.ts
Show resolved
Hide resolved
packages/snaps-controllers/src/services/iframe/IframeExecutionService.test.browser.ts
Show resolved
Hide resolved
packages/snaps-execution-environments/src/common/lockdown/lockdown-events.test.browser.ts
Outdated
Show resolved
Hide resolved
2ff7c81
to
0a4b5d2
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The lockdown events code should be a separate file that we can include in the index.html before the main bundle.
packages/snaps-execution-environments/src/node-process/index.ts
Outdated
Show resolved
Hide resolved
Change lockdown execution order WIP: Experimental testing (for debugging purposes only) Update with version of code that will work after updating post-message-stream Add review refactoring (1) Add review refactoring (2) Add review refactoring (3) Update post-message-stream version and add test to improve coverage Fix coverage after rebase Try to fix coverage Refactor lockdown-events.ts Fix yarn conflicts after rebase Refactor test for events lockdown function Add lockdown events in other environments Revert "Add lockdown events in other environments" This reverts commit 4e89e4e. Add new proposal for implementing lockdown of events Fix coverage issues
e25a8be
to
8f54c08
Compare
Fixes: #1132
This PR will add utility functions with procedures for hardening Event related objects.
New lockdown procedure file is added exclusively for events
lockdown-events.ts
exporting functionexecuteLockdownEvents
that is called inpackages/snaps-execution-environments/src/iframe/index.ts
before other lockdown functions to ensure that this one will be executed before SES disallows further changes.Currently blocked by (depends on): MetaMask/post-message-stream#79