Skip to content

Code Security Report: 10 high severity findings, 15 total findings [master] #1

@mend-for-github-com

Description

@mend-for-github-com

Code Security Report

Scan Metadata

Latest Scan: 2026-04-08 07:28am
Total Findings: 15 | New Findings: 0 | Resolved Findings: 0
Tested Project Files: 51
Detected Programming Languages: 1 (JavaScript / TypeScript*)

  • Check this box to manually trigger a scan

Note: GitHub may take a few seconds to process actions triggered via checkboxes.
Please wait until the change is visible before continuing.

Most Relevant Findings

The list below presents the 10 most relevant findings that need your attention. To view information on the remaining findings, navigate to the Mend Application.

SeverityVulnerability TypeCWEFileData FlowsDetected
HighCode Injection

CWE-94

contributions.js:32

12026-04-08 07:28am
Vulnerable Code

this.handleContributionsUpdate = (req, res, next) => {
/*jslint evil: true */
// Insecure use of eval() to parse inputs
const preTax = eval(req.body.preTax);

1 Data Flow/s detected

app.post("/contributions", isLoggedIn, contributionsHandler.handleContributionsUpdate);

this.handleContributionsUpdate = (req, res, next) => {

const preTax = eval(req.body.preTax);

Secure Code Warrior Training Material

● Training

   ▪ Secure Code Warrior Code Injection Training

● Videos

   ▪ Secure Code Warrior Code Injection Video

● Further Reading

   ▪ OWASP Command Injection

Suppress Finding
  • ... as False Alarm
  • ... as Acceptable Risk

Note: GitHub may take a few seconds to process actions triggered via checkboxes.
Please wait until the change is visible before continuing.

 
HighNoSQL Injection

CWE-943

user-dao.js:91

12026-04-08 07:28am
Vulnerable Code

noSuchUserError.noSuchUser = true;
callback(noSuchUserError, null);
}
};
usersCol.findOne({

1 Data Flow/s detected

app.post("/login", sessionHandler.handleLoginRequest);

this.handleLoginRequest = (req, res, next) => {

userDAO.validateLogin(userName, password, (err, user) => {

this.validateLogin = (userName, password, callback) => {

Secure Code Warrior Training Material

● Training

   ▪ Secure Code Warrior NoSQL Injection Training

● Videos

   ▪ Secure Code Warrior NoSQL Injection Video

Suppress Finding
  • ... as False Alarm
  • ... as Acceptable Risk

Note: GitHub may take a few seconds to process actions triggered via checkboxes.
Please wait until the change is visible before continuing.

 
HighServer Side Request Forgery

CWE-918

research.js:16

12026-04-08 07:28am
Vulnerable Code

this.displayResearch = (req, res) => {
if (req.query.symbol) {
const url = req.query.url + req.query.symbol;
return needle.get(url, (error, newResponse, body) => {

1 Data Flow/s detected

app.get("/research", isLoggedIn, researchHandler.displayResearch);

this.displayResearch = (req, res) => {

const url = req.query.url + req.query.symbol;

return needle.get(url, (error, newResponse, body) => {

Secure Code Warrior Training Material

● Training

   ▪ Secure Code Warrior Server Side Request Forgery Training

● Videos

   ▪ Secure Code Warrior Server Side Request Forgery Video

Suppress Finding
  • ... as False Alarm
  • ... as Acceptable Risk

Note: GitHub may take a few seconds to process actions triggered via checkboxes.
Please wait until the change is visible before continuing.

 
HighNoSQL Injection

CWE-943

user-dao.js:104

12026-04-08 07:28am
Vulnerable Code

_id: parseInt(userId)
}, callback);
};
this.getUserByUserName = (userName, callback) => {
usersCol.findOne({

1 Data Flow/s detected

app.post("/signup", sessionHandler.handleSignup);

this.handleSignup = (req, res, next) => {

userDAO.getUserByUserName(userName, (err, user) => {

this.getUserByUserName = (userName, callback) => {

Secure Code Warrior Training Material

● Training

   ▪ Secure Code Warrior NoSQL Injection Training

● Videos

   ▪ Secure Code Warrior NoSQL Injection Video

Suppress Finding
  • ... as False Alarm
  • ... as Acceptable Risk

Note: GitHub may take a few seconds to process actions triggered via checkboxes.
Please wait until the change is visible before continuing.

 
HighCode Injection

CWE-94

contributions.js:33

12026-04-08 07:28am
Vulnerable Code

this.handleContributionsUpdate = (req, res, next) => {
/*jslint evil: true */
// Insecure use of eval() to parse inputs
const preTax = eval(req.body.preTax);
const afterTax = eval(req.body.afterTax);

1 Data Flow/s detected

app.post("/contributions", isLoggedIn, contributionsHandler.handleContributionsUpdate);

this.handleContributionsUpdate = (req, res, next) => {

const afterTax = eval(req.body.afterTax);

Secure Code Warrior Training Material

● Training

   ▪ Secure Code Warrior Code Injection Training

● Videos

   ▪ Secure Code Warrior Code Injection Video

● Further Reading

   ▪ OWASP Command Injection

Suppress Finding
  • ... as False Alarm
  • ... as Acceptable Risk

Note: GitHub may take a few seconds to process actions triggered via checkboxes.
Please wait until the change is visible before continuing.

 
HighNoSQL Injection

CWE-943

memos-dao.js:23

12026-04-08 07:28am
Vulnerable Code

const memos = {
memo,
timestamp: new Date()
};
memosCol.insert(memos, (err, result) => !err ? callback(null, result) : callback(err, null));

1 Data Flow/s detected

app.post("/memos", isLoggedIn, memosHandler.addMemos);

this.addMemos = (req, res, next) => {

memosDAO.insert(req.body.memo, (err, docs) => {

this.insert = (memo, callback) => {

memosCol.insert(memos, (err, result) => !err ? callback(null, result) : callback(err, null));

Secure Code Warrior Training Material

● Training

   ▪ Secure Code Warrior NoSQL Injection Training

● Videos

   ▪ Secure Code Warrior NoSQL Injection Video

Suppress Finding
  • ... as False Alarm
  • ... as Acceptable Risk

Note: GitHub may take a few seconds to process actions triggered via checkboxes.
Please wait until the change is visible before continuing.

 
HighNoSQL Injection

CWE-943

allocations-dao.js:86

12026-04-08 07:28am
Vulnerable Code

return {
userId: parsedUserId
};
};
allocationsCol.find(searchCriteria()).toArray((err, allocations) => {

1 Data Flow/s detected

app.get("/allocations/:userId", isLoggedIn, allocationsHandler.displayAllocations);

this.displayAllocations = (req, res, next) => {

allocationsDAO.getByUserIdAndThreshold(userId, threshold, (err, allocations) => {

this.getByUserIdAndThreshold = (userId, threshold, callback) => {

allocationsCol.find(searchCriteria()).toArray((err, allocations) => {

const searchCriteria = () => {

$where: `this.userId == ${parsedUserId} && this.stocks > '${threshold}'`

allocationsCol.find(searchCriteria()).toArray((err, allocations) => {

Secure Code Warrior Training Material

● Training

   ▪ Secure Code Warrior NoSQL Injection Training

● Videos

   ▪ Secure Code Warrior NoSQL Injection Video

Suppress Finding
  • ... as False Alarm
  • ... as Acceptable Risk

Note: GitHub may take a few seconds to process actions triggered via checkboxes.
Please wait until the change is visible before continuing.

 
HighCode Injection

CWE-94

profile.js:65

72026-04-08 07:28am
Vulnerable Code

// Allow only numbers with a suffix of the letter #, for example: 'XXXXXX#'
const testComplyWithRequirements = regexPattern.test(bankRouting);
// if the regex test fails we do not allow saving
if (testComplyWithRequirements !== true) {
const firstNameSafeString = firstName;
return res.render("profile", {

7 Data Flow/s detected
View Data Flow 1

app.post("/profile", isLoggedIn, profileHandler.handleProfileUpdate);

this.handleProfileUpdate = (req, res, next) => {

return res.render("profile", {

View Data Flow 2

app.post("/profile", isLoggedIn, profileHandler.handleProfileUpdate);

this.handleProfileUpdate = (req, res, next) => {

return res.render("profile", {

View Data Flow 3

app.post("/profile", isLoggedIn, profileHandler.handleProfileUpdate);

this.handleProfileUpdate = (req, res, next) => {

return res.render("profile", {

View more Data Flows

Secure Code Warrior Training Material

● Training

   ▪ Secure Code Warrior Code Injection Training

● Videos

   ▪ Secure Code Warrior Code Injection Video

● Further Reading

   ▪ OWASP Command Injection

Suppress Finding
  • ... as False Alarm
  • ... as Acceptable Risk

Note: GitHub may take a few seconds to process actions triggered via checkboxes.
Please wait until the change is visible before continuing.

 
HighCode Injection

CWE-94

contributions.js:34

12026-04-08 07:28am
Vulnerable Code

/*jslint evil: true */
// Insecure use of eval() to parse inputs
const preTax = eval(req.body.preTax);
const afterTax = eval(req.body.afterTax);
const roth = eval(req.body.roth);

1 Data Flow/s detected

app.post("/contributions", isLoggedIn, contributionsHandler.handleContributionsUpdate);

this.handleContributionsUpdate = (req, res, next) => {

const roth = eval(req.body.roth);

Secure Code Warrior Training Material

● Training

   ▪ Secure Code Warrior Code Injection Training

● Videos

   ▪ Secure Code Warrior Code Injection Video

● Further Reading

   ▪ OWASP Command Injection

Suppress Finding
  • ... as False Alarm
  • ... as Acceptable Risk

Note: GitHub may take a few seconds to process actions triggered via checkboxes.
Please wait until the change is visible before continuing.

 
HighCode Injection

CWE-94

error.js:10

12026-04-08 07:28am
Vulnerable Code

"use strict";
console.error(err.message);
console.error(err.stack);
res.status(500);
res.render("error-template", {

1 Data Flow/s detected

app.use(ErrorHandler);

const errorHandler = (err, req, res,next) => {

res.render("error-template", {

Secure Code Warrior Training Material

● Training

   ▪ Secure Code Warrior Code Injection Training

● Videos

   ▪ Secure Code Warrior Code Injection Video

● Further Reading

   ▪ OWASP Command Injection

Suppress Finding
  • ... as False Alarm
  • ... as Acceptable Risk

Note: GitHub may take a few seconds to process actions triggered via checkboxes.
Please wait until the change is visible before continuing.

Findings Overview

Severity Vulnerability Type CWE Language Count
High Code Injection CWE-94 JavaScript / TypeScript* 5
High Server Side Request Forgery CWE-918 JavaScript / TypeScript* 1
High NoSQL Injection CWE-943 JavaScript / TypeScript* 4
Low Regex Denial of Service (ReDoS) CWE-1333 JavaScript / TypeScript* 1
Low Unvalidated/Open Redirect CWE-601 JavaScript / TypeScript* 1
Low Log Forging CWE-117 JavaScript / TypeScript* 2
Low Sensitive Cookie Without 'Secure' Attribute CWE-614 JavaScript / TypeScript* 1

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions