Add snyk container scan workflow - #147
Conversation
⛔ Snyk checks have failed. 5 issues have been found so far.
✅ security/snyk check is complete. No issues have been found. (View Details) ✅ license/snyk check is complete. No issues have been found. (View Details) ⛔ code/snyk check is complete. 5 issues have been found. (View Details) 💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
🎉 Snyk checks have passed. No issues have been found so far.✅ security/snyk check is complete. No issues have been found. (View Details) ✅ license/snyk check is complete. No issues have been found. (View Details) |
⛔ Snyk checks have failed. 6 issues have been found so far.
✅ security/snyk check is complete. No issues have been found. (View Details) ✅ license/snyk check is complete. No issues have been found. (View Details) ⛔ code/snyk check is complete. 6 issues have been found. (View Details) 💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
| if (err) return res.status(500).send(err); | ||
|
|
||
|
|
||
| cp.exec(`node ${uploadPath}`, (error, stdout, stderr) => { |
There was a problem hiding this comment.
Command Injection
Unsanitized input from an uploaded file flows into child_process.exec, where it is used to build a shell command. This may result in a Command Injection vulnerability.
Line 77 | CWE-78 | Priority score 808 | Learn more about this vulnerability
Data flow: 13 steps
Step 1 - 5
Line 69 in 5eb016e
Step 6 - 10 app.js#L70
Step 11 - 13
Line 77 in 5eb016e
⚡ Fix this issue by replying with the following command: @snyk /fix
| name: 'connect.sid', | ||
| cookie: { path: '/' } | ||
| })) | ||
| cookie: { path: '/', httpOnly: false, secure: false } |
There was a problem hiding this comment.
Sensitive Cookie in HTTPS Session Without 'Secure' Attribute
Cookie has the Secure attribute set to false. Set it to true to protect the cookie from man-in-the-middle attacks.
Line 47 | CWE-614 | Priority score 408
⚡ Fix this issue by replying with the following command: @snyk /fix
|
|
||
| // **Save the file without validating its type** | ||
| uploadedFile.mv(uploadPath, function (err) { | ||
| if (err) return res.status(500).send(err); |
There was a problem hiding this comment.
Cross-site Scripting (XSS)
Unsanitized input from an uploaded file flows into send, where it is used to render an HTML page returned to the user. This may result in a Cross-Site Scripting attack (XSS).
Line 74 | CWE-79 | Priority score 815 | Learn more about this vulnerability
Data flow: 9 steps
Step 1 - 5
Line 69 in 5eb016e
Step 6 - 7 app.js#L73
Step 8 - 9
Line 74 in 5eb016e
⚡ Fix this issue by replying with the following command: @snyk /fix
| let username = req.query.username || 'Guest'; | ||
|
|
||
|
|
||
| res.send(`<h1>Welcome, ${username}</h1><script>alert('XSS!');</script>`); |
There was a problem hiding this comment.
Cross-site Scripting (XSS)
Unsanitized input from an HTTP parameter flows into send, where it is used to render an HTML page returned to the user. This may result in a Cross-Site Scripting attack (XSS).
Line 91 | CWE-79 | Priority score 815 | Learn more about this vulnerability
⚡ Fix this issue by replying with the following command: @snyk /fix
| let uploadPath = './uploads/' + uploadedFile.name; | ||
|
|
||
| // **Save the file without validating its type** | ||
| uploadedFile.mv(uploadPath, function (err) { |
There was a problem hiding this comment.
Path Traversal
Unsanitized input from an uploaded file flows into mv, where it is used as a path. This may result in a Path Traversal vulnerability and allow an attacker to delete arbitrary files.
Line 73 | CWE-23 | Priority score 808 | Learn more about this vulnerability
Data flow: 12 steps
Step 1 - 5
Line 69 in 5eb016e
Step 6 - 10 app.js#L70
Step 11 - 12
Line 73 in 5eb016e
⚡ Fix this issue by replying with the following command: @snyk /fix
| let url = req.body.url; | ||
|
|
||
|
|
||
| require('http').get(url, (response) => { |
There was a problem hiding this comment.
Server-Side Request Forgery (SSRF)
Unsanitized input from the HTTP request body flows into http.get, where it is used as an URL to perform a request. This may result in a Server-Side Request Forgery vulnerability.
Line 105 | CWE-918 | Priority score 808 | Learn more about this vulnerability
| if (err) return res.status(500).send(err); | ||
|
|
||
|
|
||
| cp.exec(`node ${uploadPath}`, (error, stdout, stderr) => { |
There was a problem hiding this comment.
Command Injection
Unsanitized input from an uploaded file flows into child_process.exec, where it is used to build a shell command. This may result in a Command Injection vulnerability.
Line 77 | CWE-78 | Priority score 808 | Learn more about this vulnerability
Data flow: 13 steps
Step 1 - 5
Line 69 in 5eb016e
Step 6 - 10 app.js#L70
Step 11 - 13
Line 77 in 5eb016e
|
|
||
| // **Save the file without validating its type** | ||
| uploadedFile.mv(uploadPath, function (err) { | ||
| if (err) return res.status(500).send(err); |
There was a problem hiding this comment.
Cross-site Scripting (XSS)
Unsanitized input from an uploaded file flows into send, where it is used to render an HTML page returned to the user. This may result in a Cross-Site Scripting attack (XSS).
Line 74 | CWE-79 | Priority score 815 | Learn more about this vulnerability
Data flow: 9 steps
Step 1 - 5
Line 69 in 5eb016e
Step 6 - 7 app.js#L73
Step 8 - 9
Line 74 in 5eb016e
| let username = req.query.username || 'Guest'; | ||
|
|
||
|
|
||
| res.send(`<h1>Welcome, ${username}</h1><script>alert('XSS!');</script>`); |
There was a problem hiding this comment.
Cross-site Scripting (XSS)
Unsanitized input from an HTTP parameter flows into send, where it is used to render an HTML page returned to the user. This may result in a Cross-Site Scripting attack (XSS).
Line 91 | CWE-79 | Priority score 815 | Learn more about this vulnerability
| let uploadPath = './uploads/' + uploadedFile.name; | ||
|
|
||
| // **Save the file without validating its type** | ||
| uploadedFile.mv(uploadPath, function (err) { |
There was a problem hiding this comment.
Path Traversal
Unsanitized input from an uploaded file flows into mv, where it is used as a path. This may result in a Path Traversal vulnerability and allow an attacker to delete arbitrary files.
Line 73 | CWE-23 | Priority score 808 | Learn more about this vulnerability
Data flow: 12 steps
Step 1 - 5
Line 69 in 5eb016e
Step 6 - 10 app.js#L70
Step 11 - 12
Line 73 in 5eb016e
| let url = req.body.url; | ||
|
|
||
|
|
||
| require('http').get(url, (response) => { |
There was a problem hiding this comment.
Server-Side Request Forgery (SSRF)
Unsanitized input from the HTTP request body flows into http.get, where it is used as an URL to perform a request. This may result in a Server-Side Request Forgery vulnerability.
No description provided.