Recon is repetitive, and repetitive work is what computers are for. A good bug bounty automation pipeline does the boring parts – finding subdomains, checking which are alive, and running template-based scans – so you can spend your attention on the parts that actually need a human. This post walks through building a simple, reliable pipeline with Python, the ProjectDiscovery tools and Nuclei, aimed at authorised targets only.

What a bug bounty automation pipeline should and should not do

The goal of automation is not to “find bugs automatically”. Scanners find known, templated issues; the interesting vulnerabilities almost always need manual thinking. What automation is genuinely good at is coverage and change detection: making sure you have seen every asset in scope, and telling you when something new appears.

So a sensible pipeline does three things well:

  • Enumerates assets in scope (subdomains, then live hosts).
  • Runs low-noise, template-based checks for known issues and misconfigurations.
  • Stores results so you can diff today against last week and get alerted on changes.

And it avoids two traps: scanning out of scope, and generating so much noise that you ignore the output. Everything here assumes you have permission to test the targets. Read the program scope first, and keep an explicit allow-list.

The tools

This pipeline uses a small, well-maintained toolset. Python is the glue; the heavy lifting is done by compiled tools you orchestrate. The core three are from ProjectDiscovery:

  • subfinder – passive subdomain enumeration.
  • httpx – probes which hosts are actually serving HTTP(S), and collects status code, title and technology.
  • nuclei – runs community and custom templates for known vulnerabilities and misconfigurations.

Install them from their official releases and keep them updated; check the version you are running with nuclei -version and update templates regularly, because the template set changes often.

Step 1: scope control first

Before any scanning, write your scope to a file and make the pipeline refuse anything outside it. A plain text allow-list of root domains is enough to start:

example.com
example-api.com

Later in the pipeline you filter discovered hosts against this list. This one habit prevents the most common and most serious automation mistake: hammering an asset you were never allowed to touch.

Step 2: enumerate and probe

The first two stages chain naturally. subfinder produces candidate subdomains; httpx tells you which are live. The relevant flags, from the official docs, are straightforward:

# passive subdomain enumeration
subfinder -dL roots.txt -all -silent -o subs.txt

# probe for live hosts, capture status, title and tech
httpx -l subs.txt -silent -sc -title -td -json -o httpx.json

Here -dL takes a list of root domains, -all uses all configured sources, and -silent keeps output clean. For httpx, -sc is status code, -td is technology detection and -json (also written -j) gives machine-readable JSONL you can parse in Python.

Step 3: wrap it in Python

Python’s job is orchestration, scope filtering and parsing – not reimplementing the tools. Call each tool as a subprocess, read its JSON output, and enforce scope between stages.

import json
import subprocess

def load_scope(path):
    with open(path) as f:
        return {line.strip() for line in f if line.strip()}

def in_scope(host, roots):
    return any(host == r or host.endswith("." + r) for r in roots)

def run(cmd):
    print("[*] running:", " ".join(cmd))
    subprocess.run(cmd, check=True)

roots = load_scope("roots.txt")

# stage 1: subdomains
run(["subfinder", "-dL", "roots.txt", "-all", "-silent", "-o", "subs.txt"])

# stage 2: live hosts
run(["httpx", "-l", "subs.txt", "-silent", "-sc",
     "-title", "-td", "-json", "-o", "httpx.json"])

# parse live hosts and re-check scope
live = []
with open("httpx.json") as f:
    for line in f:
        rec = json.loads(line)
        url = rec.get("url", "")
        host = rec.get("input") or rec.get("host") or ""
        if host and in_scope(host, roots):
            live.append(url)

with open("live.txt", "w") as f:
    f.write("\n".join(live))

print(f"[+] {len(live)} live in-scope hosts")

Keeping the stages separate means you can rerun one part without repeating the whole chain, and you always have intermediate files to inspect when something looks wrong.

Step 4: run Nuclei sensibly

Nuclei is powerful, which also makes it easy to misuse. Three settings keep it useful rather than noisy:

  • Filter by severity. Start with -severity medium,high,critical so you are not buried in informational findings.
  • Respect the target. Use -rate-limit (default 150 requests/second) and conservative concurrency so you do not overwhelm the host.
  • Keep templates current with -update-templates, and track which template version produced a finding.
# update templates, then scan live in-scope hosts
nuclei -update-templates
nuclei -l live.txt -severity medium,high,critical \
       -rate-limit 150 -jsonl -o nuclei.jsonl -stats

Treat Nuclei output as leads, not conclusions. Every medium-or-higher hit deserves manual confirmation before it becomes a report, because false positives happen and because a program will reject an unverified scanner dump. If you want the full recon approach that this automation plugs into, see my bug bounty recon methodology.

Step 5: diff and alert

The real payoff is change detection. Save each run’s live hosts and findings with a date, then compare runs. New subdomains and newly appearing findings are where the fresh, un-crowded bugs tend to be.

import os

def diff(today, yesterday):
    a = set(open(today).read().split())
    b = set(open(yesterday).read().split()) if os.path.exists(yesterday) else set()
    return sorted(a - b)

new_hosts = diff("live.txt", "live_prev.txt")
if new_hosts:
    print("[!] new in-scope hosts since last run:")
    print("\n".join(new_hosts))

From here you can send new hosts to a notification channel, schedule the whole script on a timer, and review only the diff each morning. That turns a one-off scan into continuous monitoring of your targets.

Running it responsibly

  • Only scan assets that are explicitly in scope and that you are authorised to test.
  • Keep rate limits polite; automation that degrades a service is a problem, not a finding.
  • Store API keys for data sources outside your code, in environment variables or a config file.
  • Verify every automated finding by hand before reporting it.

Key takeaways

  • A bug bounty automation pipeline is for coverage and change detection, not for finding bugs on its own.
  • Chain subfinder, httpx and Nuclei, with Python handling orchestration, scope filtering and parsing.
  • Enforce an explicit scope allow-list between every stage.
  • Run Nuclei with severity filters, sane rate limits and current templates, and confirm findings manually.
  • The diff between runs is where the best, least-crowded leads appear.

Want recon and automation built for your targets?

If you would rather have a repeatable, scope-safe pipeline set up and tuned for your programs, I can help. Take a look at my security automation work, or read how I use AI agents to automate recon to see where this pipeline goes next.

Suvendu Dash

Offensive security engineer, penetration tester and bug bounty hunter. Ex-Senior Principal Security Engineer at INDmoney. Hall of Fame: Apple, Microsoft, OpenAI.