Skip to content

[Feature Request] Trusted Types support #1832

@tosmolka

Description

@tosmolka

Trusted Types support

RequireJS should support Trusted Types API so that it can be seamlessly integrated into applications that enforce Trusted Types for all DOM XSS Injection Sinks (e.g. assignments to HTMLScriptElement.src attribute) via CSP directive require-trusted-types-for. Trusted Types APIs are now fully supported in browsers with Blink engine (Chrome, Edge and others).

To support Trusted Types we should identify all instances where RequireJS calls such methods and propose re-factoring. We need to be careful to keep supporting browsers without Trusted Types support. This is usually done by testing whether window.trustedTypes is defined and fall-back to current behavior if it's not.

We know so far about these locations:

References

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions