Skip to content

Conversation

ahrav
Copy link
Contributor

@ahrav ahrav commented Feb 17, 2025

Description:

This PR introduces StreamDetectReader for streaming detection when scanning from an io.Reader (e.g., stdin or library usage). It processes input in configurable chunks, emitting detection findings via a results channel and signaling completion with a separate terminal error channel (which sends a single value). This design provides real-time feedback and reduces memory overhead for large inputs.

Checklist:

  • Does your PR pass tests?
  • Have you written new tests for your changes?
  • Have you lint your code locally prior to submission?

@zricethezav
Copy link
Collaborator

@ahrav this ready for a review?

@ahrav ahrav marked this pull request as ready for review February 19, 2025 02:13
Copy link
Collaborator

@zricethezav zricethezav left a comment

Choose a reason for hiding this comment

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

superb

@zricethezav zricethezav merged commit 2020e6a into gitleaks:master Feb 19, 2025
1 check passed
@ahrav ahrav deleted the feat-streaming-detect-reader branch February 19, 2025 16:06
alayne222 pushed a commit to alayne222/gitleaks that referenced this pull request May 28, 2025
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