Skip to content

Commit efd4a43

Browse files
Chore: Update dompurify to fix CVE (#614)
* update cve * remove libraries chromium has
1 parent d9c6e83 commit efd4a43

File tree

3 files changed

+15
-13
lines changed

3 files changed

+15
-13
lines changed

package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
"@opentelemetry/semantic-conventions": "^1.25.1",
3737
"@puppeteer/browsers": "^2.3.1",
3838
"chokidar": "^3.5.2",
39-
"dompurify": "^2.5.4",
39+
"dompurify": "^3.2.4",
4040
"express": "^4.21.1",
4141
"express-prom-bundle": "^6.5.0",
4242
"jimp": "^0.22.12",
@@ -55,7 +55,7 @@
5555
},
5656
"devDependencies": {
5757
"@grafana/eslint-config": "^6.0.0",
58-
"@types/dompurify": "2.3.4",
58+
"@types/dompurify": "^3.2.0",
5959
"@types/express": "^4.17.14",
6060
"@types/jest": "^29.5.12",
6161
"@types/jsdom": "20.0.0",

src/sanitizer/Sanitizer.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ const svgTags = {
4545
const svgFilePrefix = '<?xml version="1.0" encoding="utf-8"?>';
4646

4747
export class Sanitizer {
48-
constructor(private domPurify: DOMPurify.DOMPurifyI) {}
48+
constructor(private domPurify: DOMPurify.DOMPurify) {}
4949

5050
private sanitizeUseTagHook = (node) => {
5151
if (node.nodeName === 'use') {

yarn.lock

+12-10
Original file line numberDiff line numberDiff line change
@@ -1880,12 +1880,12 @@
18801880
resolved "https://registry.yarnpkg.com/@types/cookiejar/-/cookiejar-2.1.5.tgz#14a3e83fa641beb169a2dd8422d91c3c345a9a78"
18811881
integrity sha512-he+DHOWReW0nghN24E1WUqM0efK4kI9oTqDm6XmK8ZPe2djZ90BSNdGnIyCLzCPw7/pogPlGbzI2wHGGmi4O/Q==
18821882

1883-
"@types/dompurify@2.3.4":
1884-
version "2.3.4"
1885-
resolved "https://registry.yarnpkg.com/@types/dompurify/-/dompurify-2.3.4.tgz#94e997e30338ea24d4c8d08beca91ce4dd17a1b4"
1886-
integrity sha512-EXzDatIb5EspL2eb/xPGmaC8pePcTHrkDCONjeisusLFrVfl38Pjea/R0YJGu3k9ZQadSvMqW0WXPI2hEo2Ajg==
1883+
"@types/dompurify@^3.2.0":
1884+
version "3.2.0"
1885+
resolved "https://registry.yarnpkg.com/@types/dompurify/-/dompurify-3.2.0.tgz#56610bf3e4250df57744d61fbd95422e07dfb840"
1886+
integrity sha512-Fgg31wv9QbLDA0SpTOXO3MaxySc4DKGLi8sna4/Utjo4r3ZRPdCt4UQee8BWr+Q5z21yifghREPJGYaEOEIACg==
18871887
dependencies:
1888-
"@types/trusted-types" "*"
1888+
dompurify "*"
18891889

18901890
"@types/express-serve-static-core@^4.17.33":
18911891
version "4.19.6"
@@ -2116,7 +2116,7 @@
21162116
resolved "https://registry.yarnpkg.com/@types/triple-beam/-/triple-beam-1.3.5.tgz#74fef9ffbaa198eb8b588be029f38b00299caa2c"
21172117
integrity sha512-6WaYesThRMCl19iryMYP7/x2OVgCtbIVflDGFpWnb9irXI3UjYE4AzmYuiUKY1AJstGijoY+MgUszMgRxIYTYw==
21182118

2119-
"@types/trusted-types@*":
2119+
"@types/trusted-types@^2.0.7":
21202120
version "2.0.7"
21212121
resolved "https://registry.yarnpkg.com/@types/trusted-types/-/trusted-types-2.0.7.tgz#baccb07a970b91707df3a3e8ba6896c57ead2d11"
21222122
integrity sha512-ScaPdn1dQczgbl0QFTeTOmVHFULt394XJgOQNoyVhZ6r2vLnMLJfBPd53SB52T/3G36VI1/g2MZaX0cwDuXsfw==
@@ -3453,10 +3453,12 @@ domexception@^4.0.0:
34533453
dependencies:
34543454
webidl-conversions "^7.0.0"
34553455

3456-
dompurify@^2.5.4:
3457-
version "2.5.8"
3458-
resolved "https://registry.yarnpkg.com/dompurify/-/dompurify-2.5.8.tgz#2809d89d7e528dc7a071dea440d7376df676f824"
3459-
integrity sha512-o1vSNgrmYMQObbSSvF/1brBYEQPHhV1+gsmrusO7/GXtp1T9rCS8cXFqVxK/9crT1jA6Ccv+5MTSjBNqr7Sovw==
3456+
dompurify@*, dompurify@^3.2.4:
3457+
version "3.2.4"
3458+
resolved "https://registry.yarnpkg.com/dompurify/-/dompurify-3.2.4.tgz#af5a5a11407524431456cf18836c55d13441cd8e"
3459+
integrity sha512-ysFSFEDVduQpyhzAob/kkuJjf5zWkZD8/A9ywSp1byueyuCfHamrCBa14/Oc2iiB0e51B+NpxSl5gmzn+Ms/mg==
3460+
optionalDependencies:
3461+
"@types/trusted-types" "^2.0.7"
34603462

34613463
dunder-proto@^1.0.0, dunder-proto@^1.0.1:
34623464
version "1.0.1"

0 commit comments

Comments
 (0)