Skip to content

Commit

Permalink
scripts: start checking google.golang.org/protobuf
Browse files Browse the repository at this point in the history
The current garble release is able to obfuscate it with Go 1.20.

While here, re-generate all files to use "go 1.20" directives,
and add a TODO about also testing binary builds for each project.

See burrowers#600.
  • Loading branch information
mvdan committed Feb 14, 2023
1 parent bb69fac commit 731136d
Show file tree
Hide file tree
Showing 6 changed files with 29 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module test

go 1.19
go 1.20

require github.com/andybalholm/brotli v1.0.4 // indirect
2 changes: 1 addition & 1 deletion scripts/cached_modfiles/github.com_samber_lo_v1.21.0.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module test

go 1.19
go 1.20

require (
github.com/samber/lo v1.21.0 // indirect
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module test

go 1.19
go 1.20

require (
golang.org/x/crypto v0.0.0-20220315160706-3147a52a75dd // indirect
Expand Down
10 changes: 10 additions & 0 deletions scripts/cached_modfiles/google.golang.org_protobuf_v1.28.1.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
module test

go 1.20

require (
github.com/golang/protobuf v1.5.0 // indirect
github.com/google/go-cmp v0.5.5 // indirect
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 // indirect
google.golang.org/protobuf v1.28.1 // indirect
)
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
github.com/golang/protobuf v1.5.0 h1:LUVKkCeviFUMKqHa4tXIIij/lbhnMbP7Fn5wKdKkRh4=
github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk=
github.com/google/go-cmp v0.5.5 h1:Khx7svrCpmxxtHBq5j2mp/xVjsi8hQMfNLvJFAlrGgU=
github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4=
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw=
google.golang.org/protobuf v1.28.1 h1:d0NfwRgPtno5B1Wa6L2DAG+KivqkdutMf1UhdNx175w=
google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
9 changes: 7 additions & 2 deletions scripts/check-third-party.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,15 @@
# For example, a good example of a project to add is one that has unearthed
# multiple bugs in garble before, such as Protobuf.
# Also remember that the standard library already provides significant cover.
#
# TODO: note that this script only catches errors when compiling packages,
# but it will not catch problems that may only arise at link time,
# such as go:linknames which are not properly obfuscated.
# Consider building and linking relevant main packages from each project,
# such as ./cmd/protoc-gen-go for protobuf.
modules=(
# Protobuf helps cover encoding libraries and reflection.
# TODO: currently fails.
# google.golang.org/protobuf v1.28.0
google.golang.org/protobuf v1.28.1

# Wireguard helps cover networking and cryptography.
golang.zx2c4.com/wireguard 0.0.20220316
Expand Down

0 comments on commit 731136d

Please sign in to comment.