Commit graph

9 commits

Author SHA1 Message Date
Matt Bierner 474d4951d8
Switch to dompurify for sanitizing markdown content (#131950)
* Switch to dompurify for sanitizing markdown content

Switches us from using `insane` to instead use `dompurify`, which seems to be better maintained and also has some nice features, such as built-in trusted types support

I've tried to port over our existing sanitizer settings as best as possible, but there's not always a 1:1 mapping between how insane works and how dompurify does. I'd like to get this change in early in the iteration to catch potential regressions

* Remove logging and renaming param

* Move dompurify to browser layer

* Fixing tests and how we check valid attributes

* Allow innerhtml in specific files

* Use isEqualNode instead of checking innerHTML directly

innerHTML can return different results on different browsers. Use `isEqualNode` instead

* Reapply fix for trusted types

* Enable ALLOW_UNKNOWN_PROTOCOLS

I beleive this is required since we allow links to commands and loading images over remote

* in -> of

* Fix check of protocol

* Enable two more safe tags
2021-09-03 12:17:02 -07:00
Johannes Rieken adb243550a
fix json error in tsec.exemptions 2021-07-02 16:19:29 +02:00
Johannes Rieken aacda89007
remove extensionHostWorkerMain and use workerMain bootstrapping, https://github.com/microsoft/vscode/issues/127760 2021-07-02 16:04:55 +02:00
Henning Dieterichs 231c155d31
Refactors the inline completion feature. 2021-05-21 19:40:38 +02:00
Alex Dima 1256b258a6
Honor the selection suggestion in the suggest widget (when it is visible) 2021-05-19 18:37:38 +02:00
Alex Dima 32db232a53
Scaffold ghost text 2021-05-17 15:39:26 +02:00
Alexandru Dima bbe333f878
Add tsec exemptions 2021-03-22 09:24:37 +01:00
Damien Engels 58eb43beaa List all tsec exemption explicitly
This implies a few things:
 - tsec's output is clear so it can be included as a CI check
 - code introducing new violations need to update the exemption list,
 making it clear there is something security-sensitive about the code
2021-02-11 16:08:52 +01:00
Johannes Rieken a5a0c1527d add tsec config and exemption file (defunct?) 2021-01-08 12:00:56 +01:00