-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Labels
Veracode Policy ScanA Veracode Flaw found during a Policy or Sandbox ScanA Veracode Flaw found during a Policy or Sandbox ScanVeracodeFlaw: MediumA Veracode Flaw, Medium severityA Veracode Flaw, Medium severity
Description
Lines 21 to 31 in 3d38a70
| log.Println(err.Error()) | |
| } | |
| } | |
| func RenderAsJson(w http.ResponseWriter, data ...interface{}) { | |
| w.Header().Set("Access-Control-Allow-Origin", "*") | |
| w.Header().Set("Access-Control-Allow-Credentials", "true") | |
| w.Header().Set("Access-Control-Allow-Methods", "POST, GET") | |
| w.Header().Set("Content-Type", "application/json") | |
| b, err := json.Marshal(data) | |
| if err != nil { |
Filename: template.go
Line: 26
CWE: 346 (Origin Validation Error ('Authorization Issues'))
Not restricting access to web resources, opens it up for attackers to inadvertently access restricted resources. An application should always check the origin of a request to be coming from a trusted source, before serving it. Please restrict the allowed domains which can access this resource. References: CWE 346/nDon't know how to fix this? Don't know why this was reported?
Get Assistance from Veracode
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Veracode Policy ScanA Veracode Flaw found during a Policy or Sandbox ScanA Veracode Flaw found during a Policy or Sandbox ScanVeracodeFlaw: MediumA Veracode Flaw, Medium severityA Veracode Flaw, Medium severity