The Example: strings for the GCS collector advertise a --gcs-credentials-path
flag. That flag does not exist — the registered flag is --gcp-credentials-path.
Locations (both at 1e98dab2):
cmd/guaccollect/cmd/gcs.go:34
cmd/guacone/cmd/gcs.go:54
Both read:
Example: "guacone collect gcs my-bucket --gcs-credentials-path /secret/sa.json",
Evidence it is wrong:
pkg/cli/store.go:130 registers gcp-credentials-path.
- The constant two lines above each example is already correct:
const gcsCredentialsPathFlag = "gcp-credentials-path"
(cmd/guaccollect/cmd/gcs.go:29, cmd/guacone/cmd/gcs.go:49).
cmd/guacone/cmd/gcs_test.go:37 asserts the error text
expected either --gcp-credentials-path flag or GOOGLE_APPLICATION_CREDENTIALS environment variable.
Impact: copying the example from --help fails with unknown flag. The
typo has also propagated into guac-docs (cli-guaccollect.md,
blob-storage.md:59) — tracked as guacsec/guac-docs#237, which will regress if
this is not fixed here too.
Second bug in the same line: the guaccollect example says
guacone collect gcs .... The correct invocation for that binary is
guaccollect gcs ... — guaccollect has no collect subcommand.
Fix: use gcsCredentialsPathFlag's actual value in both examples, and
correct the binary name in the guaccollect one.
The
Example:strings for the GCS collector advertise a--gcs-credentials-pathflag. That flag does not exist — the registered flag is
--gcp-credentials-path.Locations (both at
1e98dab2):cmd/guaccollect/cmd/gcs.go:34cmd/guacone/cmd/gcs.go:54Both read:
Evidence it is wrong:
pkg/cli/store.go:130registersgcp-credentials-path.const gcsCredentialsPathFlag = "gcp-credentials-path"(
cmd/guaccollect/cmd/gcs.go:29,cmd/guacone/cmd/gcs.go:49).cmd/guacone/cmd/gcs_test.go:37asserts the error textexpected either --gcp-credentials-path flag or GOOGLE_APPLICATION_CREDENTIALS environment variable.Impact: copying the example from
--helpfails withunknown flag. Thetypo has also propagated into guac-docs (
cli-guaccollect.md,blob-storage.md:59) — tracked as guacsec/guac-docs#237, which will regress ifthis is not fixed here too.
Second bug in the same line: the
guaccollectexample saysguacone collect gcs .... The correct invocation for that binary isguaccollect gcs ...—guaccollecthas nocollectsubcommand.Fix: use
gcsCredentialsPathFlag's actual value in both examples, andcorrect the binary name in the
guaccollectone.