endpointlabs / VulnerableDotNetCore3Project

.Net Core 3.0
0 stars 0 forks source link

Errors unhandled. (CWE-703) #99

Open uerkut opened 1 year ago

uerkut commented 1 year ago

A low severity vulnerability has been discovered in your project.

Project Name: LW1

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/kolumba/kolumba.go

Line: 162

Code:

-157 -          buf.WriteString(fmt.Sprintf("%s: %s\r\n", header.Key, header.Value))
-158 -      }
-159 -  }
-160 - 
-161 -  h := sha1.New()
*162 -  h.Write([]byte(strconv.Itoa(int(time.Now().UnixNano()))))
-163 -  boundary := fmt.Sprintf("%x", h.Sum(nil))
-164 - 
-165 -  if len(mail.Attachments) > 0 {
-166 -      buf.WriteString("Content-Type: multipart/mixed; boundary=" + boundary + "\r\n")
-167 -      buf.WriteString("\r\n--" + boundary + "\r\n")


Language: go

Tool Description: Errors unhandled.

Custom Description: test

Kondukto Link: http://localhost:8081/projects/6474356bab04dc78a96a5e5d/vulns/appsec?page=1&perPage=15&id=in:6475bbfa51474a603dcc1e5e Deeplink: https://cwe.mitre.org/data/definitions/703.html