-
Notifications
You must be signed in to change notification settings - Fork 61
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
internal/scan: reorganize trace text layout in trace mode
As paths are relative, it is not immediately evident to what module symbols belong to in traces mode. We hence reorganize things to make that explicit while avoiding clutter. Fixes golang/go#69490 Change-Id: Ic43e22954cbe3ff0ac458f75ee3a07706295fb5d Reviewed-on: https://go-review.googlesource.com/c/vuln/+/614135 Reviewed-by: Maceo Thompson <[email protected]> LUCI-TryBot-Result: Go LUCI <[email protected]>
- Loading branch information
1 parent
6a6005b
commit 3917389
Showing
10 changed files
with
73 additions
and
55 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -44,8 +44,8 @@ Vulnerability #1: GO-2021-0265 | |
Fixed in: github.com/tidwall/[email protected] | ||
Example traces found: | ||
#1: for function github.com/tidwall/gjson.Result.Get | ||
vuln.go:14:20: golang.org/vuln.main | ||
gjson.go:296:17: github.com/tidwall/gjson.Result.Get | ||
main @ golang.org/vuln/vuln.go:14:20 | ||
Result.Get @ github.com/tidwall/gjson/gjson.go:296:17 | ||
|
||
Vulnerability #2: GO-2021-0054 | ||
Due to improper bounds checking, maliciously crafted JSON objects can cause | ||
|
@@ -57,12 +57,12 @@ Vulnerability #2: GO-2021-0054 | |
Fixed in: github.com/tidwall/[email protected] | ||
Example traces found: | ||
#1: for function github.com/tidwall/gjson.Result.ForEach | ||
vuln.go:14:20: golang.org/vuln.main | ||
gjson.go:297:12: github.com/tidwall/gjson.Result.Get | ||
gjson.go:1881:36: github.com/tidwall/gjson.Get | ||
gjson.go:2587:21: github.com/tidwall/gjson.execModifier | ||
gjson.go:2631:21: github.com/tidwall/gjson.modPretty | ||
gjson.go:220:17: github.com/tidwall/gjson.Result.ForEach | ||
main @ golang.org/vuln/vuln.go:14:20 | ||
Result.Get @ github.com/tidwall/gjson/gjson.go:297:12 | ||
Get @ github.com/tidwall/gjson/gjson.go:1881:36 | ||
execModifier @ github.com/tidwall/gjson/gjson.go:2587:21 | ||
modPretty @ github.com/tidwall/gjson/gjson.go:2631:21 | ||
Result.ForEach @ github.com/tidwall/gjson/gjson.go:220:17 | ||
|
||
Your code is affected by 2 vulnerabilities from 1 module. | ||
This scan also found 1 vulnerability in packages you import and 1 vulnerability | ||
|
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 |
---|---|---|
|
@@ -43,14 +43,14 @@ Vulnerability #1: GO-2021-0113 | |
Fixed in: golang.org/x/[email protected] | ||
Example traces found: | ||
#1: for function golang.org/x/text/language.MustParse | ||
main.go:26:3: golang.org/multientry.main | ||
main.go:48:8: golang.org/multientry.D | ||
main.go:99:20: golang.org/multientry.foobar | ||
language/tags.go:13:6: golang.org/x/text/language.MustParse | ||
main @ golang.org/multientry/main.go:26:3 | ||
D @ golang.org/multientry/main.go:48:8 | ||
foobar @ golang.org/multientry/main.go:99:20 | ||
MustParse @ golang.org/x/text/language/tags.go:13:6 | ||
#2: for function golang.org/x/text/language.Parse | ||
main.go:22:3: golang.org/multientry.main | ||
main.go:44:23: golang.org/multientry.C | ||
language/parse.go:33:6: golang.org/x/text/language.Parse | ||
main @ golang.org/multientry/main.go:22:3 | ||
C @ golang.org/multientry/main.go:44:23 | ||
Parse @ golang.org/x/text/language/parse.go:33:6 | ||
|
||
=== Package Results === | ||
|
||
|
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 |
---|---|---|
|
@@ -43,8 +43,8 @@ Vulnerability #1: GO-2021-0265 | |
Fixed in: github.com/tidwall/[email protected] | ||
Example traces found: | ||
#1: for function github.com/tidwall/gjson.Result.Get | ||
subdir/subdir.go:8:20: golang.org/vuln/subdir.Foo | ||
gjson.go:296:17: github.com/tidwall/gjson.Result.Get | ||
Foo @ golang.org/vuln/subdir/subdir.go:8:20 | ||
Result.Get @ github.com/tidwall/gjson/gjson.go:296:17 | ||
|
||
Vulnerability #2: GO-2021-0054 | ||
Due to improper bounds checking, maliciously crafted JSON objects can cause | ||
|
@@ -56,12 +56,12 @@ Vulnerability #2: GO-2021-0054 | |
Fixed in: github.com/tidwall/[email protected] | ||
Example traces found: | ||
#1: for function github.com/tidwall/gjson.Result.ForEach | ||
subdir/subdir.go:8:20: golang.org/vuln/subdir.Foo | ||
gjson.go:297:12: github.com/tidwall/gjson.Result.Get | ||
gjson.go:1881:36: github.com/tidwall/gjson.Get | ||
gjson.go:2587:21: github.com/tidwall/gjson.execModifier | ||
gjson.go:2631:21: github.com/tidwall/gjson.modPretty | ||
gjson.go:220:17: github.com/tidwall/gjson.Result.ForEach | ||
Foo @ golang.org/vuln/subdir/subdir.go:8:20 | ||
Result.Get @ github.com/tidwall/gjson/gjson.go:297:12 | ||
Get @ github.com/tidwall/gjson/gjson.go:1881:36 | ||
execModifier @ github.com/tidwall/gjson/gjson.go:2587:21 | ||
modPretty @ github.com/tidwall/gjson/gjson.go:2631:21 | ||
Result.ForEach @ github.com/tidwall/gjson/gjson.go:220:17 | ||
|
||
Your code is affected by 2 vulnerabilities from 1 module. | ||
This scan found no other vulnerabilities in packages you import or modules you | ||
|
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 |
---|---|---|
|
@@ -35,12 +35,12 @@ Vulnerability #1: GO-2022-0969 | |
Fixed in: net/[email protected] | ||
Example traces found: | ||
#1: for function net/http.ListenAndServe | ||
stdlib.go:<l>:<c>: golang.org/stdlib.main | ||
src/net/http/server.go:<l>:<c>: net/http.ListenAndServe | ||
main @ golang.org/stdlib/stdlib.go:<l>:<c> | ||
ListenAndServe @ stdlib/src/net/http/server.go:<l>:<c> | ||
#2: for function net/http.Serve | ||
stdlib.go:<l>:<c>: golang.org/stdlib.main | ||
stdlib.go:<l>:<c>: golang.org/stdlib.work[string] | ||
src/net/http/server.go:<l>:<c>: net/http.Serve | ||
main @ golang.org/stdlib/stdlib.go:<l>:<c> | ||
work[string] @ golang.org/stdlib/stdlib.go:<l>:<c> | ||
Serve @ stdlib/src/net/http/server.go:<l>:<c> | ||
|
||
Your code is affected by 1 vulnerability from the Go standard library. | ||
This scan found no other vulnerabilities in packages you import or modules you | ||
|
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 |
---|---|---|
|
@@ -51,29 +51,29 @@ Vulnerability #1: GO-2021-0113 | |
Fixed in: golang.org/x/[email protected] | ||
Vulnerable symbols found: | ||
#1: for function golang.org/x/text/language.Compose | ||
golang.org/x/text/language.Compose | ||
Compose | ||
#2: for function golang.org/x/text/language.Make | ||
golang.org/x/text/language.Make | ||
Make | ||
#3: for function golang.org/x/text/language.MatchStrings | ||
golang.org/x/text/language.MatchStrings | ||
MatchStrings | ||
#4: for function golang.org/x/text/language.MustParse | ||
golang.org/x/text/language.MustParse | ||
MustParse | ||
#5: for function golang.org/x/text/language.Parse | ||
golang.org/x/text/language.Parse | ||
Parse | ||
#6: for function golang.org/x/text/language.ParseAcceptLanguage | ||
golang.org/x/text/language.ParseAcceptLanguage | ||
ParseAcceptLanguage | ||
#7: for function golang.org/x/text/language.Tag.Base | ||
golang.org/x/text/language.Tag.Base | ||
Tag.Base | ||
#8: for function golang.org/x/text/language.Tag.Extension | ||
golang.org/x/text/language.Tag.Extension | ||
Tag.Extension | ||
#9: for function golang.org/x/text/language.Tag.IsRoot | ||
golang.org/x/text/language.Tag.IsRoot | ||
Tag.IsRoot | ||
#10: for function golang.org/x/text/language.Tag.Parent | ||
golang.org/x/text/language.Tag.Parent | ||
Tag.Parent | ||
#11: for function golang.org/x/text/language.Tag.Region | ||
golang.org/x/text/language.Tag.Region | ||
Tag.Region | ||
#12: for function golang.org/x/text/language.Tag.String | ||
golang.org/x/text/language.Tag.String | ||
Tag.String | ||
|
||
Vulnerability #2: GO-2020-0015 | ||
Infinite loop when decoding some inputs in golang.org/x/text | ||
|
@@ -83,11 +83,11 @@ Vulnerability #2: GO-2020-0015 | |
Fixed in: golang.org/x/[email protected] | ||
Vulnerable symbols found: | ||
#1: for function golang.org/x/text/transform.String | ||
golang.org/x/text/transform.String | ||
String | ||
#2: for function golang.org/x/text/encoding/unicode.bomOverride.Transform | ||
golang.org/x/text/encoding/unicode.bomOverride.Transform | ||
bomOverride.Transform | ||
#3: for function golang.org/x/text/encoding/unicode.utf16Decoder.Transform | ||
golang.org/x/text/encoding/unicode.utf16Decoder.Transform | ||
utf16Decoder.Transform | ||
|
||
Your code is affected by 2 vulnerabilities from 1 module. | ||
This scan found no other vulnerabilities in packages you import or modules you | ||
|
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
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