Created
April 4, 2023 06:57
-
-
Save AndrienkoAleksandr/e1c7399a2d9fbf5772915cffe47928d2 to your computer and use it in GitHub Desktop.
sprayproxy gosec scan result
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"Golang errors": {}, | |
"Issues": [ | |
{ | |
"severity": "HIGH", | |
"confidence": "HIGH", | |
"cwe": { | |
"id": "295", | |
"url": "https://cwe.mitre.org/data/definitions/295.html" | |
}, | |
"rule_id": "G402", | |
"details": "TLS InsecureSkipVerify set true.", | |
"file": "/Users/oandriie/projects/sprayproxy/pkg/proxy/proxy.go", | |
"code": "68: \t\t\tTLSClientConfig: \u0026tls.Config{\n69: \t\t\t\tInsecureSkipVerify: true,\n70: \t\t\t},\n", | |
"line": "69", | |
"column": "25", | |
"nosec": false, | |
"suppressions": null | |
}, | |
{ | |
"severity": "MEDIUM", | |
"confidence": "LOW", | |
"cwe": { | |
"id": "400", | |
"url": "https://cwe.mitre.org/data/definitions/400.html" | |
}, | |
"rule_id": "G112", | |
"details": "Potential Slowloris Attack because ReadHeaderTimeout is not configured in the http.Server", | |
"file": "/Users/oandriie/projects/sprayproxy/pkg/metrics/server.go", | |
"code": "34: \t\tkeyfile: key,\n35: \t\tsrv: \u0026http.Server{\n36: \t\t\tAddr: bindAddr,\n37: \t\t\tHandler: router,\n38: \t\t},\n39: \t}\n", | |
"line": "35-38", | |
"column": "9", | |
"nosec": false, | |
"suppressions": null | |
}, | |
{ | |
"severity": "MEDIUM", | |
"confidence": "HIGH", | |
"cwe": { | |
"id": "703", | |
"url": "https://cwe.mitre.org/data/definitions/703.html" | |
}, | |
"rule_id": "G307", | |
"details": "Deferring unsafe method \"Close\" on type \"io.ReadCloser\"", | |
"file": "/Users/oandriie/projects/sprayproxy/pkg/proxy/proxy.go", | |
"code": "108: \t\t}\n109: \t\tdefer resp.Body.Close()\n110: \t\tzapBackendFields = append(zapBackendFields, zap.Int(\"status\", resp.StatusCode))\n", | |
"line": "109", | |
"column": "3", | |
"nosec": false, | |
"suppressions": null | |
}, | |
{ | |
"severity": "MEDIUM", | |
"confidence": "HIGH", | |
"cwe": { | |
"id": "703", | |
"url": "https://cwe.mitre.org/data/definitions/703.html" | |
}, | |
"rule_id": "G307", | |
"details": "Deferring unsafe method \"Close\" on type \"io.ReadCloser\"", | |
"file": "/Users/oandriie/projects/sprayproxy/pkg/proxy/proxy.go", | |
"code": "56: \t_, err := buf.ReadFrom(c.Request.Body)\n57: \tdefer c.Request.Body.Close()\n58: \tif err != nil {\n", | |
"line": "57", | |
"column": "2", | |
"nosec": false, | |
"suppressions": null | |
}, | |
{ | |
"severity": "LOW", | |
"confidence": "HIGH", | |
"cwe": { | |
"id": "703", | |
"url": "https://cwe.mitre.org/data/definitions/703.html" | |
}, | |
"rule_id": "G104", | |
"details": "Errors unhandled.", | |
"file": "/Users/oandriie/projects/sprayproxy/cmd/server.go", | |
"code": "94: \n95: \tviper.BindPFlags(serverCmd.Flags())\n96: \n", | |
"line": "95", | |
"column": "2", | |
"nosec": false, | |
"suppressions": null | |
} | |
], | |
"Stats": { | |
"files": 9, | |
"lines": 619, | |
"nosec": 0, | |
"found": 5 | |
}, | |
"GosecVersion": "dev" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment