Documentation
¶
Overview ¶
Command obfuscate emits go-build ldflag fragments that bake a XOR-obfuscated third-party provider key into the binary.
Usage:
go run ./tools/obfuscate <obfVar> <xorVar> <plaintext>
Prints a single space-separated pair of -X ldflag fragments on stdout that the Dockerfile/Makefile/CI can splice into its go build:
-X github.com/beacon-stack/pilot/internal/config.<obfVar>=<b64-ciphertext> -X github.com/beacon-stack/pilot/internal/config.<xorVar>=<b64-xor-key>
Empty plaintext yields empty ldflag values (no obfuscation, no key, same as shipping an empty default).
Why: `strings pilot | grep -E '^[a-f0-9]{32}$'` is the casual attacker's path to the baked TMDB key. Obfuscation moves them to "figure out the layout, find the XOR key, pair them, decode." Still trivially defeatable by anyone running a debugger, but stops anyone who stops at strings(1).