-
Notifications
You must be signed in to change notification settings - Fork 63
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
internal/govulncheck: use a streaming JSON format
Instead of writing the JSON all at once, use a streaming JSON output so that we can provide progress updates to the user. The JSON output also now includes config information. Delete json_vulns.ct, since the tool_version is now encoded and flaky. Test for exit codes will be added in a later CL. Change-Id: I26ab7cf99799f3df4426d65c2b78c07877110409 Reviewed-on: https://go-review.googlesource.com/c/vuln/+/477429 Reviewed-by: Ian Cottrell <[email protected]> Run-TryBot: Julie Qiu <[email protected]> TryBot-Result: Gopher Robot <[email protected]> Reviewed-by: Julie Qiu <[email protected]>
- Loading branch information
Showing
7 changed files
with
360 additions
and
37 deletions.
There are no files selected for viewing
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
{ | ||
"preamble": { | ||
"query_kind": "Binary", | ||
"callstack_mode": "Compact" | ||
} | ||
} | ||
{ | ||
"vulnerability": { | ||
"osv": { | ||
"id": "GO-0000-0001", | ||
"published": "0001-01-01T00:00:00Z", | ||
"modified": "0001-01-01T00:00:00Z", | ||
"details": "Third-party vulnerability", | ||
"affected": [ | ||
{ | ||
"package": { | ||
"name": "golang.org/vmod", | ||
"ecosystem": "" | ||
}, | ||
"database_specific": { | ||
"url": "" | ||
}, | ||
"ecosystem_specific": { | ||
"imports": [ | ||
{ | ||
"goos": [ | ||
"amd" | ||
] | ||
} | ||
] | ||
} | ||
} | ||
] | ||
}, | ||
"modules": [ | ||
{ | ||
"path": "golang.org/vmod", | ||
"found_version": "v0.0.1", | ||
"fixed_version": "v0.1.3" | ||
} | ||
] | ||
} | ||
} | ||
{ | ||
"vulnerability": { | ||
"osv": { | ||
"id": "GO-0000-0002", | ||
"published": "0001-01-01T00:00:00Z", | ||
"modified": "0001-01-01T00:00:00Z", | ||
"details": "Stdlib vulnerability", | ||
"affected": [ | ||
{ | ||
"package": { | ||
"name": "stdlib", | ||
"ecosystem": "" | ||
}, | ||
"database_specific": { | ||
"url": "" | ||
}, | ||
"ecosystem_specific": {} | ||
} | ||
] | ||
}, | ||
"modules": [ | ||
{ | ||
"path": "stdlib", | ||
"found_version": "v0.0.1", | ||
"packages": [ | ||
{ | ||
"path": "net/http" | ||
} | ||
] | ||
} | ||
] | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
{ | ||
"preamble": { | ||
"query_kind": "Source", | ||
"callstack_mode": "Compact" | ||
} | ||
} | ||
{ | ||
"vulnerability": { | ||
"osv": { | ||
"id": "GO-0000-0001", | ||
"published": "0001-01-01T00:00:00Z", | ||
"modified": "0001-01-01T00:00:00Z", | ||
"details": "Third-party vulnerability", | ||
"affected": [ | ||
{ | ||
"package": { | ||
"name": "golang.org/vmod", | ||
"ecosystem": "" | ||
}, | ||
"database_specific": { | ||
"url": "" | ||
}, | ||
"ecosystem_specific": { | ||
"imports": [ | ||
{ | ||
"goos": [ | ||
"amd" | ||
] | ||
} | ||
] | ||
} | ||
} | ||
] | ||
}, | ||
"modules": [ | ||
{ | ||
"path": "golang.org/vmod", | ||
"found_version": "v0.0.1", | ||
"fixed_version": "v0.1.3", | ||
"packages": [ | ||
{ | ||
"path": "", | ||
"callstacks": [ | ||
{ | ||
"symbol": "", | ||
"summary": "main calls vmod.Vuln" | ||
}, | ||
{ | ||
"symbol": "", | ||
"summary": "main calls vmod.VulnFoo" | ||
} | ||
] | ||
} | ||
] | ||
}, | ||
{ | ||
"path": "golang.org/vmod1", | ||
"found_version": "v0.0.3", | ||
"fixed_version": "v0.0.4", | ||
"packages": [ | ||
{ | ||
"path": "", | ||
"callstacks": [ | ||
{ | ||
"symbol": "", | ||
"summary": "Foo calls vmod1.Vuln" | ||
} | ||
] | ||
}, | ||
{ | ||
"path": "", | ||
"callstacks": [ | ||
{ | ||
"symbol": "", | ||
"summary": "Bar calls vmod1.VulnFoo" | ||
} | ||
] | ||
} | ||
] | ||
} | ||
] | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
{ | ||
"preamble": { | ||
"query_kind": "Source", | ||
"callstack_mode": "Compact" | ||
} | ||
} | ||
{ | ||
"vulnerability": { | ||
"osv": { | ||
"id": "GO-0000-0001", | ||
"published": "0001-01-01T00:00:00Z", | ||
"modified": "0001-01-01T00:00:00Z", | ||
"details": "Third-party vulnerability", | ||
"affected": [ | ||
{ | ||
"package": { | ||
"name": "golang.org/vmod", | ||
"ecosystem": "" | ||
}, | ||
"database_specific": { | ||
"url": "" | ||
}, | ||
"ecosystem_specific": { | ||
"imports": [ | ||
{ | ||
"goos": [ | ||
"amd" | ||
] | ||
} | ||
] | ||
} | ||
} | ||
] | ||
}, | ||
"modules": [ | ||
{ | ||
"path": "golang.org/vmod", | ||
"found_version": "v0.0.1", | ||
"fixed_version": "v0.1.3" | ||
} | ||
] | ||
} | ||
} |
Oops, something went wrong.