You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(runner): stream -u targets in stream mode - #2739
No actionable comments were generated in the recent review.
Walkthrough
Stream mode now processes InputTargetHost entries through sendLine before file or stdin input. A test checks that streamed output normalizes whitespace, removes duplicates, and places host entries before file entries.
Changes
Stream target input
Layer / File(s)
Summary
Process target host entries runner/runner.go, runner/runner_test.go
streamInput sends InputTargetHost entries through sendLine before file or stdin input. The test checks ordering, whitespace handling, and duplicate removal.
projectdiscovery/httpx#2738: Changes how stream mode combines explicit targets and stdin, which is adjacent to this PR’s stream input handling.
Suggested reviewers: mzack9999
Merge Risk: Minimal · up to df1a8
Stream mode now handles -u targets, deduplicating them against file and stdin input and placing them first. A regression test covers ordering and deduplication. No merge-blocking risk was found.
Pre-merge checks: 4
Check name
Status
Explanation
Description Check
Check skipped - CodeRabbit’s high-level summary is enabled.
Title check
The title "fix(runner): stream -u targets in stream mode" matches the main change. The PR makes runner.streamInput send InputTargetHost (-u) entries through sendLine, so they get the same normalizatio…
Linked Issues check
Directly linked issue #1579 requires that options.InputTargetHost be used in stream mode, with its entries streamed and deduplicated. The PR summary states that Runner.streamInput in runner/runner…
Out of Scope Changes check
Per the PR summary, the only source changes are a 6-line addition in Runner.streamInput (runner/runner.go) that routes InputTargetHost entries through sendLine, and a 31-line test (runner/runner…
Full details: Title check
Explanation
The title "fix(runner): stream -u targets in stream mode" matches the main change. The PR makes runner.streamInput send InputTargetHost (-u) entries through sendLine, so they get the same normalization and deduplication as other streamed lines. The linked issue #1579 asks for the same behavior. The title is specific and does not describe anything absent from the changeset.
Full details: Linked Issues check
Explanation
Directly linked issue #1579 requires that options.InputTargetHost be used in stream mode, with its entries streamed and deduplicated. The PR summary states that Runner.streamInput in runner/runner.go now sends InputTargetHost entries through sendLine before it reads files or stdin. Those entries therefore use the same normalization and deduplication as other streamed lines. The PR also adds TestRunner_streamInput_targetHosts in runner/runner_test.go. It checks that target-host entries come before file entries, that whitespace-only input is ignored, and that repeated hosts are deduplicated. The coding requirement is met. Limitation: the text diff for runner/runner.go and runner/runner_test.go could not be read (changed blobs unavailable), and the streamInput hunk was not read directly. The verdict relies on the supplied PR summary. The #1578 closure does not affect this assessment because it does not change the requirement.
Full details: Out of Scope Changes check
Explanation
Per the PR summary, the only source changes are a 6-line addition in Runner.streamInput (runner/runner.go) that routes InputTargetHost entries through sendLine, and a 31-line test (runner/runner_test.go) that covers that behavior. Both changes connect directly to the #1579 objective. No unrelated changes appear in the summary. Limitation: the diff hunks could not be read directly, so this verdict relies on the supplied summary.
Finishing Touches
Generate unit tests (beta)
Commit to this branch
Create a new PR
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
A rabbit sends hosts down the stream, Each trimmed and unique, neat as a dream. First come the hosts, then files in line, No duplicate names cross the sign. The stdin waits as targets flow, And off the little packets go.
Recent review info
Run configuration
Source mode: Auto
Repository: Unavailable
Branch: Unavailable
File: No configuration file from this repository applied
Commit: Unavailable
Layers: Organization UI
Review profile: CHILL
Plan: Essentials
Run ID: d8bc0d17-5c82-4514-b735-5bb91cbcbe7a
Commits
Reviewing files that changed from the base of the PR and between 9b6d807 and df1a880.
Files selected for processing: 2
runner/runner.go
runner/runner_test.go
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 8 remain after this review.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #1579
streamInputnow sends-utargets, deduped with-land stdin, before the other sources. #1578 closed the issue without touching stream mode.Summary by CodeRabbit