这是indexloc提供的服务,不要输入任何密码
Skip to content

Conversation

@dogancanbakir
Copy link
Member

@dogancanbakir dogancanbakir commented Jun 17, 2025

closes #1565

$ go run . -s rsecloud -d hackerone.com

               __    _____           __         
   _______  __/ /_  / __(_)___  ____/ /__  _____
  / ___/ / / / __ \/ /_/ / __ \/ __  / _ \/ ___/
 (__  ) /_/ / /_/ / __/ / / / / /_/ /  __/ /    
/____/\__,_/_.___/_/ /_/_/ /_/\__,_/\___/_/

                projectdiscovery.io

[INF] Current subfinder version v2.7.1 (latest)
[INF] Loading provider config from /Users/dogancanbakir/Library/Application Support/subfinder/provider-config.yaml
[INF] Enumerating subdomains for hackerone.com
www.hackerone.com
api.hackerone.com
mta-sts.forwarding.hackerone.com
b.ns.hackerone.com
mta-sts.managed.hackerone.com
websockets.hackerone.com
mta-sts.hackerone.com
gslink.hackerone.com
support.hackerone.com
docs.hackerone.com
[INF] Found 10 subdomains for hackerone.com in 1 second 348 milliseconds

Summary by CodeRabbit

  • New Features
    • Added support for the RSECloud source to enhance passive subdomain enumeration capabilities.
  • Tests
    • Updated test coverage to include the RSECloud source in all and default source lists.

@dogancanbakir dogancanbakir requested a review from ehsandeep June 17, 2025 14:27
@dogancanbakir dogancanbakir self-assigned this Jun 17, 2025
@coderabbitai
Copy link

coderabbitai bot commented Jun 17, 2025

Walkthrough

The changes introduce a new passive subdomain enumeration source, rsecloud, into the system. This includes implementing the source logic, registering it among available sources, and updating test expectations to reflect its presence in both all and default sources. No other logic or control flow is altered.

Changes

File(s) Change Summary
v2/pkg/subscraping/sources/rsecloud/rsecloud.go Added new rsecloud source implementation for passive subdomain enumeration, including API logic.
v2/pkg/passive/sources.go Registered rsecloud as a passive source by importing and adding it to the sources list.
v2/pkg/passive/sources_test.go Updated test expectations to include rsecloud in all and default sources.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant PassiveSources
    participant RSECloudSource
    participant RSECloudAPI

    User->>PassiveSources: Enumerate subdomains for domain
    PassiveSources->>RSECloudSource: Run(domain, session)
    loop For each mode ("active", "passive")
        RSECloudSource->>RSECloudAPI: GET /api/v1/subdomains/{mode}?domain={domain}&page={n}
        RSECloudAPI-->>RSECloudSource: JSON response (subdomains, pagination info)
        RSECloudSource->>RSECloudSource: Emit subdomains, handle pagination
    end
    RSECloudSource-->>PassiveSources: Results channel (subdomains, errors)
Loading

Assessment against linked issues

