|
3 | 3 | // license that can be found in the LICENSE file.
|
4 | 4 |
|
5 | 5 | // Package govulncheck contains the JSON output structs for govulncheck.
|
| 6 | +// |
| 7 | +// govulncheck supports streaming JSON by emitting a series of Message |
| 8 | +// objects as it analyzes user code and discovers vulnerabilities. |
| 9 | +// Streaming JSON is useful for displaying progress in real-time for |
| 10 | +// large projects where govulncheck execution might take some time. |
| 11 | +// |
| 12 | +// govulncheck JSON emits configuration used to perform the analysis, |
| 13 | +// a user-friendly message about what is being analyzed, and the |
| 14 | +// vulnerability findings. Findings for the same vulnerability can |
| 15 | +// can be emitted several times. For instance, govulncheck JSON will |
| 16 | +// emit a finding when it sees that a vulnerable module is required |
| 17 | +// before proceeding to check if the vulnerability is imported or called. |
| 18 | +// Please see documentation on Message and related types for precise |
| 19 | +// details on the stream encoding. |
| 20 | +// |
| 21 | +// There are no guarantees on the order of messages. The pattern of emitted |
| 22 | +// messages can change in the future. Clients can follow code in handler.go |
| 23 | +// for consuming the streaming JSON programmatically. |
6 | 24 | package govulncheck
|
7 | 25 |
|
8 | 26 | import (
|
@@ -106,8 +124,10 @@ type Finding struct {
|
106 | 124 | // In binary mode, trace will contain a single-frame with no position
|
107 | 125 | // information.
|
108 | 126 | //
|
109 |
| - // When a package is imported but no vulnerable symbol is called, the trace |
110 |
| - // will contain a single-frame with no symbol or position information. |
| 127 | + // For module level source findings, the trace will contain a single-frame |
| 128 | + // with no symbol, position, or package information. For package level source |
| 129 | + // findings, the trace will contain a single-frame with no symbol or position |
| 130 | + // information. |
111 | 131 | Trace []*Frame `json:"trace,omitempty"`
|
112 | 132 | }
|
113 | 133 |
|
|
0 commit comments