@fabasoad/sarif-to-slack 0.2.0 → 0.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (84) hide show
  1. package/.github/workflows/release.yml +3 -1
  2. package/.github/workflows/send-sarif-to-slack.yml +214 -0
  3. package/.pre-commit-config.yaml +3 -3
  4. package/.tool-versions +1 -1
  5. package/Makefile +9 -2
  6. package/README.md +1 -1
  7. package/dist/Logger.js +15 -6
  8. package/dist/Processors.js +23 -22
  9. package/dist/SarifToSlackService.d.ts.map +1 -1
  10. package/dist/SarifToSlackService.js +5 -6
  11. package/dist/SlackMessageBuilder.js +46 -52
  12. package/dist/index.d.ts +6 -2
  13. package/dist/index.d.ts.map +1 -1
  14. package/dist/index.js +7 -3
  15. package/dist/model/SarifModelPerRun.d.ts +17 -0
  16. package/dist/model/SarifModelPerRun.d.ts.map +1 -0
  17. package/dist/model/SarifModelPerRun.js +84 -0
  18. package/dist/model/SarifModelPerSarif.d.ts +20 -0
  19. package/dist/model/SarifModelPerSarif.d.ts.map +1 -0
  20. package/dist/model/SarifModelPerSarif.js +97 -0
  21. package/dist/model/types.d.ts +17 -0
  22. package/dist/model/types.d.ts.map +1 -0
  23. package/dist/model/types.js +31 -0
  24. package/dist/sarif-to-slack.d.ts +96 -12
  25. package/dist/tsdoc-metadata.json +1 -1
  26. package/dist/types.d.ts +87 -11
  27. package/dist/types.d.ts.map +1 -1
  28. package/dist/types.js +66 -9
  29. package/dist/utils/SarifUtils.d.ts +5 -0
  30. package/dist/utils/SarifUtils.d.ts.map +1 -0
  31. package/dist/utils/SarifUtils.js +32 -0
  32. package/dist/utils/SortUtils.d.ts +5 -0
  33. package/dist/utils/SortUtils.d.ts.map +1 -0
  34. package/dist/utils/SortUtils.js +8 -0
  35. package/dist/version.d.ts +1 -1
  36. package/dist/version.js +1 -1
  37. package/etc/sarif-to-slack.api.md +32 -7
  38. package/jest.config.json +4 -4
  39. package/package.json +9 -7
  40. package/src/Logger.ts +20 -17
  41. package/src/Processors.ts +22 -22
  42. package/src/SarifToSlackService.ts +5 -6
  43. package/src/SlackMessageBuilder.ts +78 -63
  44. package/src/index.ts +10 -2
  45. package/src/model/SarifModelPerRun.ts +114 -0
  46. package/src/model/SarifModelPerSarif.ts +116 -0
  47. package/src/model/types.ts +31 -0
  48. package/src/types.ts +91 -11
  49. package/src/utils/SarifUtils.ts +44 -0
  50. package/src/utils/SortUtils.ts +21 -0
  51. package/src/version.ts +1 -1
  52. package/test-data/sarif/codeql-csharp.sarif +1 -0
  53. package/test-data/sarif/codeql-go.sarif +1 -0
  54. package/test-data/sarif/codeql-python.sarif +1 -0
  55. package/test-data/sarif/codeql-ruby.sarif +1 -0
  56. package/test-data/sarif/codeql-typescript.sarif +1 -0
  57. package/test-data/sarif/grype-container.sarif +1774 -0
  58. package/test-data/sarif/runs-1-tools-1-results-0.sarif +18 -0
  59. package/test-data/sarif/runs-2-tools-1-results-0.sarif +30 -0
  60. package/test-data/sarif/runs-2-tools-1.sarif +656 -0
  61. package/test-data/sarif/runs-2-tools-2-results-0.sarif +44 -0
  62. package/test-data/sarif/runs-2-tools-2.sarif +686 -0
  63. package/test-data/sarif/runs-3-tools-2-results-0.sarif +48 -0
  64. package/test-data/sarif/runs-3-tools-2.sarif +278 -0
  65. package/test-data/sarif/snyk-composer.sarif +934 -0
  66. package/test-data/sarif/snyk-container.sarif +313 -0
  67. package/test-data/sarif/snyk-gomodules.sarif +388 -0
  68. package/test-data/sarif/snyk-gradle.sarif +274 -0
  69. package/test-data/sarif/snyk-hex.sarif +66 -0
  70. package/test-data/sarif/snyk-maven.sarif +274 -0
  71. package/test-data/sarif/snyk-npm.sarif +896 -0
  72. package/test-data/sarif/snyk-nuget.sarif +90 -0
  73. package/test-data/sarif/snyk-pip.sarif +66 -0
  74. package/test-data/sarif/snyk-pnpm.sarif +90 -0
  75. package/test-data/sarif/snyk-poetry.sarif +1952 -0
  76. package/test-data/sarif/snyk-rubygems.sarif +440 -0
  77. package/test-data/sarif/snyk-sbt.sarif +178 -0
  78. package/test-data/sarif/snyk-swift.sarif +112 -0
  79. package/test-data/sarif/snyk-yarn.sarif +2900 -0
  80. package/test-data/sarif/trivy-iac.sarif +134 -0
  81. package/test-data/sarif/wiz-container.sarif +30916 -0
  82. package/test-data/sarif/wiz-iac.sarif +558 -0
  83. package/tests/Processors.spec.ts +3 -3
  84. package/tests/integration/SendSarifToSlack.spec.ts +56 -0
