You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
garble/testdata/scripts
Daniel Martí 21dfbd3379 obfuscate cgo-generated-Go filenames
It's not a problem to leak filenames like _cgo_gotypes.go,
but it is a problem when it includes the import path:

	$ strings main | grep _cgo_gotypes
	test/main/_cgo_gotypes.go

Here, "test/main" is the module path, which we want to hide.
We hadn't caught this before because the cgo.txt test did not check that
module paths aren't being leaked - it does now.

The fix is rather simple; we let printFile handle cgo-generated files.
We used to avoid that due to compiler errors, as the compiler only
allows some special cgo comment directives to work in cgo-generated
code, to prevent misuse in user code.

The fix is rather easy: the obfuscated filenames should begin with
"_cgo_" to appease the compiler's check.
3 years ago
..
asm.txt all: drop support for Go 1.17 4 years ago
basic.txt add missing context to two unmarshal errors 4 years ago
cgo.txt obfuscate cgo-generated-Go filenames 3 years ago
crossbuild.txt all: drop support for Go 1.17 4 years ago
debugdir.txt all: drop support for Go 1.17 4 years ago
embed.txt all: drop support for Go 1.17 4 years ago
goenv.txt actually remove temporary directories after obfuscation 3 years ago
gogarble.txt all: drop support for Go 1.17 4 years ago
goversion.txt all: drop support for Go 1.17 4 years ago
help.txt fix support with the latest Go master version 3 years ago
implement.txt all: drop support for Go 1.17 4 years ago
imports.txt support import paths ending with ".go" 3 years ago
init.txt all: drop support for Go 1.17 4 years ago
ldflags.txt slight simplifications and alloc reductions 3 years ago
linkname.txt all: drop support for Go 1.17 4 years ago
literals.txt Disable seed obfuscator (#535) 3 years ago
modinfo.txt all: drop support for Go 1.17 4 years ago
plugin.txt all: drop support for Go 1.17 4 years ago
position.txt all: drop support for Go 1.17 4 years ago
reflect.txt fix support with the latest Go master version 3 years ago
reverse.txt actually remove temporary directories after obfuscation 3 years ago
seed-cache.txt all: drop support for Go 1.17 4 years ago
seed.txt all: drop support for Go 1.17 4 years ago
syntax.txt all: drop support for Go 1.17 4 years ago
test.txt skip unnecessary "refusing to list" test errors 4 years ago
tiny.txt all: drop support for Go 1.17 4 years ago
typeparams.txt fix hashing of generic field names 3 years ago