Objective Addressed Explanation
Integrate RSECloud’s Subdomain Discovery APIs as a new passive source (#1565)
Use RSECloud API endpoints for both "active" and "passive" subdomain data (#1565)
Handle API key management and pagination as per RSECloud API documentation (#1565)
Update source registration and tests to include "rsecloud" in all/default sources (#1565)

Poem

In the warren of code, a new path we found,
With RSECloud’s reach, subdomains abound!
From passive to active, we hop without fear,
Gathering secrets far and near.
🐇 With keys in our paws and clouds in our sight,
We map the domains—oh, what a delight!
Hoppity-hop, subfinder grows bright!


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 52cf511 and 5689f6c.

📒 Files selected for processing (1)
  • v2/pkg/subscraping/sources/rsecloud/rsecloud.go (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • v2/pkg/subscraping/sources/rsecloud/rsecloud.go
⏰ Context from checks skipped due to timeout of 90000ms (1)
  • GitHub Check: release-test
✨ Finishing Touches
  • 📝 Generate Docstrings

🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🧹 Nitpick comments (5)
v2/pkg/passive/sources.go (2)

42-43: Keep import list alphabetically sorted to avoid noisy diffs later

The new rsecloud import breaks the existing alphabetical ordering of the source imports. Consider re-ordering to maintain a deterministic diff footprint.


85-86: Registration order is drifting from α-order; align for easier grepping

rsecloud is inserted mid-block; keeping AllSources alphabetically sorted helps quick visual scans and reduces merge conflicts with parallel PRs touching the list.

-	&rapiddns.Source{},
-	&redhuntlabs.Source{},
-	// &riddler.Source{}, // failing due to cloudfront protection
-	&robtex.Source{},
-	&rsecloud.Source{},
-	&securitytrails.Source{},
+	&rapiddns.Source{},
+	&redhuntlabs.Source{},
+	// &riddler.Source{}, // failing due to cloudfront protection
+	&robtex.Source{},
+	&rsecloud.Source{},
+	&securitytrails.Source{},
v2/pkg/subscraping/sources/rsecloud/rsecloud.go (3)

42-48: IsDefault()==true but silently skipped when no key – risk of confusing UX

By default this source is selected, yet if no API key is supplied you just set skipped=true and return.
Users might wonder why the default set yields fewer results without any warning. Consider:

  • emitting an explicit warning via gologger (consistent with other key-based sources), or
  • setting IsDefault() to false.

48-54: Content-Type header is superfluous for a GET request

The RSECloud API does not require a body for these GET calls; you can drop the header to avoid misleading proxy/debug traces.


71-74: Potential duplicate emissions between “active” and “passive” datasets

A subdomain may appear in both endpoints, leading to duplicate results downstream. Consider de-duplication (e.g., a map[string]struct{}) before pushing to the channel to keep result streams lean.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 3acf6d5 and 52cf511.

📒 Files selected for processing (3)
  • v2/pkg/passive/sources.go (2 hunks)
  • v2/pkg/passive/sources_test.go (2 hunks)
  • v2/pkg/subscraping/sources/rsecloud/rsecloud.go (1 hunks)
🧰 Additional context used
🧬 Code Graph Analysis (1)
v2/pkg/subscraping/sources/rsecloud/rsecloud.go (2)
v2/pkg/subscraping/types.go (2)
  • Session (71-78)
  • Statistics (29-34)
v2/pkg/subscraping/utils.go (1)
  • PickRandom (12-20)
⏰ Context from checks skipped due to timeout of 90000ms (2)
  • GitHub Check: Analyze (go)
  • GitHub Check: release-test
🔇 Additional comments (1)
v2/pkg/passive/sources_test.go (1)

41-45: Good test update

The expectations correctly include the new source; thanks for maintaining coverage.

@DhiyaneshGeek
Copy link
Member

LGTM !

go run . -s rsecloud -d hackerone.com                                             

               __    _____           __         
   _______  __/ /_  / __(_)___  ____/ /__  _____
  / ___/ / / / __ \/ /_/ / __ \/ __  / _ \/ ___/
 (__  ) /_/ / /_/ / __/ / / / / /_/ /  __/ /    
/____/\__,_/_.___/_/ /_/_/ /_/\__,_/\___/_/

		projectdiscovery.io

[INF] Current subfinder version v2.7.1 (latest)
[INF] Loading provider config from 
[INF] Enumerating subdomains for hackerone.com
docs.hackerone.com
mta-sts.hackerone.com
gslink.hackerone.com
api.hackerone.com
support.hackerone.com
www.hackerone.com
mta-sts.forwarding.hackerone.com
b.ns.hackerone.com
mta-sts.managed.hackerone.com
websockets.hackerone.com
[INF] Found 10 subdomains for hackerone.com in 3 seconds 62 milliseconds

@ehsandeep ehsandeep merged commit 7526dd8 into dev Jun 20, 2025
7 of 10 checks passed
@ehsandeep ehsandeep deleted the add_rsecloud branch June 20, 2025 17:27
@coderabbitai coderabbitai bot mentioned this pull request Oct 2, 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.

Consider Adding RSECloud’s Subdomain Discovery APIs

4 participants