Skip to content

fix(runner): stream -u targets in stream mode - #2739

Merged
Mzack9999 merged 1 commit into
devfrom
fix/1579-stream-targets
Nov 17, 2026
Merged

Mzack9999 merged 1 commit into
devfrom
fix/1579-stream-targets

Conversation

@dogancanbakir

@dogancanbakir dogancanbakir commented Nov 17, 2026 •

Copy link
Copy Markdown
Member

Fixes #1579

streamInput now sends -u targets, deduped with -l and stdin, before the other sources. #1578 closed the issue without touching stream mode.

Summary by CodeRabbit

  • Bug Fixes
    • Target hosts provided as input are now included in streamed results, with whitespace-only entries ignored and duplicate hosts removed.

@dogancanbakir dogancanbakir self-assigned this Nov 17, 2026
@coderabbitai

coderabbitai Bot commented Nov 17, 2026 •

Copy link
Copy Markdown

Explain Change →

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.

Estimated code review effort: 2 (Simple) | ~8 minutes

Possibly related PRs

  • 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: Passed 4

Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed 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 Passed 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 Passed 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.

@Mzack9999
Mzack9999 merged commit 41152cf into dev Nov 17, 2026
12 checks passed
@Mzack9999
Mzack9999 deleted the fix/1579-stream-targets branch November 17, 2026 10:21
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.

Add options.InputTargetHost to stream mode

2 participants