endpointlabs / VulnerableDotNetCore3Project

.Net Core 3.0
0 stars 0 forks source link

Errors unhandled. (CWE-703) #53

Open cbilgin23 opened 2 years ago

cbilgin23 commented 2 years ago

Due Date: 2022-10-20

A low severity vulnerability has been discovered in your project.

Project Name: twrap-go

Scanner Name: gosec

Cwe ID: 703

Cwe Name: Improper Check or Handling of Exceptional Conditions

Cwe Link: https://cwe.mitre.org/data/definitions/703.html

File: pkg/scanner/sast_coverity.go

Line: 119

Code:

-114 -      logger.Log.Debug("no ALM setting found, enable ALM to get detailed committer info")
-115 -      return nil
-116 -  }
-117 - 
-118 -  h := sha256.New()
*119 -  h.Write([]byte(strconv.FormatInt(time.Now().UnixNano(), 10)))
-120 -  hash := fmt.Sprintf("%x", h.Sum(nil))
-121 -  if hash == "" {
-122 -      return errors.New("failed to create hash for directory path")
-123 -  }
-124 - 
-125 -  c.Dir = filepath.Join(common.DirScannerTmp(domain.ToolCoverity), hash)


Language: go

Commit Author: Asaf G

Commit Link: (https://github.com/endpointlabs/twrap-go/commit/e0e7705ba600bb0168a73927405d2a35e5137454)

Tool Description: Errors unhandled.

Custom Description: test

Kondukto Link: http://79.kondukto.local/projects/634fe837a5be8478724352c4/vulns/appsec?page=1&perPage=15&id=in:6350011ade2a84ccb325bc69 Deeplink: https://cwe.mitre.org/data/definitions/703.html