Skip to content

Conversation

@dxa4481
Copy link
Collaborator

@dxa4481 dxa4481 commented Feb 13, 2026

Description:

This PR introduces an iterative decoding pipeline, allowing decoders (e.g., Base64, UTF-16) to chain their outputs. Previously, decoders ran independently on the original chunk, missing secrets hidden behind layered encoding (e.g., base64 within UTF-16, or double-base64-encoded values).

The scannerWorker now re-runs decoders on any new output, up to a configurable --max-decode-depth (default 5). This enables detection of secrets like GCP service accounts and private keys found within base64-encoded Docker auth configs, or Artifactory tokens within base64. The pipeline includes an early exit, ensuring negligible performance overhead for higher depths when no new decoded data is produced (typically <5% overhead compared to depth 1).

Checklist:

  • Tests passing (make test-community)?
  • Lint passing (make lint this requires golangci-lint)?

Open in Cursor Open in Web

Decoders (base64, UTF-16, escaped unicode) now chain iteratively:
each decoder's output is fed back through all decoders until no new
transformations occur or --max-decode-depth is reached (default: 5).

This finds secrets hidden inside layered encodings, e.g. a base64
Docker auth blob containing a GCP private key, or a UTF-16 file
with base64-encoded credentials.

At depth=1 behavior is identical to the previous implementation.
Extra depths exit early when no new data is produced, so the cost
is <5% wall time on a large repo scan.

Co-authored-by: Dylan Ayrey <dxa4481@rit.edu>
@cursor
Copy link

cursor bot commented Feb 13, 2026

Cursor Agent can help with this pull request. Just @cursor in comments and I'll start working on changes in this branch.
Learn more about Cursor Agents

@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

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.

3 participants