Rules
no-unsafe-iframe-sandbox
Full Name in eslint-plugin-react-dom
Full Name in @eslint-react/eslint-plugin
Features
🔍
Presets
dom
recommended
recommended-typescript
recommended-type-checked
What it does
Enforces sandbox
attribute for iframe
elements is not set to unsafe combinations.
If sandbox
attribute is not set, the iframe content can have abilities that are not intended to be allowed.
Examples
This rule reports cases where attribute contains allow-scripts
and allow-same-origin
at the same time as this combination allows the embedded document to remove the sandbox attribute and bypass the restrictions.
Failing
Passing
Implementation
Further Reading
See Also
no-missing-iframe-sandbox
Enforces explicitsandbox
attribute foriframe
elements.no-unsafe-target-blank
Prevents the use oftarget="_blank"
withoutrel="noreferrer noopener"
.