Skip to content

fix: parse comma-separated list/stdin input targets#945

Open
Tianlin0725 wants to merge 1 commit intoprojectdiscovery:devfrom
Tianlin0725:atlas/tlsx-859
Open

fix: parse comma-separated list/stdin input targets#945
Tianlin0725 wants to merge 1 commit intoprojectdiscovery:devfrom
Tianlin0725:atlas/tlsx-859

Conversation

@Tianlin0725
Copy link

Proposed Changes

Fix input normalization so -l/--list file input and stdin handle comma-separated targets on a single line the same way as -u.

  • Added processCommaSeparatedInput to split by comma, trim whitespace, and skip empty tokens.
  • Applied this path to both list file scanner and stdin scanner.
  • Added regression test Test_ProcessCommaSeparatedInput.

Proof

Repro behavior (before)

A single list line like:

192.168.1.0/24,192.168.2.0/24,192.168.3.0/24

was treated as one host entry and failed with:

no address found for host

Test evidence (after)

go test ./internal/runner -run "ProcessCommaSeparatedInput|InputDomain|InputCIDR" -count=1
ok  github.com/projectdiscovery/tlsx/internal/runner

The new regression test verifies comma-separated entries are split into independent targets.

/claim #859

@neo-by-projectdiscovery-dev
Copy link

neo-by-projectdiscovery-dev bot commented Mar 5, 2026

Neo - PR Security Review

Caution

Review could not be completed

Review could not be completed. Please retry with @neo review.

Suggestion: Try again with @neo review.

Comment @neo help for available commands.

@coderabbitai
Copy link

coderabbitai bot commented Mar 5, 2026

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 49288fbb-2705-43ae-920d-2ce3cd8049c4

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Tip

Try Coding Plans. Let us write the prompt for your AI agent so you can ship faster (with fewer bugs).
Share your feedback on Discord.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@Tianlin0725
Copy link
Author

@neo review

Please re-run the security review. The previous attempt could not be completed.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant