Skip to content

Conversation

@bradlarsen
Copy link
Contributor

@bradlarsen bradlarsen commented Jan 29, 2026

This adds a new input source to TruffleHog, accessible via trufflehog json-enumerator.

This input source requires a list of filenames, each of which is an NDJSON-formatted sequence of objects that take one of two forms:

Form 1: {"data": "utf-8 string", "metadata": <non-null JSON value>}
Form 2: {"data_b64": "base64-encoded bytestring", "metadata": <non-null JSON value>}

The data / data_b64 field specifies the content to be scanned. The metadata field is arbitrary, and is simply propagated downstream with scan results from the corresponding content.

Note that although trufflehog json-enumerator requires a list of filenames to be given, the NDJSON data that you wish to scan may not need to be first written to disk. On Linux and macOS, at least, you can use shell process substitution to set up a named pipe from a producer process, like trufflehog json-enumerator <(some-program-that-emits-ndjson).

@bradlarsen bradlarsen requested a review from a team January 29, 2026 19:41
@bradlarsen bradlarsen requested review from a team as code owners January 29, 2026 19:41
Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 2 potential issues.

Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants