feat(ses): expect more properties to censor #2070
Merged
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.
closes: #XXXX
refs: Moddable-OpenSource/moddable#523 (comment)
Description
Initializing SES on XS reports additional non-standard properties to remove, beyond those previously mentioned by Moddable-OpenSource/moddable#523 . Initializing SES on QuickJS reveals a different set of additional non-standard properties to remove. Without this PR, all these extra properties are still safely removed, but with a console warning because they were unexpected. This PR simply adds a
propertyName: false
for each of these topermits.js
to record that we now expect them and do not need the warning.Security Considerations
The purpose of the warning is so that we, the SES developers, are alerted to surprising additions to the platform in case they raise the possibility of a dangerous change in semantics of the parts not removed. From the names of the additional XS properties, we can guess at their purpose and semantics well enough that they don't raise such alarms about the unremoved parts of the platform.
For the QuickJS properties, a few are more mysterious, in particular
__getClass
andoperatorSet
. However, we have not yet qualified the base QuickJS engine as being SES safe. These additional properties are not temporally new for us compared to a QuickJS baseline we've already understood without them. They are in the first version of QuickJS we've seriously examined. Nevertheless, they may indicate some novel semantics that we should worry about. This PR, by listed them as expected and suppressing the warning, also risks allowing us to become complacent rather than worrying.Attn @raphdev @LuqiPan @ivanlei
Scaling Considerations
none
Documentation Considerations
XS or QuickJS users may expect some of these properties. Indeed, once we understand what they do, we might judge them to be safe and eventually enable them in permits.js. But as of this PR we wish to continue removing all of them. Just silently. XS or QuickJS users should be able to find out about this surprise, and an explanation, from some of our documentation.
Testing Considerations
none
Compatibility Considerations
none
Upgrade Considerations
none
*BREAKING*:
in the commit message with migration instructions for any breaking change.NEWS.md
for user-facing changes.