@@ -0,0 +1,896 @@
1
+ {
2
+ "$schema": "https://raw.githubusercontent.com/oasis-tcs/sarif-spec/master/Schemata/sarif-schema-2.1.0.json",
3
+ "version": "2.1.0",
4
+ "runs": [
5
+ {
6
+ "tool": {
7
+ "driver": {
8
+ "name": "Snyk Open Source",
9
+ "properties": {
10
+ "artifactsScanned": 69
11
+ },
12
+ "rules": [
13
+ {
14
+ "id": "SNYK-JS-BODYPARSER-7926860",
15
+ "shortDescription": {
16
+ "text": "High severity - Asymmetric Resource Consumption (Amplification) vulnerability in body-parser"
17
+ },
18
+ "fullDescription": {
19
+ "text": "(CVE-2024-45590) body-parser@1.19.0"
20
+ },
21
+ "help": {
22
+ "text": "",
23
+ "markdown": "* Package Manager: npm\n* Vulnerable module: body-parser\n* Introduced through: npm-goof@0.0.1 and body-parser@1.19.0\n### Detailed paths\n* _Introduced through_: npm-goof@0.0.1 › body-parser@1.19.0\n* _Introduced through_: npm-goof@0.0.1 › express@4.17.1 › body-parser@1.19.0\n# Overview\n\nAffected versions of this package are vulnerable to Asymmetric Resource Consumption (Amplification) via the `extendedparser` and `urlencoded` functions when the URL encoding process is enabled. An attacker can flood the server with a large number of specially crafted requests.\n# Remediation\nUpgrade `body-parser` to version 1.20.3 or higher.\n# References\n- [GitHub Commit](https://github.com/expressjs/body-parser/commit/b2695c4450f06ba3b0ccf48d872a229bb41c9bce)\n"
24
+ },
25
+ "properties": {
26
+ "tags": [
27
+ "security",
28
+ "CWE-405",
29
+ "npm"
30
+ ],
31
+ "cvssv3_baseScore": 8.2,
32
+ "security-severity": "8.2"
33
+ }
34
+ },
35
+ {
36
+ "id": "SNYK-JS-COOKIE-8163060",
37
+ "shortDescription": {
38
+ "text": "Medium severity - Cross-site Scripting (XSS) vulnerability in cookie"
39
+ },
40
+ "fullDescription": {
41
+ "text": "(CVE-2024-47764) cookie@0.4.0"
42
+ },
43
+ "help": {
44
+ "text": "",
45
+ "markdown": "* Package Manager: npm\n* Vulnerable module: cookie\n* Introduced through: npm-goof@0.0.1, express@4.17.1 and others\n### Detailed paths\n* _Introduced through_: npm-goof@0.0.1 › express@4.17.1 › cookie@0.4.0\n# Overview\n\nAffected versions of this package are vulnerable to Cross-site Scripting (XSS) via the cookie `name`, `path`, or `domain`, which can be used to set unexpected values to other cookie fields.\r\n\r\n# Workaround\r\nUsers who are not able to upgrade to the fixed version should avoid passing untrusted or arbitrary values for the cookie fields and ensure they are set by the application instead of user input.\n# Details\n\nA cross-site scripting attack occurs when the attacker tricks a legitimate web-based application or site to accept a request as originating from a trusted source.\n\nThis is done by escaping the context of the web application; the web application then delivers that data to its users along with other trusted dynamic content, without validating it. The browser unknowingly executes malicious script on the client side (through client-side languages; usually JavaScript or HTML) in order to perform actions that are otherwise typically blocked by the browser’s Same Origin Policy.\n\nInjecting malicious code is the most prevalent manner by which XSS is exploited; for this reason, escaping characters in order to prevent this manipulation is the top method for securing code against this vulnerability.\n\nEscaping means that the application is coded to mark key characters, and particularly key characters included in user input, to prevent those characters from being interpreted in a dangerous context. For example, in HTML, `<` can be coded as `&lt`; and `>` can be coded as `&gt`; in order to be interpreted and displayed as themselves in text, while within the code itself, they are used for HTML tags. If malicious content is injected into an application that escapes special characters and that malicious content uses `<` and `>` as HTML tags, those characters are nonetheless not interpreted as HTML tags by the browser if they’ve been correctly escaped in the application code and in this way the attempted attack is diverted.\n \nThe most prominent use of XSS is to steal cookies (source: OWASP HttpOnly) and hijack user sessions, but XSS exploits have been used to expose sensitive information, enable access to privileged services and functionality and deliver malware. \n\n## Types of attacks\nThere are a few methods by which XSS can be manipulated:\n\n|Type|Origin|Description|\n|--|--|--|\n|**Stored**|Server|The malicious code is inserted in the application (usually as a link) by the attacker. The code is activated every time a user clicks the link.|\n|**Reflected**|Server|The attacker delivers a malicious link externally from the vulnerable web site application to a user. When clicked, malicious code is sent to the vulnerable web site, which reflects the attack back to the user’s browser.| \n|**DOM-based**|Client|The attacker forces the user’s browser to render a malicious page. The data in the page itself delivers the cross-site scripting data.|\n|**Mutated**| |The attacker injects code that appears safe, but is then rewritten and modified by the browser, while parsing the markup. An example is rebalancing unclosed quotation marks or even adding quotation marks to unquoted parameters.|\n\n## Affected environments\nThe following environments are susceptible to an XSS attack:\n\n* Web servers\n* Application servers\n* Web application environments\n\n## How to prevent\nThis section describes the top best practices designed to specifically protect your code: \n\n* Sanitize data input in an HTTP request before reflecting it back, ensuring all data is validated, filtered or escaped before echoing anything back to the user, such as the values of query parameters during searches. \n* Convert special characters such as `?`, `&`, `/`, `<`, `>` and spaces to their respective HTML or URL encoded equivalents. \n* Give users the option to disable client-side scripts.\n* Redirect invalid requests.\n* Detect simultaneous logins, including those from two separate IP addresses, and invalidate those sessions.\n* Use and enforce a Content Security Policy (source: Wikipedia) to disable any features that might be manipulated for an XSS attack.\n* Read the documentation for any of the libraries referenced in your code to understand which elements allow for embedded HTML.\n\n# Remediation\nUpgrade `cookie` to version 0.7.0 or higher.\n# References\n- [GitHub Commit](https://github.com/jshttp/cookie/commit/e10042845354fea83bd8f34af72475eed1dadf5c)\n- [GitHub PR](https://github.com/jshttp/cookie/pull/167)\n- [Red Hat Bugzilla Bug](https://bugzilla.redhat.com/show_bug.cgi?id=2316549)\n"
46
+ },
47
+ "properties": {
48
+ "tags": [
49
+ "security",
50
+ "CWE-79",
51
+ "npm"
52
+ ],
53
+ "cvssv3_baseScore": 6.3,
54
+ "security-severity": "6.3"
55
+ }
56
+ },
57
+ {
58
+ "id": "SNYK-JS-EXPRESS-6474509",
59
+ "shortDescription": {
60
+ "text": "Medium severity - Open Redirect vulnerability in express"
61
+ },
62
+ "fullDescription": {
63
+ "text": "(CVE-2024-29041) express@4.17.1"
64
+ },
65
+ "help": {
66
+ "text": "",
67
+ "markdown": "* Package Manager: npm\n* Vulnerable module: express\n* Introduced through: npm-goof@0.0.1 and express@4.17.1\n### Detailed paths\n* _Introduced through_: npm-goof@0.0.1 › express@4.17.1\n# Overview\n[express](https://github.com/expressjs/express) is a minimalist web framework.\n\nAffected versions of this package are vulnerable to Open Redirect due to the implementation of URL encoding using `encodeurl` before passing it to the `location` header. This can lead to unexpected evaluations of malformed URLs by common redirect allow list implementations in applications, allowing an attacker to bypass a properly implemented allow list and redirect users to malicious sites.\n# Remediation\nUpgrade `express` to version 4.19.2, 5.0.0-beta.3 or higher.\n# References\n- [Github Commit](https://github.com/expressjs/express/commit/0b746953c4bd8e377123527db11f9cd866e39f94)\n- [GitHub Commit](https://github.com/expressjs/express/commit/0867302ddbde0e9463d0564fea5861feb708c2dd)\n- [Github Issue](https://github.com/koajs/koa/issues/1800)\n- [GitHub PR](https://github.com/expressjs/express/pull/5551)\n"
68
+ },
69
+ "properties": {
70
+ "tags": [
71
+ "security",
72
+ "CWE-601",
73
+ "npm"
74
+ ],
75
+ "cvssv3_baseScore": 6.1,
76
+ "security-severity": "6.1"
77
+ }
78
+ },
79
+ {
80
+ "id": "SNYK-JS-EXPRESS-7926867",
81
+ "shortDescription": {
82
+ "text": "Medium severity - Cross-site Scripting vulnerability in express"
83
+ },
84
+ "fullDescription": {
85
+ "text": "(CVE-2024-43796) express@4.17.1"
86
+ },
87
+ "help": {
88
+ "text": "",
89
+ "markdown": "* Package Manager: npm\n* Vulnerable module: express\n* Introduced through: npm-goof@0.0.1 and express@4.17.1\n### Detailed paths\n* _Introduced through_: npm-goof@0.0.1 › express@4.17.1\n# Overview\n[express](https://github.com/expressjs/express) is a minimalist web framework.\n\nAffected versions of this package are vulnerable to Cross-site Scripting due to improper handling of user input in the `response.redirect` method. An attacker can execute arbitrary code by passing malicious input to this method.\r\n\r\n\r\n**Note**\r\n\r\nTo exploit this vulnerability, the following conditions are required:\r\n\r\n1) The attacker should be able to control the input to `response.redirect()`\r\n\r\n2) express must not redirect before the template appears\r\n\r\n3) the browser must not complete redirection before:\r\n\r\n4) the user must click on the link in the template\n# Remediation\nUpgrade `express` to version 4.20.0, 5.0.0 or higher.\n# References\n- [GitHub Commit](https://github.com/expressjs/express/commit/54271f69b511fea198471e6ff3400ab805d6b553)\n"
90
+ },
91
+ "properties": {
92
+ "tags": [
93
+ "security",
94
+ "CWE-79",
95
+ "npm"
96
+ ],
97
+ "cvssv3_baseScore": 5.1,
98
+ "security-severity": "5.1"
99
+ }
100
+ },
101
+ {
102
+ "id": "SNYK-JS-MONGODB-5871303",
103
+ "shortDescription": {
104
+ "text": "Medium severity - Information Exposure vulnerability in mongodb"
105
+ },
106
+ "fullDescription": {
107
+ "text": "(CVE-2021-32050) mongodb@4.0.0"
108
+ },
109
+ "help": {
110
+ "text": "",
111
+ "markdown": "* Package Manager: npm\n* Vulnerable module: mongodb\n* Introduced through: npm-goof@0.0.1 and mongodb@4.0.0\n### Detailed paths\n* _Introduced through_: npm-goof@0.0.1 › mongodb@4.0.0\n# Overview\n[mongodb](https://www.npmjs.com/package/mongodb) is an official MongoDB driver for Node.js.\n\nAffected versions of this package are vulnerable to Information Exposure via the `command listener` feature. When it is enabled (not the default setting), some drivers may inadvertently publish events containing sensitive authentication-related data. An attacker can gain access to this sensitive information by monitoring these published events.\n# Remediation\nUpgrade `mongodb` to version 3.6.10, 4.17.0, 5.8.0 or higher.\n# References\n- [GitHub Commit](https://github.com/mongodb/mongo-c-driver/commit/8a78b0eb0e08084e166ae65719b8b4ed4fcaa96a)\n- [GitHub Commit](https://github.com/mongodb/mongo-cxx-driver/commit/cf4faedfa96c2b63e846a0ec169d458dfc84dbd4)\n- [GitHub Commit](https://github.com/mongodb/mongo-swift-driver/commit/13ec2c88b9331fd2e0da9b29545f73a3b134d42b)\n- [GitHub Commit](https://github.com/mongodb/node-mongodb-native/commit/b98f2061de9e8b0a814e3e7d39a0e914245953d0)\n- [MongoDB Issue](https://jira.mongodb.org/browse/CDRIVER-3797)\n- [MongoDB Issue](https://jira.mongodb.org/browse/CXX-2028)\n- [MongoDB Issue](https://jira.mongodb.org/browse/NODE-3356)\n- [MongoDB Issue](https://jira.mongodb.org/browse/PHPC-1869)\n- [MongoDB Issue](https://jira.mongodb.org/browse/SWIFT-1229)\n"
112
+ },
113
+ "properties": {
114
+ "tags": [
115
+ "security",
116
+ "CWE-200",
117
+ "npm"
118
+ ],
119
+ "cvssv3_baseScore": 4.2,
120
+ "security-severity": "4.2"
121
+ }
122
+ },
123
+ {
124
+ "id": "snyk:lic:npm:mongodb:Apache-2.0",
125
+ "shortDescription": {
126
+ "text": "High severity - Apache-2.0 license vulnerability in mongodb"
127
+ },
128
+ "fullDescription": {
129
+ "text": "mongodb@4.0.0"
130
+ },
131
+ "help": {
132
+ "text": "",
133
+ "markdown": "* Package Manager: npm\n* Module: mongodb\n* Introduced through: npm-goof@0.0.1 and mongodb@4.0.0\n### Detailed paths\n* _Introduced through_: npm-goof@0.0.1 › mongodb@4.0.0\nApache-2.0 license"
134
+ },
135
+ "properties": {
136
+ "tags": [
137
+ "security",
138
+ "npm"
139
+ ],
140
+ "security-severity": "undefined"
141
+ }
142
+ },
143
+ {
144
+ "id": "SNYK-JS-PATHTOREGEXP-7925106",
145
+ "shortDescription": {
146
+ "text": "Medium severity - Regular Expression Denial of Service (ReDoS) vulnerability in path-to-regexp"
147
+ },
148
+ "fullDescription": {
149
+ "text": "(CVE-2024-45296) path-to-regexp@0.1.7"
150
+ },
151
+ "help": {
152
+ "text": "",
153
+ "markdown": "* Package Manager: npm\n* Vulnerable module: path-to-regexp\n* Introduced through: npm-goof@0.0.1, express@4.17.1 and others\n### Detailed paths\n* _Introduced through_: npm-goof@0.0.1 › express@4.17.1 › path-to-regexp@0.1.7\n# Overview\n\nAffected versions of this package are vulnerable to Regular Expression Denial of Service (ReDoS) when including multiple regular expression parameters in a single segment, which will produce the regular expression `/^\\/([^\\/]+?)-([^\\/]+?)\\/?$/`, if two parameters within a single segment are separated by a character other than a `/` or `.`. Poor performance will block the event loop and can lead to a DoS.\r\n\r\n**Note:**\r\nWhile the 8.0.0 release has completely eliminated the vulnerable functionality, prior versions that have received the patch to mitigate backtracking may still be vulnerable if custom regular expressions are used. So it is strongly recommended for regular expression input to be controlled to avoid malicious performance degradation in those versions. This behavior is enforced as of version 7.1.0 via the `strict` option, which returns an error if a dangerous regular expression is detected.\r\n\r\n# Workaround\r\nThis vulnerability can be avoided by using a custom regular expression for parameters after the first in a segment, which excludes `-` and `/`.\n# PoC\n```js\r\n/a${'-a'.repeat(8_000)}/a\r\n```\n\n# Details\n\nDenial of Service (DoS) describes a family of attacks, all aimed at making a system inaccessible to its original and legitimate users. There are many types of DoS attacks, ranging from trying to clog the network pipes to the system by generating a large volume of traffic from many machines (a Distributed Denial of Service - DDoS - attack) to sending crafted requests that cause a system to crash or take a disproportional amount of time to process.\n\nThe Regular expression Denial of Service (ReDoS) is a type of Denial of Service attack. Regular expressions are incredibly powerful, but they aren't very intuitive and can ultimately end up making it easy for attackers to take your site down.\n\nLet’s take the following regular expression as an example:\n```js\nregex = /A(B|C+)+D/\n```\n\nThis regular expression accomplishes the following:\n- `A` The string must start with the letter 'A'\n- `(B|C+)+` The string must then follow the letter A with either the letter 'B' or some number of occurrences of the letter 'C' (the `+` matches one or more times). The `+` at the end of this section states that we can look for one or more matches of this section.\n- `D` Finally, we ensure this section of the string ends with a 'D'\n\nThe expression would match inputs such as `ABBD`, `ABCCCCD`, `ABCBCCCD` and `ACCCCCD`\n\nIt most cases, it doesn't take very long for a regex engine to find a match:\n\n```bash\n$ time node -e '/A(B|C+)+D/.test(\"ACCCCCCCCCCCCCCCCCCCCCCCCCCCCD\")'\n0.04s user 0.01s system 95% cpu 0.052 total\n\n$ time node -e '/A(B|C+)+D/.test(\"ACCCCCCCCCCCCCCCCCCCCCCCCCCCCX\")'\n1.79s user 0.02s system 99% cpu 1.812 total\n```\n\nThe entire process of testing it against a 30 characters long string takes around ~52ms. But when given an invalid string, it takes nearly two seconds to complete the test, over ten times as long as it took to test a valid string. The dramatic difference is due to the way regular expressions get evaluated.\n\nMost Regex engines will work very similarly (with minor differences). The engine will match the first possible way to accept the current character and proceed to the next one. If it then fails to match the next one, it will backtrack and see if there was another way to digest the previous character. If it goes too far down the rabbit hole only to find out the string doesn’t match in the end, and if many characters have multiple valid regex paths, the number of backtracking steps can become very large, resulting in what is known as _catastrophic backtracking_.\n\nLet's look at how our expression runs into this problem, using a shorter string: \"ACCCX\". While it seems fairly straightforward, there are still four different ways that the engine could match those three C's:\n1. CCC\n2. CC+C\n3. C+CC\n4. C+C+C.\n\nThe engine has to try each of those combinations to see if any of them potentially match against the expression. When you combine that with the other steps the engine must take, we can use [RegEx 101 debugger](https://regex101.com/debugger) to see the engine has to take a total of 38 steps before it can determine the string doesn't match.\n\nFrom there, the number of steps the engine must use to validate a string just continues to grow.\n\n| String | Number of C's | Number of steps |\n| -------|-------------:| -----:|\n| ACCCX | 3 | 38\n| ACCCCX | 4 | 71\n| ACCCCCX | 5 | 136\n| ACCCCCCCCCCCCCCX | 14 | 65,553\n\n\nBy the time the string includes 14 C's, the engine has to take over 65,000 steps just to see if the string is valid. These extreme situations can cause them to work very slowly (exponentially related to input size, as shown above), allowing an attacker to exploit this and can cause the service to excessively consume CPU, resulting in a Denial of Service.\n\n# Remediation\nUpgrade `path-to-regexp` to version 0.1.10, 1.9.0, 3.3.0, 6.3.0, 8.0.0 or higher.\n# References\n- [GitHub Commit](https://github.com/pillarjs/path-to-regexp/commit/29b96b4a1de52824e1ca0f49a701183cc4ed476f)\n- [GitHub Commit](https://github.com/pillarjs/path-to-regexp/commit/60f2121e9b66b7b622cc01080df0aabda9eedee6)\n- [GitHub Commit](https://github.com/pillarjs/path-to-regexp/commit/f73ec6c86b06f544b977119c2b62a16de480a6a9)\n- [Strict Mode Release Note](https://github.com/pillarjs/path-to-regexp/releases/tag/v7.1.0)\n- [Vulnerability Write-up](https://blakeembrey.com/posts/2024-09-web-redos/)\n"
154
+ },
155
+ "properties": {
156
+ "tags": [
157
+ "security",
158
+ "CWE-1333",
159
+ "npm"
160
+ ],
161
+ "cvssv3_baseScore": 6.9,
162
+ "security-severity": "6.9"
163
+ }
164
+ },
165
+ {
166
+ "id": "SNYK-JS-PATHTOREGEXP-8482416",
167
+ "shortDescription": {
168
+ "text": "Medium severity - Regular Expression Denial of Service (ReDoS) vulnerability in path-to-regexp"
169
+ },
170
+ "fullDescription": {
171
+ "text": "(CVE-2024-52798) path-to-regexp@0.1.7"
172
+ },
173
+ "help": {
174
+ "text": "",
175
+ "markdown": "* Package Manager: npm\n* Vulnerable module: path-to-regexp\n* Introduced through: npm-goof@0.0.1, express@4.17.1 and others\n### Detailed paths\n* _Introduced through_: npm-goof@0.0.1 › express@4.17.1 › path-to-regexp@0.1.7\n# Overview\n\nAffected versions of this package are vulnerable to Regular Expression Denial of Service (ReDoS) when including multiple regular expression parameters in a single segment, when the separator is not `.` (e.g. no `/:a-:b`). Poor performance will block the event loop and can lead to a DoS.\r\n\r\n**Note:**\r\n\r\nThis issue is caused due to an incomplete fix for [CVE-2024-45296](https://security.snyk.io/vuln/SNYK-JS-PATHTOREGEXP-7925106).\r\n\r\n# Workarounds\r\n\r\nThis can be mitigated by avoiding using two parameters within a single path segment, when the separator is not `.` (e.g. no `/:a-:b`). Alternatively, the regex used for both parameters can be defined to ensure they do not overlap to allow backtracking.\n# PoC\n```js\r\n/a${'-a'.repeat(8_000)}/a\r\n```\n\n# Details\n\nDenial of Service (DoS) describes a family of attacks, all aimed at making a system inaccessible to its original and legitimate users. There are many types of DoS attacks, ranging from trying to clog the network pipes to the system by generating a large volume of traffic from many machines (a Distributed Denial of Service - DDoS - attack) to sending crafted requests that cause a system to crash or take a disproportional amount of time to process.\n\nThe Regular expression Denial of Service (ReDoS) is a type of Denial of Service attack. Regular expressions are incredibly powerful, but they aren't very intuitive and can ultimately end up making it easy for attackers to take your site down.\n\nLet’s take the following regular expression as an example:\n```js\nregex = /A(B|C+)+D/\n```\n\nThis regular expression accomplishes the following:\n- `A` The string must start with the letter 'A'\n- `(B|C+)+` The string must then follow the letter A with either the letter 'B' or some number of occurrences of the letter 'C' (the `+` matches one or more times). The `+` at the end of this section states that we can look for one or more matches of this section.\n- `D` Finally, we ensure this section of the string ends with a 'D'\n\nThe expression would match inputs such as `ABBD`, `ABCCCCD`, `ABCBCCCD` and `ACCCCCD`\n\nIt most cases, it doesn't take very long for a regex engine to find a match:\n\n```bash\n$ time node -e '/A(B|C+)+D/.test(\"ACCCCCCCCCCCCCCCCCCCCCCCCCCCCD\")'\n0.04s user 0.01s system 95% cpu 0.052 total\n\n$ time node -e '/A(B|C+)+D/.test(\"ACCCCCCCCCCCCCCCCCCCCCCCCCCCCX\")'\n1.79s user 0.02s system 99% cpu 1.812 total\n```\n\nThe entire process of testing it against a 30 characters long string takes around ~52ms. But when given an invalid string, it takes nearly two seconds to complete the test, over ten times as long as it took to test a valid string. The dramatic difference is due to the way regular expressions get evaluated.\n\nMost Regex engines will work very similarly (with minor differences). The engine will match the first possible way to accept the current character and proceed to the next one. If it then fails to match the next one, it will backtrack and see if there was another way to digest the previous character. If it goes too far down the rabbit hole only to find out the string doesn’t match in the end, and if many characters have multiple valid regex paths, the number of backtracking steps can become very large, resulting in what is known as _catastrophic backtracking_.\n\nLet's look at how our expression runs into this problem, using a shorter string: \"ACCCX\". While it seems fairly straightforward, there are still four different ways that the engine could match those three C's:\n1. CCC\n2. CC+C\n3. C+CC\n4. C+C+C.\n\nThe engine has to try each of those combinations to see if any of them potentially match against the expression. When you combine that with the other steps the engine must take, we can use [RegEx 101 debugger](https://regex101.com/debugger) to see the engine has to take a total of 38 steps before it can determine the string doesn't match.\n\nFrom there, the number of steps the engine must use to validate a string just continues to grow.\n\n| String | Number of C's | Number of steps |\n| -------|-------------:| -----:|\n| ACCCX | 3 | 38\n| ACCCCX | 4 | 71\n| ACCCCCX | 5 | 136\n| ACCCCCCCCCCCCCCX | 14 | 65,553\n\n\nBy the time the string includes 14 C's, the engine has to take over 65,000 steps just to see if the string is valid. These extreme situations can cause them to work very slowly (exponentially related to input size, as shown above), allowing an attacker to exploit this and can cause the service to excessively consume CPU, resulting in a Denial of Service.\n\n# Remediation\nUpgrade `path-to-regexp` to version 0.1.12 or higher.\n# References\n- [Blog Post](https://blakeembrey.com/posts/2024-09-web-redos)\n- [GitHub Commit](https://github.com/pillarjs/path-to-regexp/commit/f01c26a013b1889f0c217c643964513acf17f6a4)\n"
176
+ },
177
+ "properties": {
178
+ "tags": [
179
+ "security",
180
+ "CWE-1333",
181
+ "npm"
182
+ ],
183
+ "cvssv3_baseScore": 6.9,
184
+ "security-severity": "6.9"
185
+ }
186
+ },
187
+ {
188
+ "id": "SNYK-JS-QS-3153490",
189
+ "shortDescription": {
190
+ "text": "High severity - Prototype Poisoning vulnerability in qs"
191
+ },
192
+ "fullDescription": {
193
+ "text": "(CVE-2022-24999) qs@6.7.0"
194
+ },
195
+ "help": {
196
+ "text": "",
197
+ "markdown": "* Package Manager: npm\n* Vulnerable module: qs\n* Introduced through: npm-goof@0.0.1, body-parser@1.19.0 and others\n### Detailed paths\n* _Introduced through_: npm-goof@0.0.1 › body-parser@1.19.0 › qs@6.7.0\n* _Introduced through_: npm-goof@0.0.1 › express@4.17.1 › qs@6.7.0\n* _Introduced through_: npm-goof@0.0.1 › express@4.17.1 › body-parser@1.19.0 › qs@6.7.0\n# Overview\n[qs](https://www.npmjs.com/package/qs) is a querystring parser that supports nesting and arrays, with a depth limit.\n\nAffected versions of this package are vulnerable to Prototype Poisoning which allows attackers to cause a Node process to hang, processing an Array object whose prototype has been replaced by one with an excessive length value.\r\n\r\n**Note:** In many typical Express use cases, an unauthenticated remote attacker can place the attack payload in the query string of the URL that is used to visit the application, such as `a[__proto__]=b&a[__proto__]&a[length]=100000000`.\n\n# Details\n\nDenial of Service (DoS) describes a family of attacks, all aimed at making a system inaccessible to its intended and legitimate users.\n\nUnlike other vulnerabilities, DoS attacks usually do not aim at breaching security. Rather, they are focused on making websites and services unavailable to genuine users resulting in downtime.\n\nOne popular Denial of Service vulnerability is DDoS (a Distributed Denial of Service), an attack that attempts to clog network pipes to the system by generating a large volume of traffic from many machines.\n\nWhen it comes to open source libraries, DoS vulnerabilities allow attackers to trigger such a crash or crippling of the service by using a flaw either in the application code or from the use of open source libraries.\n\nTwo common types of DoS vulnerabilities:\n\n* High CPU/Memory Consumption- An attacker sending crafted requests that could cause the system to take a disproportionate amount of time to process. For example, [commons-fileupload:commons-fileupload](https://security.snyk.io/vuln/SNYK-JAVA-COMMONSFILEUPLOAD-30082).\n\n* Crash - An attacker sending crafted requests that could cause the system to crash. For Example, [npm `ws` package](https://snyk.io/vuln/npm:ws:20171108)\n\n# Remediation\nUpgrade `qs` to version 6.2.4, 6.3.3, 6.4.1, 6.5.3, 6.6.1, 6.7.3, 6.8.3, 6.9.7, 6.10.3 or higher.\n# References\n- [GitHub PR](https://github.com/ljharb/qs/pull/428)\n- [RedHat Bugzilla Bug](https://bugzilla.redhat.com/show_bug.cgi?id=2150323)\n- [Researcher Advisory](https://github.com/n8tz/CVE-2022-24999)\n"
198
+ },
199
+ "properties": {
200
+ "tags": [
201
+ "security",
202
+ "CWE-1321",
203
+ "npm"
204
+ ],
205
+ "cvssv3_baseScore": 7.5,
206
+ "security-severity": "7.5"
207
+ }
208
+ },
209
+ {
210
+ "id": "SNYK-JS-SEND-7926862",
211
+ "shortDescription": {
212
+ "text": "Low severity - Cross-site Scripting vulnerability in send"
213
+ },
214
+ "fullDescription": {
215
+ "text": "(CVE-2024-43799) send@0.17.1"
216
+ },
217
+ "help": {
218
+ "text": "",
219
+ "markdown": "* Package Manager: npm\n* Vulnerable module: send\n* Introduced through: npm-goof@0.0.1, express@4.17.1 and others\n### Detailed paths\n* _Introduced through_: npm-goof@0.0.1 › express@4.17.1 › send@0.17.1\n* _Introduced through_: npm-goof@0.0.1 › express@4.17.1 › serve-static@1.14.1 › send@0.17.1\n# Overview\n[send](https://github.com/pillarjs/send) is a Better streaming static file server with Range and conditional-GET support\n\nAffected versions of this package are vulnerable to Cross-site Scripting due to improper user input sanitization passed to the `SendStream.redirect()` function, which executes untrusted code. An attacker can execute arbitrary code by manipulating the input parameters to this method.\r\n\r\n**Note:**\r\n\r\nExploiting this vulnerability requires the following:\r\n\r\n1) The attacker needs to control the input to `response.redirect()`\r\n\r\n2) Express MUST NOT redirect before the template appears\r\n\r\n3) The browser MUST NOT complete redirection before\r\n\r\n4) The user MUST click on the link in the template\n# Details\n\nA cross-site scripting attack occurs when the attacker tricks a legitimate web-based application or site to accept a request as originating from a trusted source.\n\nThis is done by escaping the context of the web application; the web application then delivers that data to its users along with other trusted dynamic content, without validating it. The browser unknowingly executes malicious script on the client side (through client-side languages; usually JavaScript or HTML) in order to perform actions that are otherwise typically blocked by the browser’s Same Origin Policy.\n\nInjecting malicious code is the most prevalent manner by which XSS is exploited; for this reason, escaping characters in order to prevent this manipulation is the top method for securing code against this vulnerability.\n\nEscaping means that the application is coded to mark key characters, and particularly key characters included in user input, to prevent those characters from being interpreted in a dangerous context. For example, in HTML, `<` can be coded as `&lt`; and `>` can be coded as `&gt`; in order to be interpreted and displayed as themselves in text, while within the code itself, they are used for HTML tags. If malicious content is injected into an application that escapes special characters and that malicious content uses `<` and `>` as HTML tags, those characters are nonetheless not interpreted as HTML tags by the browser if they’ve been correctly escaped in the application code and in this way the attempted attack is diverted.\n \nThe most prominent use of XSS is to steal cookies (source: OWASP HttpOnly) and hijack user sessions, but XSS exploits have been used to expose sensitive information, enable access to privileged services and functionality and deliver malware. \n\n## Types of attacks\nThere are a few methods by which XSS can be manipulated:\n\n|Type|Origin|Description|\n|--|--|--|\n|**Stored**|Server|The malicious code is inserted in the application (usually as a link) by the attacker. The code is activated every time a user clicks the link.|\n|**Reflected**|Server|The attacker delivers a malicious link externally from the vulnerable web site application to a user. When clicked, malicious code is sent to the vulnerable web site, which reflects the attack back to the user’s browser.| \n|**DOM-based**|Client|The attacker forces the user’s browser to render a malicious page. The data in the page itself delivers the cross-site scripting data.|\n|**Mutated**| |The attacker injects code that appears safe, but is then rewritten and modified by the browser, while parsing the markup. An example is rebalancing unclosed quotation marks or even adding quotation marks to unquoted parameters.|\n\n## Affected environments\nThe following environments are susceptible to an XSS attack:\n\n* Web servers\n* Application servers\n* Web application environments\n\n## How to prevent\nThis section describes the top best practices designed to specifically protect your code: \n\n* Sanitize data input in an HTTP request before reflecting it back, ensuring all data is validated, filtered or escaped before echoing anything back to the user, such as the values of query parameters during searches. \n* Convert special characters such as `?`, `&`, `/`, `<`, `>` and spaces to their respective HTML or URL encoded equivalents. \n* Give users the option to disable client-side scripts.\n* Redirect invalid requests.\n* Detect simultaneous logins, including those from two separate IP addresses, and invalidate those sessions.\n* Use and enforce a Content Security Policy (source: Wikipedia) to disable any features that might be manipulated for an XSS attack.\n* Read the documentation for any of the libraries referenced in your code to understand which elements allow for embedded HTML.\n\n# Remediation\nUpgrade `send` to version 0.19.0, 1.1.0 or higher.\n# References\n- [GitHub Commit](https://github.com/pillarjs/send/commit/ae4f2989491b392ae2ef3b0015a019770ae65d35)\n"
220
+ },
221
+ "properties": {
222
+ "tags": [
223
+ "security",
224
+ "CWE-79",
225
+ "npm"
226
+ ],
227
+ "cvssv3_baseScore": 2.1,
228
+ "security-severity": "2.1"
229
+ }
230
+ },
231
+ {
232
+ "id": "SNYK-JS-SERVESTATIC-7926865",
233
+ "shortDescription": {
234
+ "text": "Low severity - Cross-site Scripting vulnerability in serve-static"
235
+ },
236
+ "fullDescription": {
237
+ "text": "(CVE-2024-43800) serve-static@1.14.1"
238
+ },
239
+ "help": {
240
+ "text": "",
241
+ "markdown": "* Package Manager: npm\n* Vulnerable module: serve-static\n* Introduced through: npm-goof@0.0.1, express@4.17.1 and others\n### Detailed paths\n* _Introduced through_: npm-goof@0.0.1 › express@4.17.1 › serve-static@1.14.1\n# Overview\n[serve-static](https://github.com/expressjs/serve-static) is a server.\n\nAffected versions of this package are vulnerable to Cross-site Scripting due to improper sanitization of user input in the `redirect` function. An attacker can manipulate the redirection process by injecting malicious code into the input. \r\n\r\n\r\n**Note**\r\n\r\nTo exploit this vulnerability, the following conditions are required:\r\n\r\n1) The attacker should be able to control the input to `response.redirect()`\r\n\r\n2) express must not redirect before the template appears\r\n\r\n3) the browser must not complete redirection before:\r\n\r\n4) the user must click on the link in the template\n# Details\n\nA cross-site scripting attack occurs when the attacker tricks a legitimate web-based application or site to accept a request as originating from a trusted source.\n\nThis is done by escaping the context of the web application; the web application then delivers that data to its users along with other trusted dynamic content, without validating it. The browser unknowingly executes malicious script on the client side (through client-side languages; usually JavaScript or HTML) in order to perform actions that are otherwise typically blocked by the browser’s Same Origin Policy.\n\nInjecting malicious code is the most prevalent manner by which XSS is exploited; for this reason, escaping characters in order to prevent this manipulation is the top method for securing code against this vulnerability.\n\nEscaping means that the application is coded to mark key characters, and particularly key characters included in user input, to prevent those characters from being interpreted in a dangerous context. For example, in HTML, `<` can be coded as `&lt`; and `>` can be coded as `&gt`; in order to be interpreted and displayed as themselves in text, while within the code itself, they are used for HTML tags. If malicious content is injected into an application that escapes special characters and that malicious content uses `<` and `>` as HTML tags, those characters are nonetheless not interpreted as HTML tags by the browser if they’ve been correctly escaped in the application code and in this way the attempted attack is diverted.\n \nThe most prominent use of XSS is to steal cookies (source: OWASP HttpOnly) and hijack user sessions, but XSS exploits have been used to expose sensitive information, enable access to privileged services and functionality and deliver malware. \n\n## Types of attacks\nThere are a few methods by which XSS can be manipulated:\n\n|Type|Origin|Description|\n|--|--|--|\n|**Stored**|Server|The malicious code is inserted in the application (usually as a link) by the attacker. The code is activated every time a user clicks the link.|\n|**Reflected**|Server|The attacker delivers a malicious link externally from the vulnerable web site application to a user. When clicked, malicious code is sent to the vulnerable web site, which reflects the attack back to the user’s browser.| \n|**DOM-based**|Client|The attacker forces the user’s browser to render a malicious page. The data in the page itself delivers the cross-site scripting data.|\n|**Mutated**| |The attacker injects code that appears safe, but is then rewritten and modified by the browser, while parsing the markup. An example is rebalancing unclosed quotation marks or even adding quotation marks to unquoted parameters.|\n\n## Affected environments\nThe following environments are susceptible to an XSS attack:\n\n* Web servers\n* Application servers\n* Web application environments\n\n## How to prevent\nThis section describes the top best practices designed to specifically protect your code: \n\n* Sanitize data input in an HTTP request before reflecting it back, ensuring all data is validated, filtered or escaped before echoing anything back to the user, such as the values of query parameters during searches. \n* Convert special characters such as `?`, `&`, `/`, `<`, `>` and spaces to their respective HTML or URL encoded equivalents. \n* Give users the option to disable client-side scripts.\n* Redirect invalid requests.\n* Detect simultaneous logins, including those from two separate IP addresses, and invalidate those sessions.\n* Use and enforce a Content Security Policy (source: Wikipedia) to disable any features that might be manipulated for an XSS attack.\n* Read the documentation for any of the libraries referenced in your code to understand which elements allow for embedded HTML.\n\n# Remediation\nUpgrade `serve-static` to version 1.16.0, 2.1.0 or higher.\n# References\n- [GitHub Commit](https://github.com/expressjs/serve-static/commit/0c11fad159898cdc69fd9ab63269b72468ecaf6b)\n- [GitHub Commit](https://github.com/expressjs/serve-static/commit/ce730896fddce1588111d9ef6fdf20896de5c6fa)\n"
242
+ },
243
+ "properties": {
244
+ "tags": [
245
+ "security",
246
+ "CWE-79",
247
+ "npm"
248
+ ],
249
+ "cvssv3_baseScore": 2.1,
250
+ "security-severity": "2.1"
251
+ }
252
+ },
253
+ {
254
+ "id": "snyk:lic:npm:bson:Apache-2.0",
255
+ "shortDescription": {
256
+ "text": "High severity - Apache-2.0 license vulnerability in bson"
257
+ },
258
+ "fullDescription": {
259
+ "text": "bson@4.7.2"
260
+ },
261
+ "help": {
262
+ "text": "",
263
+ "markdown": "* Package Manager: npm\n* Module: bson\n* Introduced through: npm-goof@0.0.1, mongodb@4.0.0 and others\n### Detailed paths\n* _Introduced through_: npm-goof@0.0.1 › mongodb@4.0.0 › bson@4.7.2\nApache-2.0 license"
264
+ },
265
+ "properties": {
266
+ "tags": [
267
+ "security",
268
+ "npm"
269
+ ],
270
+ "security-severity": "undefined"
271
+ }
272
+ },
273
+ {
274
+ "id": "snyk:lic:npm:denque:Apache-2.0",
275
+ "shortDescription": {
276
+ "text": "High severity - Apache-2.0 license vulnerability in denque"
277
+ },
278
+ "fullDescription": {
279
+ "text": "denque@1.5.1"
280
+ },
281
+ "help": {
282
+ "text": "",
283
+ "markdown": "* Package Manager: npm\n* Module: denque\n* Introduced through: npm-goof@0.0.1, mongodb@4.0.0 and others\n### Detailed paths\n* _Introduced through_: npm-goof@0.0.1 › mongodb@4.0.0 › denque@1.5.1\nApache-2.0 license"
284
+ },
285
+ "properties": {
286
+ "tags": [
287
+ "security",
288
+ "npm"
289
+ ],
290
+ "security-severity": "undefined"
291
+ }
292
+ },
293
+ {
294
+ "id": "snyk:lic:npm:mongodb-connection-string-url:Apache-2.0",
295
+ "shortDescription": {
296
+ "text": "High severity - Apache-2.0 license vulnerability in mongodb-connection-string-url"
297
+ },
298
+ "fullDescription": {
299
+ "text": "mongodb-connection-string-url@1.1.2"
300
+ },
301
+ "help": {
302
+ "text": "",
303
+ "markdown": "* Package Manager: npm\n* Module: mongodb-connection-string-url\n* Introduced through: npm-goof@0.0.1, mongodb@4.0.0 and others\n### Detailed paths\n* _Introduced through_: npm-goof@0.0.1 › mongodb@4.0.0 › mongodb-connection-string-url@1.1.2\nApache-2.0 license"
304
+ },
305
+ "properties": {
306
+ "tags": [
307
+ "security",
308
+ "npm"
309
+ ],
310
+ "security-severity": "undefined"
311
+ }
312
+ }
313
+ ]
314
+ }
315
+ },
316
+ "results": [
317
+ {
318
+ "ruleId": "SNYK-JS-BODYPARSER-7926860",
319
+ "level": "error",
320
+ "message": {
321
+ "text": "This file introduces a vulnerable body-parser package with a high severity vulnerability."
322
+ },
323
+ "locations": [
324
+ {
325
+ "physicalLocation": {
326
+ "artifactLocation": {
327
+ "uri": "package.json"
328
+ },
329
+ "region": {
330
+ "startLine": 1
331
+ }
332
+ },
333
+ "logicalLocations": [
334
+ {
335
+ "fullyQualifiedName": "body-parser@1.19.0"
336
+ }
337
+ ]
338
+ }
339
+ ],
340
+ "fixes": [
341
+ {
342
+ "description": {
343
+ "text": "Upgrade to body-parser@1.20.3"
344
+ },
345
+ "artifactChanges": [
346
+ {
347
+ "artifactLocation": {
348
+ "uri": "package.json"
349
+ },
350
+ "replacements": [
351
+ {
352
+ "deletedRegion": {
353
+ "startLine": 1
354
+ },
355
+ "insertedContent": {
356
+ "text": "body-parser@1.20.3"
357
+ }
358
+ }
359
+ ]
360
+ }
361
+ ]
362
+ }
363
+ ]
364
+ },
365
+ {
366
+ "ruleId": "SNYK-JS-COOKIE-8163060",
367
+ "level": "warning",
368
+ "message": {
369
+ "text": "This file introduces a vulnerable cookie package with a medium severity vulnerability."
370
+ },
371
+ "locations": [
372
+ {
373
+ "physicalLocation": {
374
+ "artifactLocation": {
375
+ "uri": "package.json"
376
+ },
377
+ "region": {
378
+ "startLine": 1
379
+ }
380
+ },
381
+ "logicalLocations": [
382
+ {
383
+ "fullyQualifiedName": "cookie@0.4.0"
384
+ }
385
+ ]
386
+ }
387
+ ],
388
+ "fixes": [
389
+ {
390
+ "description": {
391
+ "text": "Upgrade to express@4.21.1"
392
+ },
393
+ "artifactChanges": [
394
+ {
395
+ "artifactLocation": {
396
+ "uri": "package.json"
397
+ },
398
+ "replacements": [
399
+ {
400
+ "deletedRegion": {
401
+ "startLine": 1
402
+ },
403
+ "insertedContent": {
404
+ "text": "express@4.21.1"
405
+ }
406
+ }
407
+ ]
408
+ }
409
+ ]
410
+ }
411
+ ]
412
+ },
413
+ {
414
+ "ruleId": "SNYK-JS-EXPRESS-6474509",
415
+ "level": "warning",
416
+ "message": {
417
+ "text": "This file introduces a vulnerable express package with a medium severity vulnerability."
418
+ },
419
+ "locations": [
420
+ {
421
+ "physicalLocation": {
422
+ "artifactLocation": {
423
+ "uri": "package.json"
424
+ },
425
+ "region": {
426
+ "startLine": 1
427
+ }
428
+ },
429
+ "logicalLocations": [
430
+ {
431
+ "fullyQualifiedName": "express@4.17.1"
432
+ }
433
+ ]
434
+ }
435
+ ],
436
+ "fixes": [
437
+ {
438
+ "description": {
439
+ "text": "Upgrade to express@4.19.2"
440
+ },
441
+ "artifactChanges": [
442
+ {
443
+ "artifactLocation": {
444
+ "uri": "package.json"
445
+ },
446
+ "replacements": [
447
+ {
448
+ "deletedRegion": {
449
+ "startLine": 1
450
+ },
451
+ "insertedContent": {
452
+ "text": "express@4.19.2"
453
+ }
454
+ }
455
+ ]
456
+ }
457
+ ]
458
+ }
459
+ ]
460
+ },
461
+ {
462
+ "ruleId": "SNYK-JS-EXPRESS-7926867",
463
+ "level": "warning",
464
+ "message": {
465
+ "text": "This file introduces a vulnerable express package with a medium severity vulnerability."
466
+ },
467
+ "locations": [
468
+ {
469
+ "physicalLocation": {
470
+ "artifactLocation": {
471
+ "uri": "package.json"
472
+ },
473
+ "region": {
474
+ "startLine": 1
475
+ }
476
+ },
477
+ "logicalLocations": [
478
+ {
479
+ "fullyQualifiedName": "express@4.17.1"
480
+ }
481
+ ]
482
+ }
483
+ ],
484
+ "fixes": [
485
+ {
486
+ "description": {
487
+ "text": "Upgrade to express@4.20.0"
488
+ },
489
+ "artifactChanges": [
490
+ {
491
+ "artifactLocation": {
492
+ "uri": "package.json"
493
+ },
494
+ "replacements": [
495
+ {
496
+ "deletedRegion": {
497
+ "startLine": 1
498
+ },
499
+ "insertedContent": {
500
+ "text": "express@4.20.0"
501
+ }
502
+ }
503
+ ]
504
+ }
505
+ ]
506
+ }
507
+ ]
508
+ },
509
+ {
510
+ "ruleId": "SNYK-JS-MONGODB-5871303",
511
+ "level": "warning",
512
+ "message": {
513
+ "text": "This file introduces a vulnerable mongodb package with a medium severity vulnerability."
514
+ },
515
+ "locations": [
516
+ {
517
+ "physicalLocation": {
518
+ "artifactLocation": {
519
+ "uri": "package.json"
520
+ },
521
+ "region": {
522
+ "startLine": 1
523
+ }
524
+ },
525
+ "logicalLocations": [
526
+ {
527
+ "fullyQualifiedName": "mongodb@4.0.0"
528
+ }
529
+ ]
530
+ }
531
+ ],
532
+ "fixes": [
533
+ {
534
+ "description": {
535
+ "text": "Upgrade to mongodb@4.17.0"
536
+ },
537
+ "artifactChanges": [
538
+ {
539
+ "artifactLocation": {
540
+ "uri": "package.json"
541
+ },
542
+ "replacements": [
543
+ {
544
+ "deletedRegion": {
545
+ "startLine": 1
546
+ },
547
+ "insertedContent": {
548
+ "text": "mongodb@4.17.0"
549
+ }
550
+ }
551
+ ]
552
+ }
553
+ ]
554
+ }
555
+ ]
556
+ },
557
+ {
558
+ "ruleId": "snyk:lic:npm:mongodb:Apache-2.0",
559
+ "level": "error",
560
+ "message": {
561
+ "text": "This file introduces a vulnerable mongodb package with a high severity vulnerability."
562
+ },
563
+ "locations": [
564
+ {
565
+ "physicalLocation": {
566
+ "artifactLocation": {
567
+ "uri": "package.json"
568
+ },
569
+ "region": {
570
+ "startLine": 1
571
+ }
572
+ },
573
+ "logicalLocations": [
574
+ {
575
+ "fullyQualifiedName": "mongodb@4.0.0"
576
+ }
577
+ ]
578
+ }
579
+ ]
580
+ },
581
+ {
582
+ "ruleId": "SNYK-JS-PATHTOREGEXP-7925106",
583
+ "level": "warning",
584
+ "message": {
585
+ "text": "This file introduces a vulnerable path-to-regexp package with a medium severity vulnerability."
586
+ },
587
+ "locations": [
588
+ {
589
+ "physicalLocation": {
590
+ "artifactLocation": {
591
+ "uri": "package.json"
592
+ },
593
+ "region": {
594
+ "startLine": 1
595
+ }
596
+ },
597
+ "logicalLocations": [
598
+ {
599
+ "fullyQualifiedName": "path-to-regexp@0.1.7"
600
+ }
601
+ ]
602
+ }
603
+ ],
604
+ "fixes": [
605
+ {
606
+ "description": {
607
+ "text": "Upgrade to express@4.20.0"
608
+ },
609
+ "artifactChanges": [
610
+ {
611
+ "artifactLocation": {
612
+ "uri": "package.json"
613
+ },
614
+ "replacements": [
615
+ {
616
+ "deletedRegion": {
617
+ "startLine": 1
618
+ },
619
+ "insertedContent": {
620
+ "text": "express@4.20.0"
621
+ }
622
+ }
623
+ ]
624
+ }
625
+ ]
626
+ }
627
+ ]
628
+ },
629
+ {
630
+ "ruleId": "SNYK-JS-PATHTOREGEXP-8482416",
631
+ "level": "warning",
632
+ "message": {
633
+ "text": "This file introduces a vulnerable path-to-regexp package with a medium severity vulnerability."
634
+ },
635
+ "locations": [
636
+ {
637
+ "physicalLocation": {
638
+ "artifactLocation": {
639
+ "uri": "package.json"
640
+ },
641
+ "region": {
642
+ "startLine": 1
643
+ }
644
+ },
645
+ "logicalLocations": [
646
+ {
647
+ "fullyQualifiedName": "path-to-regexp@0.1.7"
648
+ }
649
+ ]
650
+ }
651
+ ],
652
+ "fixes": [
653
+ {
654
+ "description": {
655
+ "text": "Upgrade to express@4.21.2"
656
+ },
657
+ "artifactChanges": [
658
+ {
659
+ "artifactLocation": {
660
+ "uri": "package.json"
661
+ },
662
+ "replacements": [
663
+ {
664
+ "deletedRegion": {
665
+ "startLine": 1
666
+ },
667
+ "insertedContent": {
668
+ "text": "express@4.21.2"
669
+ }
670
+ }
671
+ ]
672
+ }
673
+ ]
674
+ }
675
+ ]
676
+ },
677
+ {
678
+ "ruleId": "SNYK-JS-QS-3153490",
679
+ "level": "error",
680
+ "message": {
681
+ "text": "This file introduces a vulnerable qs package with a high severity vulnerability."
682
+ },
683
+ "locations": [
684
+ {
685
+ "physicalLocation": {
686
+ "artifactLocation": {
687
+ "uri": "package.json"
688
+ },
689
+ "region": {
690
+ "startLine": 1
691
+ }
692
+ },
693
+ "logicalLocations": [
694
+ {
695
+ "fullyQualifiedName": "qs@6.7.0"
696
+ }
697
+ ]
698
+ }
699
+ ],
700
+ "fixes": [
701
+ {
702
+ "description": {
703
+ "text": "Upgrade to body-parser@1.19.2"
704
+ },
705
+ "artifactChanges": [
706
+ {
707
+ "artifactLocation": {
708
+ "uri": "package.json"
709
+ },
710
+ "replacements": [
711
+ {
712
+ "deletedRegion": {
713
+ "startLine": 1
714
+ },
715
+ "insertedContent": {
716
+ "text": "body-parser@1.19.2"
717
+ }
718
+ }
719
+ ]
720
+ }
721
+ ]
722
+ }
723
+ ]
724
+ },
725
+ {
726
+ "ruleId": "SNYK-JS-SEND-7926862",
727
+ "level": "note",
728
+ "message": {
729
+ "text": "This file introduces a vulnerable send package with a low severity vulnerability."
730
+ },
731
+ "locations": [
732
+ {
733
+ "physicalLocation": {
734
+ "artifactLocation": {
735
+ "uri": "package.json"
736
+ },
737
+ "region": {
738
+ "startLine": 1
739
+ }
740
+ },
741
+ "logicalLocations": [
742
+ {
743
+ "fullyQualifiedName": "send@0.17.1"
744
+ }
745
+ ]
746
+ }
747
+ ],
748
+ "fixes": [
749
+ {
750
+ "description": {
751
+ "text": "Upgrade to express@4.20.0"
752
+ },
753
+ "artifactChanges": [
754
+ {
755
+ "artifactLocation": {
756
+ "uri": "package.json"
757
+ },
758
+ "replacements": [
759
+ {
760
+ "deletedRegion": {
761
+ "startLine": 1
762
+ },
763
+ "insertedContent": {
764
+ "text": "express@4.20.0"
765
+ }
766
+ }
767
+ ]
768
+ }
769
+ ]
770
+ }
771
+ ]
772
+ },
773
+ {
774
+ "ruleId": "SNYK-JS-SERVESTATIC-7926865",
775
+ "level": "note",
776
+ "message": {
777
+ "text": "This file introduces a vulnerable serve-static package with a low severity vulnerability."
778
+ },
779
+ "locations": [
780
+ {
781
+ "physicalLocation": {
782
+ "artifactLocation": {
783
+ "uri": "package.json"
784
+ },
785
+ "region": {
786
+ "startLine": 1
787
+ }
788
+ },
789
+ "logicalLocations": [
790
+ {
791
+ "fullyQualifiedName": "serve-static@1.14.1"
792
+ }
793
+ ]
794
+ }
795
+ ],
796
+ "fixes": [
797
+ {
798
+ "description": {
799
+ "text": "Upgrade to express@4.20.0"
800
+ },
801
+ "artifactChanges": [
802
+ {
803
+ "artifactLocation": {
804
+ "uri": "package.json"
805
+ },
806
+ "replacements": [
807
+ {
808
+ "deletedRegion": {
809
+ "startLine": 1
810
+ },
811
+ "insertedContent": {
812
+ "text": "express@4.20.0"
813
+ }
814
+ }
815
+ ]
816
+ }
817
+ ]
818
+ }
819
+ ]
820
+ },
821
+ {
822
+ "ruleId": "snyk:lic:npm:bson:Apache-2.0",
823
+ "level": "error",
824
+ "message": {
825
+ "text": "This file introduces a vulnerable bson package with a high severity vulnerability."
826
+ },
827
+ "locations": [
828
+ {
829
+ "physicalLocation": {
830
+ "artifactLocation": {
831
+ "uri": "package.json"
832
+ },
833
+ "region": {
834
+ "startLine": 1
835
+ }
836
+ },
837
+ "logicalLocations": [
838
+ {
839
+ "fullyQualifiedName": "bson@4.7.2"
840
+ }
841
+ ]
842
+ }
843
+ ]
844
+ },
845
+ {
846
+ "ruleId": "snyk:lic:npm:denque:Apache-2.0",
847
+ "level": "error",
848
+ "message": {
849
+ "text": "This file introduces a vulnerable denque package with a high severity vulnerability."
850
+ },
851
+ "locations": [
852
+ {
853
+ "physicalLocation": {
854
+ "artifactLocation": {
855
+ "uri": "package.json"
856
+ },
857
+ "region": {
858
+ "startLine": 1
859
+ }
860
+ },
861
+ "logicalLocations": [
862
+ {
863
+ "fullyQualifiedName": "denque@1.5.1"
864
+ }
865
+ ]
866
+ }
867
+ ]
868
+ },
869
+ {
870
+ "ruleId": "snyk:lic:npm:mongodb-connection-string-url:Apache-2.0",
871
+ "level": "error",
872
+ "message": {
873
+ "text": "This file introduces a vulnerable mongodb-connection-string-url package with a high severity vulnerability."
874
+ },
875
+ "locations": [
876
+ {
877
+ "physicalLocation": {
878
+ "artifactLocation": {
879
+ "uri": "package.json"
880
+ },
881
+ "region": {
882
+ "startLine": 1
883
+ }
884
+ },
885
+ "logicalLocations": [
886
+ {
887
+ "fullyQualifiedName": "mongodb-connection-string-url@1.1.2"
888
+ }
889
+ ]
890
+ }
891
+ ]
892
+ }
893
+ ]
894
+ }
895
+ ]
896
+ }