Skip to content

Fix Trusted Types violations (round #3) #108400

Closed

Description

Current remaining violations. Compiled this list using yarn tsec-compile-check and the .vscode/searches/TrustedTypes.code-search

Usage of innerHTML

Worker, use createScriptUrl

Script.text

Activity

  1. added
    engineering
    on Oct 9, 2020
  2. alexdima commented on Nov 25, 2020

    @alexdima
    Member

    FYI Johannes Rieken (@jrieken) : running yarn tsec-compile-check shows much more errors than the ones captured above. This can be easily reproduced using yarn upgrade tsec --latest which I did on my machine and got a newer node module.

  3. jrieken commented on Nov 25, 2020

    @jrieken
    ContributorAuthor

    Worker -- I don't know what to do here, we use new Worker()

    Alexandru Dima (@alexdima) for workers a trusted script url should be enough to fix things

  4. jrieken commented on Dec 9, 2020

    @jrieken
    ContributorAuthor

    Since the tsec tool is still over eager with errors and incompatible with latest TS syntax:
    ttpatch.diff.txt The patch installs a default trusted types policy and warns whenever that's being used. For this to work need to run the "right code" - which is sometimes tricky.

  5. connor4312 commented on Dec 9, 2020

    @connor4312
    Member

    sorry for the silly question, this is my first trusted types ping -- what should I do if the usage is intended? In the renderer webview, we intentionally want to insert unsanitized HTML that's rendered for the webview.

  6. alexdima commented on Dec 9, 2020

    @alexdima
    Member

    Connor Peet (@connor4312) Here are 3 examples of what I had to do when I really had to use .innerHTML:

    84cf12f#diff-b41fb33a1ffaa149285201e892f84c51e34e9eda746019cf41e7209972ff3d51

  7. connor4312 commented on Dec 9, 2020

    @connor4312
    Member

    got it, thanks!

  8. added
    unreleased
    insiders-released
    and removed
    unreleased
    on Jan 6, 2021
  9. locked and limited conversation to collaborators on Feb 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

engineeringinsiders-released

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions