Skip to content

Add snyk container scan workflow - #147

Open
pwalsh-snyk wants to merge 6 commits into
dylansnyk:mainfrom
pwalsh-snyk:add-snyk-container-scan-workflow
Open

Add snyk container scan workflow#147
pwalsh-snyk wants to merge 6 commits into
dylansnyk:mainfrom
pwalsh-snyk:add-snyk-container-scan-workflow

Conversation

@pwalsh-snyk

Copy link
Copy Markdown

No description provided.

@dylansnyk

dylansnyk commented Jul 29, 2025

Copy link
Copy Markdown
Owner

Snyk checks have failed. 5 issues have been found so far.

Icon Severity Issues
Critical 0
High 5
Medium 0
Low 0

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.

@dylansnyk

dylansnyk commented Jul 29, 2025

Copy link
Copy Markdown
Owner

🎉 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)

@dylansnyk

dylansnyk commented Jul 29, 2025

Copy link
Copy Markdown
Owner

Snyk checks have failed. 6 issues have been found so far.

Icon Severity Issues
Critical 0
High 6
Medium 0
Low 0

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.

Comment thread app.js
if (err) return res.status(500).send(err);


cp.exec(`node ${uploadPath}`, (error, stdout, stderr) => {

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  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

let uploadedFile = req.files.file;

Step 6 - 10 app.js#L70

Step 11 - 13

cp.exec(`node ${uploadPath}`, (error, stdout, stderr) => {

⚡ Fix this issue by replying with the following command: @snyk /fix

Comment thread app.js
name: 'connect.sid',
cookie: { path: '/' }
}))
cookie: { path: '/', httpOnly: false, secure: false }

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  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
Data flow: 2 steps

Step 1 - 2

cookie: { path: '/', httpOnly: false, secure: false }

⚡ Fix this issue by replying with the following command: @snyk /fix

Comment thread app.js

// **Save the file without validating its type**
uploadedFile.mv(uploadPath, function (err) {
if (err) return res.status(500).send(err);

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  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

let uploadedFile = req.files.file;

Step 6 - 7 app.js#L73

Step 8 - 9

if (err) return res.status(500).send(err);

⚡ Fix this issue by replying with the following command: @snyk /fix

Comment thread app.js
let username = req.query.username || 'Guest';


res.send(`<h1>Welcome, ${username}</h1><script>alert('XSS!');</script>`);

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  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
Data flow: 10 steps

Step 1 - 7

let username = req.query.username || 'Guest';

Step 8 - 10

res.send(`<h1>Welcome, ${username}</h1><script>alert('XSS!');</script>`);

⚡ Fix this issue by replying with the following command: @snyk /fix

Comment thread app.js
let uploadPath = './uploads/' + uploadedFile.name;

// **Save the file without validating its type**
uploadedFile.mv(uploadPath, function (err) {

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  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

let uploadedFile = req.files.file;

Step 6 - 10 app.js#L70

Step 11 - 12

uploadedFile.mv(uploadPath, function (err) {

⚡ Fix this issue by replying with the following command: @snyk /fix

Comment thread app.js
let url = req.body.url;


require('http').get(url, (response) => {

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  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
Data flow: 7 steps

Step 1 - 5

let url = req.body.url;

Step 6 - 7

require('http').get(url, (response) => {

Comment thread app.js
if (err) return res.status(500).send(err);


cp.exec(`node ${uploadPath}`, (error, stdout, stderr) => {

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  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

let uploadedFile = req.files.file;

Step 6 - 10 app.js#L70

Step 11 - 13

cp.exec(`node ${uploadPath}`, (error, stdout, stderr) => {

Comment thread app.js

// **Save the file without validating its type**
uploadedFile.mv(uploadPath, function (err) {
if (err) return res.status(500).send(err);

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  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

let uploadedFile = req.files.file;

Step 6 - 7 app.js#L73

Step 8 - 9

if (err) return res.status(500).send(err);

Comment thread app.js
let username = req.query.username || 'Guest';


res.send(`<h1>Welcome, ${username}</h1><script>alert('XSS!');</script>`);

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  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
Data flow: 10 steps

Step 1 - 7

let username = req.query.username || 'Guest';

Step 8 - 10

res.send(`<h1>Welcome, ${username}</h1><script>alert('XSS!');</script>`);

Comment thread app.js
let uploadPath = './uploads/' + uploadedFile.name;

// **Save the file without validating its type**
uploadedFile.mv(uploadPath, function (err) {

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  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

let uploadedFile = req.files.file;

Step 6 - 10 app.js#L70

Step 11 - 12

uploadedFile.mv(uploadPath, function (err) {

Comment thread app.js
let url = req.body.url;


require('http').get(url, (response) => {

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  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
Data flow: 7 steps

Step 1 - 5

let url = req.body.url;

Step 6 - 7

require('http').get(url, (response) => {

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants