-
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.
cmd/govulncheck: mask line numbers and columns
These can in principle change for stdlib. Although we always pretend we are running against go1.18, the actual stdlib underneath can be different. This could result in different line numbers and columns. There currently does not exist a clean way of masking line position for stdlib paths, so we mask everything with placeholders. Change-Id: I08628acbf10aa3f36b969bac5745ae3b4d52f284 Reviewed-on: https://go-review.googlesource.com/c/vuln/+/562215 LUCI-TryBot-Result: Go LUCI <[email protected]> TryBot-Result: Gopher Robot <[email protected]> Reviewed-by: Maceo Thompson <[email protected]> Run-TryBot: Zvonimir Pavlinovic <[email protected]>
- Loading branch information
1 parent
c154f6a
commit 5507063
Showing
12 changed files
with
121 additions
and
104 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,7 +14,7 @@ Vulnerability #1: GO-2021-0265 | |
Found in: github.com/tidwall/[email protected] | ||
Fixed in: github.com/tidwall/[email protected] | ||
Example traces found: | ||
#1: .../vuln.go:14:20: vuln.main calls gjson.Result.Get | ||
#1: .../vuln.go:<l>:<c>: vuln.main calls gjson.Result.Get | ||
|
||
Vulnerability #2: GO-2021-0113 | ||
Due to improper index calculation, an incorrectly formatted language tag can | ||
|
@@ -26,7 +26,7 @@ Vulnerability #2: GO-2021-0113 | |
Found in: golang.org/x/[email protected] | ||
Fixed in: golang.org/x/[email protected] | ||
Example traces found: | ||
#1: .../vuln.go:13:16: vuln.main calls language.Parse | ||
#1: .../vuln.go:<l>:<c>: vuln.main calls language.Parse | ||
|
||
Your code is affected by 2 vulnerabilities from 2 modules. | ||
This scan also found 1 vulnerability in packages you import and 0 | ||
|
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 |
---|---|---|
|
@@ -13,7 +13,7 @@ Vulnerability #1: GO-2021-0265 | |
Found in: github.com/tidwall/[email protected] | ||
Fixed in: github.com/tidwall/[email protected] | ||
Example traces found: | ||
#1: .../vuln.go:14:20: vuln.main calls gjson.Result.Get | ||
#1: .../vuln.go:<l>:<c>: vuln.main calls gjson.Result.Get | ||
|
||
Vulnerability #2: GO-2021-0113 | ||
Due to improper index calculation, an incorrectly formatted language tag can | ||
|
@@ -25,7 +25,7 @@ Vulnerability #2: GO-2021-0113 | |
Found in: golang.org/x/[email protected] | ||
Fixed in: golang.org/x/[email protected] | ||
Example traces found: | ||
#1: .../vuln.go:13:16: vuln.main calls language.Parse | ||
#1: .../vuln.go:<l>:<c>: vuln.main calls language.Parse | ||
|
||
Vulnerability #3: GO-2021-0054 | ||
Due to improper bounds checking, maliciously crafted JSON objects can cause | ||
|
@@ -36,7 +36,7 @@ Vulnerability #3: GO-2021-0054 | |
Found in: github.com/tidwall/[email protected] | ||
Fixed in: github.com/tidwall/[email protected] | ||
Example traces found: | ||
#1: .../vuln.go:14:20: vuln.main calls gjson.Result.Get, which eventually calls gjson.Result.ForEach | ||
#1: .../vuln.go:<l>:<c>: vuln.main calls gjson.Result.Get, which eventually calls gjson.Result.ForEach | ||
|
||
Your code is affected by 3 vulnerabilities from 2 modules. | ||
This scan also found 0 vulnerabilities in packages you import and 2 | ||
|
@@ -60,8 +60,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 | ||
.../vuln.go:<l>:<c>: golang.org/vuln.main | ||
.../gjson.go:<l>:<c>: github.com/tidwall/gjson.Result.Get | ||
|
||
Vulnerability #2: GO-2021-0113 | ||
Due to improper index calculation, an incorrectly formatted language tag can | ||
|
@@ -74,8 +74,8 @@ Vulnerability #2: GO-2021-0113 | |
Fixed in: golang.org/x/[email protected] | ||
Example traces found: | ||
#1: for function golang.org/x/text/language.Parse | ||
.../vuln.go:13:16: golang.org/vuln.main | ||
.../parse.go:228:6: golang.org/x/text/language.Parse | ||
.../vuln.go:<l>:<c>: golang.org/vuln.main | ||
.../parse.go:<l>:<c>: golang.org/x/text/language.Parse | ||
|
||
Vulnerability #3: GO-2021-0054 | ||
Due to improper bounds checking, maliciously crafted JSON objects can cause | ||
|
@@ -87,12 +87,12 @@ Vulnerability #3: 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 | ||
.../vuln.go:<l>:<c>: golang.org/vuln.main | ||
.../gjson.go:<l>:<c>: github.com/tidwall/gjson.Result.Get | ||
.../gjson.go:<l>:<c>: github.com/tidwall/gjson.Get | ||
.../gjson.go:<l>:<c>: github.com/tidwall/gjson.execModifier | ||
.../gjson.go:<l>:<c>: github.com/tidwall/gjson.modPretty | ||
.../gjson.go:<l>:<c>: github.com/tidwall/gjson.Result.ForEach | ||
|
||
Your code is affected by 3 vulnerabilities from 2 modules. | ||
This scan also found 0 vulnerabilities in packages you import and 2 | ||
|
@@ -115,7 +115,7 @@ Vulnerability #1: GO-2021-0265 | |
Found in: github.com/tidwall/[email protected] | ||
Fixed in: github.com/tidwall/[email protected] | ||
Example traces found: | ||
#1: .../vuln.go:14:20: vuln.main calls gjson.Result.Get | ||
#1: .../vuln.go:<l>:<c>: vuln.main calls gjson.Result.Get | ||
|
||
Vulnerability #2: GO-2021-0113 | ||
Due to improper index calculation, an incorrectly formatted language tag can | ||
|
@@ -127,7 +127,7 @@ Vulnerability #2: GO-2021-0113 | |
Found in: golang.org/x/[email protected] | ||
Fixed in: golang.org/x/[email protected] | ||
Example traces found: | ||
#1: .../vuln.go:13:16: vuln.main calls language.Parse | ||
#1: .../vuln.go:<l>:<c>: vuln.main calls language.Parse | ||
|
||
Vulnerability #3: GO-2021-0054 | ||
Due to improper bounds checking, maliciously crafted JSON objects can cause | ||
|
@@ -138,7 +138,7 @@ Vulnerability #3: GO-2021-0054 | |
Found in: github.com/tidwall/[email protected] | ||
Fixed in: github.com/tidwall/[email protected] | ||
Example traces found: | ||
#1: .../vuln.go:14:20: vuln.main calls gjson.Result.Get, which eventually calls gjson.Result.ForEach | ||
#1: .../vuln.go:<l>:<c>: vuln.main calls gjson.Result.Get, which eventually calls gjson.Result.ForEach | ||
|
||
=== 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
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 |
---|---|---|
|
@@ -15,8 +15,8 @@ Vulnerability #1: GO-2021-0113 | |
Found in: golang.org/x/[email protected] | ||
Fixed in: golang.org/x/[email protected] | ||
Example traces found: | ||
#1: .../main.go:99:20: multientry.foobar calls language.MustParse | ||
#2: .../main.go:44:23: multientry.C calls language.Parse | ||
#1: .../main.go:<l>:<c>: multientry.foobar calls language.MustParse | ||
#2: .../main.go:<l>:<c>: multientry.C calls language.Parse | ||
|
||
Your code is affected by 1 vulnerability from 1 module. | ||
This scan also found 0 vulnerabilities in packages you import and 1 | ||
|
@@ -42,14 +42,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 | ||
.../tags.go:13:6: golang.org/x/text/language.MustParse | ||
.../main.go:<l>:<c>: golang.org/multientry.main | ||
.../main.go:<l>:<c>: golang.org/multientry.D | ||
.../main.go:<l>:<c>: golang.org/multientry.foobar | ||
.../tags.go:<l>:<c>: golang.org/x/text/language.MustParse | ||
#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 | ||
.../parse.go:33:6: golang.org/x/text/language.Parse | ||
.../main.go:<l>:<c>: golang.org/multientry.main | ||
.../main.go:<l>:<c>: golang.org/multientry.C | ||
.../parse.go:<l>:<c>: golang.org/x/text/language.Parse | ||
|
||
=== 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 |
---|---|---|
|
@@ -16,7 +16,7 @@ Vulnerability #1: GO-2021-0113 | |
Found in: golang.org/x/[email protected] | ||
Fixed in: golang.org/x/[email protected] | ||
Example traces found: | ||
#1: .../main.go:11:16: replace.main calls language.Parse | ||
#1: .../main.go:<l>:<c>: replace.main calls language.Parse | ||
|
||
Your code is affected by 1 vulnerability from 1 module. | ||
This scan also found 0 vulnerabilities in packages you import and 2 | ||
|
Oops, something went wrong.