| ##### |
| # Test finding stdlib vulnerability in source mode with json output |
| $ govulncheck -C ${moddir}/stdlib -format json . |
| { |
| "config": { |
| "protocol_version": "v1.0.0", |
| "scanner_name": "govulncheck", |
| "scanner_version": "v0.0.0-00000000000-20000101010101", |
| "db": "testdata/vulndb-v1", |
| "db_last_modified": "2023-04-03T15:57:51Z", |
| "go_version": "go1.18", |
| "scan_level": "symbol", |
| "scan_mode": "source" |
| } |
| } |
| { |
| "progress": { |
| "message": "Fetching vulnerabilities from the database..." |
| } |
| } |
| { |
| "progress": { |
| "message": "Checking the code against the vulnerabilities..." |
| } |
| } |
| { |
| "osv": { |
| "schema_version": "1.3.1", |
| "id": "GO-2022-0969", |
| "modified": "2023-04-03T15:57:51Z", |
| "published": "2022-09-12T20:23:06Z", |
| "aliases": [ |
| "CVE-2022-27664", |
| "GHSA-69cg-p879-7622" |
| ], |
| "details": "HTTP/2 server connections can hang forever waiting for a clean shutdown that was preempted by a fatal error. This condition can be exploited by a malicious client to cause a denial of service.", |
| "affected": [ |
| { |
| "package": { |
| "name": "stdlib", |
| "ecosystem": "Go" |
| }, |
| "ranges": [ |
| { |
| "type": "SEMVER", |
| "events": [ |
| { |
| "introduced": "0" |
| }, |
| { |
| "fixed": "1.18.6" |
| }, |
| { |
| "introduced": "1.19.0" |
| }, |
| { |
| "fixed": "1.19.1" |
| } |
| ] |
| } |
| ], |
| "ecosystem_specific": { |
| "imports": [ |
| { |
| "path": "net/http", |
| "symbols": [ |
| "ListenAndServe", |
| "ListenAndServeTLS", |
| "Serve", |
| "ServeTLS", |
| "Server.ListenAndServe", |
| "Server.ListenAndServeTLS", |
| "Server.Serve", |
| "Server.ServeTLS", |
| "http2Server.ServeConn", |
| "http2serverConn.goAway" |
| ] |
| } |
| ] |
| } |
| } |
| ], |
| "references": [ |
| { |
| "type": "WEB", |
| "url": "https://groups.google.com/g/golang-announce/c/x49AQzIVX-s" |
| }, |
| { |
| "type": "REPORT", |
| "url": "https://go.dev/issue/54658" |
| }, |
| { |
| "type": "FIX", |
| "url": "https://go.dev/cl/428735" |
| } |
| ], |
| "credits": [ |
| { |
| "name": "Bahruz Jabiyev, Tommaso Innocenti, Anthony Gavazzi, Steven Sprecher, and Kaan Onarlioglu" |
| } |
| ], |
| "database_specific": { |
| "url": "https://pkg.go.dev/vuln/GO-2022-0969" |
| } |
| } |
| } |
| { |
| "finding": { |
| "osv": "GO-2022-0969", |
| "fixed_version": "v1.18.6", |
| "trace": [ |
| { |
| "module": "stdlib", |
| "version": "v1.18.0" |
| } |
| ] |
| } |
| } |
| { |
| "finding": { |
| "osv": "GO-2022-0969", |
| "fixed_version": "v1.18.6", |
| "trace": [ |
| { |
| "module": "stdlib", |
| "version": "v1.18.0", |
| "package": "net/http" |
| } |
| ] |
| } |
| } |
| { |
| "finding": { |
| "osv": "GO-2022-0969", |
| "fixed_version": "v1.18.6", |
| "trace": [ |
| { |
| "module": "stdlib", |
| "version": "v1.18.0", |
| "package": "net/http", |
| "function": "ListenAndServe", |
| "position": { |
| "filename": "src/net/http/server.go", |
| "offset": <o>, |
| "line": <l>, |
| "column": <c> |
| } |
| }, |
| { |
| "module": "golang.org/stdlib", |
| "package": "golang.org/stdlib", |
| "function": "main", |
| "position": { |
| "filename": "stdlib.go", |
| "offset": <o>, |
| "line": <l>, |
| "column": <c> |
| } |
| } |
| ] |
| } |
| } |
| { |
| "finding": { |
| "osv": "GO-2022-0969", |
| "fixed_version": "v1.18.6", |
| "trace": [ |
| { |
| "module": "stdlib", |
| "version": "v1.18.0", |
| "package": "net/http", |
| "function": "Serve", |
| "position": { |
| "filename": "src/net/http/server.go", |
| "offset": <o>, |
| "line": <l>, |
| "column": <c> |
| } |
| }, |
| { |
| "module": "golang.org/stdlib", |
| "package": "golang.org/stdlib", |
| "function": "work[string]", |
| "position": { |
| "filename": "stdlib.go", |
| "offset": <o>, |
| "line": <l>, |
| "column": <c> |
| } |
| }, |
| { |
| "module": "golang.org/stdlib", |
| "package": "golang.org/stdlib", |
| "function": "main", |
| "position": { |
| "filename": "stdlib.go", |
| "offset": <o>, |
| "line": <l>, |
| "column": <c> |
| } |
| } |
| ] |
| } |
| } |