Skip to content

GCS collector Example strings reference a nonexistent --gcs-credentials-path flag #3193

Description

@gaganhr94

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions