File tree Expand file tree Collapse file tree 4 files changed +18
-13
lines changed Expand file tree Collapse file tree 4 files changed +18
-13
lines changed Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ Vulnerability #1: GO-2021-0265
10
10
Module: github.com/tidwall/gjson
11
11
Found in: github.com/tidwall/gjson@v1.6.5
12
12
Fixed in: github.com/tidwall/gjson@v1.9.3
13
- Example traces found:
13
+ Vulnerable symbols found:
14
14
#1: gjson.Get
15
15
#2: gjson.Result.Get
16
16
@@ -23,7 +23,7 @@ Vulnerability #2: GO-2021-0113
23
23
Module: golang.org/x/text
24
24
Found in: golang.org/x/text@v0.3.0
25
25
Fixed in: golang.org/x/text@v0.3.7
26
- Example traces found:
26
+ Vulnerable symbols found:
27
27
#1: language.Parse
28
28
29
29
Vulnerability #3: GO-2021-0054
@@ -34,7 +34,7 @@ Vulnerability #3: GO-2021-0054
34
34
Module: github.com/tidwall/gjson
35
35
Found in: github.com/tidwall/gjson@v1.6.5
36
36
Fixed in: github.com/tidwall/gjson@v1.6.6
37
- Example traces found:
37
+ Vulnerable symbols found:
38
38
#1: gjson.Result.ForEach
39
39
40
40
Your code is affected by 3 vulnerabilities from 2 modules.
Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ Vulnerability #1: GO-2021-0265
10
10
Module: github.com/tidwall/gjson
11
11
Found in: github.com/tidwall/gjson@v1.6.5
12
12
Fixed in: github.com/tidwall/gjson@v1.9.3
13
- Example traces found:
13
+ Vulnerable symbols found:
14
14
#1: gjson.Get
15
15
#2: gjson.Result.Get
16
16
@@ -23,7 +23,7 @@ Vulnerability #2: GO-2021-0113
23
23
Module: golang.org/x/text
24
24
Found in: golang.org/x/text@v0.3.0
25
25
Fixed in: golang.org/x/text@v0.3.7
26
- Example traces found:
26
+ Vulnerable symbols found:
27
27
#1: language.Parse
28
28
29
29
Vulnerability #3: GO-2021-0054
@@ -34,7 +34,7 @@ Vulnerability #3: GO-2021-0054
34
34
Module: github.com/tidwall/gjson
35
35
Found in: github.com/tidwall/gjson@v1.6.5
36
36
Fixed in: github.com/tidwall/gjson@v1.6.6
37
- Example traces found:
37
+ Vulnerable symbols found:
38
38
#1: gjson.Result.ForEach
39
39
40
40
Your code is affected by 3 vulnerabilities from 2 modules.
Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ Vulnerability #1: GO-2021-0113
12
12
Module: golang.org/x/text
13
13
Found in: golang.org/x/text@v0.3.0
14
14
Fixed in: golang.org/x/text@v0.3.7
15
- Example traces found:
15
+ Vulnerable symbols found:
16
16
#1: language.MatchStrings
17
17
#2: language.MustParse
18
18
#3: language.Parse
@@ -24,7 +24,7 @@ Vulnerability #2: GO-2020-0015
24
24
Module: golang.org/x/text
25
25
Found in: golang.org/x/text@v0.3.0
26
26
Fixed in: golang.org/x/text@v0.3.3
27
- Example traces found:
27
+ Vulnerable symbols found:
28
28
#1: transform.String
29
29
#2: unicode.bomOverride.Transform
30
30
#3: unicode.utf16Decoder.Transform
Original file line number Diff line number Diff line change @@ -38,6 +38,7 @@ type TextHandler struct {
38
38
osvs []* osv.Entry
39
39
findings []* findingSummary
40
40
scanLevel govulncheck.ScanLevel
41
+ scanMode govulncheck.ScanMode
41
42
42
43
err error
43
44
@@ -84,9 +85,9 @@ func (h *TextHandler) Flush() error {
84
85
85
86
// Config writes version information only if --version was set.
86
87
func (h * TextHandler ) Config (config * govulncheck.Config ) error {
87
- if config . ScanLevel != "" {
88
- h . scanLevel = config .ScanLevel
89
- }
88
+ h . scanLevel = config . ScanLevel
89
+ h . scanMode = config .ScanMode
90
+
90
91
if ! h .showVersion {
91
92
return nil
92
93
}
@@ -300,10 +301,14 @@ func (h *TextHandler) traces(traces []*findingSummary) {
300
301
count := 1
301
302
for _ , entry := range traces {
302
303
if entry .Compact == "" {
303
- continue
304
+ continue // skip package and module level traces
304
305
}
305
306
if first {
306
- h .style (keyStyle , " Example traces found:\n " )
307
+ if h .scanMode == govulncheck .ScanModeBinary {
308
+ h .style (keyStyle , " Vulnerable symbols found:\n " )
309
+ } else {
310
+ h .style (keyStyle , " Example traces found:\n " )
311
+ }
307
312
}
308
313
first = false
309
314
You can’t perform that action at this time.
0 commit comments