Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Code Security Report: 3 high severity findings, 5 total findings #112

Open
1 task
mend-for-github-com bot opened this issue Jul 18, 2024 · 0 comments
Open
1 task
Labels
Mend: code security findings Code security findings detected by Mend

Comments

@mend-for-github-com
Copy link

Code Security Report

Scan Metadata

Latest Scan: 2024-07-18 09:14pm
Total Findings: 5 | New Findings: 0 | Resolved Findings: 0
Tested Project Files: 24
Detected Programming Languages: 2 (Go, JavaScript / TypeScript*)

  • Check this box to manually trigger a scan

Finding Details

SeverityVulnerability TypeCWEFileData FlowsDate
HighInsecure Directory Permissions

CWE-732

node.go:61

12024-07-18 09:14pm
Vulnerable Code

runPath: fmt.Sprintf("/var/run/%s", common.PluginName),
nodeName: envNodeName,
nodeIP: nodeIP,
}
if err := os.MkdirAll(node.runPath, 0755); err != nil {

1 Data Flow/s detected

if err := os.MkdirAll(node.runPath, 0755); err != nil {

Secure Code Warrior Training Material
 
HighInsecure Directory Permissions

CWE-732

storageService.go:264

12024-07-18 09:14pm
Vulnerable Code

out, err := exec.Command("findmnt", "--output", "TARGET", "--noheadings", path).Output()
mountpoints := strings.Split(strings.Trim(string(out), "\n"), "\n")
if err != nil || len(mountpoints) == 0 {
klog.V(1).InfoS("mount", "command", fmt.Sprintf("mount -t %s %s %s", fsType, path, req.GetTargetPath()))
os.Mkdir(req.GetTargetPath(), 00755)

1 Data Flow/s detected

os.Mkdir(req.GetTargetPath(), 00755)

Secure Code Warrior Training Material
 
HighInsecure Directory Permissions

CWE-732

controller.go:79

12024-07-18 09:14pm
Vulnerable Code

client: client,
runPath: fmt.Sprintf("/var/run/%s", common.PluginName),
nodeServiceClients: map[string]*grpc.ClientConn{},
}
if err := os.MkdirAll(controller.runPath, 0755); err != nil {

1 Data Flow/s detected

if err := os.MkdirAll(controller.runPath, 0755); err != nil {

Secure Code Warrior Training Material
 
MediumHeap Inspection

CWE-244

driver.go:75

12024-07-18 09:14pm
Vulnerable Code

GetSecrets() map[string]string

Secure Code Warrior Training Material
 
LowLog Forging

CWE-117

testapp.js:11

12024-07-18 09:14pm
Vulnerable Code

const os = require('os');
console.log("[] testapp server starting...");
var handler = function(request, response) {
console.log(" Received request from (" + request.connection.remoteAddress + ")");

1 Data Flow/s detected

var www = http.createServer(handler);

var handler = function(request, response) {

console.log(" Received request from (" + request.connection.remoteAddress + ")");

Secure Code Warrior Training Material

● Training

   ▪ Secure Code Warrior Log Forging Training

● Videos

   ▪ Secure Code Warrior Log Forging Video

● Further Reading

   ▪ OWASP Log Forging

@mend-for-github-com mend-for-github-com bot added the Mend: code security findings Code security findings detected by Mend label Jul 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Mend: code security findings Code security findings detected by Mend
Projects
None yet
Development

No branches or pull requests

0 participants