Skip to content

[Bug] Stray fmt.Printf in portainertoken detector pollutes standard output #5333

Description

@Gracy769

The portainertoken detector contains a stray mt.Printf(\nINVALID URL\n) statement that was likely left over from debugging. When running TruffleHog on a codebase that contains a portainer keyword near an invalid URL, this causes INVALID URL to be repeatedly printed to stdout, polluting the tool's standard output and disrupting structured logging.

To Reproduce

  1. Create a file containing portainertoken https://this-is-not-a-valid-url:
  2. Run trufflehog on the file.
  3. Observe INVALID URL printed to stdout.

Expected behavior
The detector should silently ignore invalid URLs and continue scanning, or use the configured logger at a debug level.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions