Skip to content

Setup Walkthrough: Recon Repo to First Discord Alert

15 min readBug Hunting for Beginners

Step-by-step walkthrough from adding the recon workflow to receiving your first Discord alert. Hold-your-hand granular: every click, every paste, every expected outcome.


You’ll need these three things in front of you:

  1. A GitHub account. Free tier is fine. You’ll create a PRIVATE repo (private repos get free Actions minutes too).
  2. A Discord server you own or admin. This is where alerts will arrive. If you don’t have one, create a personal server: Discord → left sidebar → “+” → “Create My Own” → “For me and my friends”. Takes 30 seconds.
  3. The workflow file. Open Automated Recon and keep the recon.yml block handy. You’ll paste it into your own private repo.

You should also have:

  • A real bug bounty program you’re authorized to test (HackerOne, Intigriti, etc.). If you don’t yet, you can still complete the setup using your OWN domain (e.g., a personal site) for testing, just to confirm the pipeline works.

Total time: About 15-20 minutes for first-run-to-first-alert. The cron then takes over and runs every 6 hours.


We’ll do this in 9 steps:

  1. Create the empty GitHub repo
  2. Add the workflow file
  3. Create the Discord webhook
  4. Add the webhook as a GitHub secret
  5. Enable workflow write permissions
  6. (Optional) Add subdomain enumeration API keys
  7. Add your first target as the TARGETS secret
  8. Trigger the workflow manually
  9. Confirm the Discord alert arrived
flowchart TD
  S1["Step 1: Create Private Repo"] --> S2["Step 2: Add Workflow File"]
  S2 --> S3["Step 3: Create Discord Webhook"]
  S3 --> S4["Step 4: Add Webhook to Secrets"]
  S4 --> S5["Step 5: Enable Write Permissions"]
  S5 --> S6["Step 6: Add API Keys (Optional)"]
  S6 --> S7["Step 7: Add TARGETS Secret"]
  S7 --> S8["Step 8: Trigger Workflow"]
  S8 --> S9["Step 9: Discord Alert Arrives"]
  
  style S9 fill:#99ff99,stroke:#333,stroke-width:2px,color:#000

Let’s go.


Goal: A private, empty GitHub repo waiting to receive your files.

  1. Go to https://github.com/new
  2. Repository name: anything you like. Suggestions: recon-bot, bbrecon, attack-surface. Avoid anything that names a specific target (your repo URL might show up in security logs).
  3. Description: optional. Leave blank or write “Personal recon automation”.
  4. Visibility: Private. This is critical. Public repos would expose your target lists and recon outputs.
  5. Initialize this repository with: Leave all three checkboxes UNCHECKED, so the repo is empty. You will add the one file you need yourself in Step 2.
  6. Click the green “Create repository” button.

You’ll land on a page that says “Quick setup, if you’ve done this kind of thing before” with a URL like https://github.com/yourname/recon-bot. Leave this tab open, you’ll come back in a moment.

What if you accidentally created it public? Repo Settings → General → scroll to “Danger Zone” at the very bottom → “Change repository visibility” → Private. Easy fix.

What if you accidentally initialized with a README? Easiest fix: delete the repo (Settings → Danger Zone → Delete) and start over. It’s empty anyway.


Goal: .github/workflows/recon.yml exists on the main branch of your new private repo.

Terminal window
# 1. Create a local folder with the workflow path
mkdir recon-bot && cd recon-bot
mkdir -p .github/workflows
# Paste the recon.yml block from guide section 9 into .github/workflows/recon.yml
# 2. Initialize a fresh repo and connect it to YOUR private repo
git init -b main
git remote add origin https://github.com/yourname/recon-bot.git
# 3. Stage, commit, push
git add .
git commit -m "Add recon workflow"
git push -u origin main

If prompted for credentials, use a Personal Access Token instead of your password, because GitHub no longer accepts passwords. Generate one at https://github.com/settings/tokens (classic, with repo scope).

Option B: GitHub web UI (no terminal needed)

Section titled “Option B: GitHub web UI (no terminal needed)”
  1. Go to your empty repo’s page.
  2. Click “creating a new file” in the quick-setup section.
  3. In the filename box type .github/workflows/recon.yml. Typing the slashes creates the folders.
  4. Paste the recon.yml block from Automated Recon into the editor.
  5. Click “Commit changes”, keep the default message, and commit to main.

The workflow creates the data/ folder itself on its first run, so you do not need to create it.

Refresh your repo page on GitHub. You should see:

.github/

Open .github/workflows/ and confirm it contains recon.yml. If you see that, move on to Step 3.


Goal: A webhook URL that the workflow will use to post alerts into a Discord channel.

  1. Open the Discord server where you want alerts. (Use the desktop app or web.)
  2. Decide which channel. Either:
    • Use an existing channel (e.g., #general), or
    • Create a new dedicated channel: Click the “+” next to a channel category in the left sidebar → “Create Channel” → Name it recon-alerts → Text Channel → Create.
  3. Hover over the channel name in the left sidebar. A gear icon appears. Click it (or right-click the channel → “Edit Channel”).
  4. In the channel settings, click “Integrations” in the left sidebar.
  5. Click “Create Webhook” (or “View Webhooks” → “New Webhook” if you’ve made one before).
  6. Name the webhook “Recon Bot” (or whatever).
  7. Customize the avatar if you want, entirely optional.
  8. Click “Copy Webhook URL”. The URL will look like:
https://discord.com/api/webhooks/123456789012345678/AbCdEf...long-token...XyZ
  1. Paste it somewhere safe temporarily (a sticky note app, password manager, scratch text file). You’ll need it in Step 4 in about 90 seconds.
  2. Click “Save Changes” in Discord and close the settings.

From a terminal, this confirms the webhook is live before you go further:

Terminal window
curl -X POST "YOUR_WEBHOOK_URL_HERE" \
-H "Content-Type: application/json" \
-d '{"content":"Webhook test from terminal"}'

You should see Webhook test from terminal appear in your Discord channel within 1-2 seconds.

If nothing arrives:

  • Re-copy the URL from Discord (you might have grabbed only part)
  • Make sure you used double quotes around the URL (special chars in the token can confuse shells)
  • Check the channel you’re looking at is the right one

Once you see the test message in Discord, you’re ready for Step 4.


Step 4: Add the Webhook as a GitHub Secret

Section titled “Step 4: Add the Webhook as a GitHub Secret”

Goal: GitHub Actions can reference your webhook URL without you committing it to the repo.

  1. Go to your repo on GitHub.
  2. Click the “Settings” tab (top of the repo page, right side).
  3. In the left sidebar, find and click “Secrets and variables” (under the “Security” section).
  4. Click the sub-item “Actions”.
  5. You should see a page titled “Actions secrets and variables”. Click the green “New repository secret” button (top right).
  6. Name: DISCORD_WEBHOOK (exactly this, uppercase, with highlight, no spaces).
  7. Secret: Paste the webhook URL from Step 3.
  8. Click “Add secret”.

The secret is now stored. GitHub will never show you the value again, only its name. That’s normal and intentional.

The page should now list:

Repository secrets
DISCORD_WEBHOOK Updated now

If you see that, move on.

  • Naming it discord_webhook (lowercase). Secrets are case-sensitive. The workflow looks for exactly DISCORD_WEBHOOK. Fix: delete and re-add with correct casing.
  • Adding leading or trailing whitespace. Easy to do when pasting. GitHub trims trailing whitespace but not always. If alerts don’t fire later, delete and re-paste this secret first.
  • Confusing “secrets” with “variables”. The page has two tabs at the top: “Secrets” and “Variables”. Use Secrets for the webhook URL, variables are visible in logs.

Goal: The workflow can commit data/ changes back to your repo. Without that, the diff against the previous run does not work.

This is the step most people forget. If you skip it, the workflow will run successfully the first time but fail to commit, and the next run will treat every subdomain as new again.

  1. Still in your repo’s Settings, in the left sidebar click “Actions” (under the “Code and automation” section), then click the sub-item “General”.
  2. Scroll all the way to the bottom of the page. There’s a section titled “Workflow permissions”.
  3. Switch from “Read repository contents and packages permissions” to “Read and write permissions”.
  4. Also check the box “Allow GitHub Actions to create and approve pull requests”, not strictly needed for this repo, but it’s a good default and avoids edge cases.
  5. Click the “Save” button below the section.

Reload the page. The radio button should still be on “Read and write permissions”.

Move on.

The workflow’s last step, “Commit deltas to Repo”, runs git commit and git push. Without write permissions, that push fails with 403 Forbidden. You’d see green workflow runs in the Actions tab but the data/ directory would never update, and every subdomain would alert as “new” every 6 hours. (Annoying.)


Step 6: (Optional) Add Subdomain Enumeration API Keys

Section titled “Step 6: (Optional) Add Subdomain Enumeration API Keys”

Goal: Give subfinder more data sources so it finds more subdomains.

This step is optional but worth doing. The workflow’s “Configure API keys” step reads exactly two secrets, CHAOS_API_KEY and VIRUSTOTAL_API_KEY, and writes them into subfinder’s provider config. Without them subfinder still runs, using only its free sources. Both keys are free.

  1. Go to https://chaos.projectdiscovery.io
  2. Sign up with GitHub.
  3. After login, your dashboard shows an API key. Copy it.
  4. Back in GitHub: Settings → Secrets and variables → Actions → New repository secret
  5. Name: CHAOS_API_KEY, Value: (paste)
  1. Go to https://www.virustotal.com/gui/my-apikey
  2. Sign up if needed.
  3. Your API key is on that page.
  4. GitHub secret: VIRUSTOTAL_API_KEY

Other sources (SecurityTrails, Shodan, and so on) work too, but you must first add a matching line to the “Configure API keys” step in recon.yml. The workflow ignores secrets it does not reference. Secret names starting with GITHUB_ are reserved by GitHub, so pick a different prefix if you add a GitHub token.

You can add keys later. Your first run will still find plenty of subdomains.

Go back to the Secrets page in GitHub. You should see something like:

Repository secrets
CHAOS_API_KEY Updated 2 minutes ago
DISCORD_WEBHOOK Updated 8 minutes ago
VIRUSTOTAL_API_KEY Updated 5 minutes ago

Move on.


Goal: A real domain in the TARGETS secret that the workflow will monitor.

The workflow reads its targets from a repository secret named TARGETS, a comma-separated list of root domains.

  1. In your repo go to Settings → Secrets and variables → Actions → New repository secret.
  2. Name: TARGETS (uppercase).
  3. Secret: one or more root domains separated by commas, with no spaces and no https://. For example: example.com or example.com,acme-corp.io.
  4. Click “Add secret”.

Format rules:

  • Valid: example.com, acme-corp.io
  • Invalid: https://example.com (no scheme), *.example.com (no wildcards, since subfinder discovers the subdomains), example.com/login (no paths), example.com, acme-corp.io (no space after the comma)
  • One bug bounty program’s root domain per entry.
  • If a program covers *.target.com AND *.target.io, add both, comma-separated.
  • Programs with very narrow scope (just app.target.com, no wildcard) are a poor fit for this monitor, which is built for wildcard programs.

To change targets later, edit the secret. GitHub never shows the old value, so retype the full list.

Use a domain you OWN, such as your personal site. The workflow will run and you’ll get a small alert. This is the safest way to verify the pipeline end to end.

Once the TARGETS secret exists, move on.


Goal: Force the first run instead of waiting up to 6 hours for the cron.

  1. In your repo, click the “Actions” tab (top of the repo, between “Pull requests” and “Projects”).
  2. The first time you visit, GitHub may show a banner: “Workflows aren’t being run on this forked repository” or similar. If so, click “I understand my workflows, go ahead and enable them.” This only happens for forks/templates, not fresh repos.
  3. In the left sidebar, you’ll see one workflow listed: “Daily Bug Bounty Recon”.
  4. Click “Daily Bug Bounty Recon”.
  5. On the right side of the page, you’ll see “This workflow has a workflow_dispatch event trigger.” with a dropdown button: “Run workflow”.
  6. Click “Run workflow”. A small dropdown opens.
  7. Branch should be main (default). Leave it.
  8. Click the green “Run workflow” button inside the dropdown.

The page may not auto-refresh. Reload it after about 5 seconds. A new row will appear at the top of the workflow runs list with a yellow spinner: “Daily Bug Bounty Recon #1, in progress”.

Click into that run to watch progress. You’ll see one job called “recon” with these steps:

  1. Checkout (actions/checkout@v4)
  2. Setup Go
  3. Install ProjectDiscovery tools. This runs go install for subfinder, anew and subzy. It is the slow step, a few minutes.
  4. Configure API keys. Writes the subfinder provider config.
  5. Run recon pipeline. This is the actual work: subfinder per target, the diff, and the Discord alert. Time depends on target size.
  6. Commit deltas to Repo
  • Roughly 5-15 minutes per run. The workflow does not cache tools, so the install step repeats every run.

Go make a coffee. The page will update automatically once each step finishes.

Green check = success. Red X = failure. Yellow spinner = still running.

Click the failed step to see logs. Common first-run failures:

  • “Permission denied” on git push: You skipped Step 5. Go back and enable write permissions.
  • YAML error or no run appears: Check that the file is exactly .github/workflows/recon.yml and that the paste kept the indentation.
  • No subdomains found: Did you create the TARGETS secret with a valid root domain and no spaces?

When the run finishes green, move to Step 9.


Goal: A real alert from the workflow lands in your Discord channel.

Open Discord and go to the channel where you put the webhook. Within 30 seconds of the workflow’s “Run recon pipeline” step completing, you should see a message like:

[example.com] 47 new subdomains detected!

api.example.com
admin.example.com
blog.example.com
... (first 20 shown)

The workflow sends one message per target and lists the first 20 new subdomains. The full list is in data/<target>/new.txt in your repo.

Why “new” when nothing was actually new?

Section titled “Why “new” when nothing was actually new?”

The first run treats every subdomain it finds as new because the workflow has no prior state to diff against. That’s why the first alert is a big one. Subsequent runs will be quiet, you’ll only get alerts when subfinder finds a subdomain that wasn’t in the previous run’s data/<target>/known.txt.

Setup is done. The pipeline is live. From here on:

  • The workflow runs automatically every 6 hours.
  • You’ll get a Discord notification only when there are new subdomains.
  • The workflow does not run nuclei, probe ports, or check takeovers. For those, use the VPS script in Automated Recon.
  • Your repo’s data/ directory becomes a historical archive of every subdomain ever seen on each target, commit history shows the timeline.

If you got NO alert but the workflow shows green

Section titled “If you got NO alert but the workflow shows green”

Most likely causes (check in order):

  1. DISCORD_WEBHOOK secret is missing or wrong. Go to Settings → Secrets → Actions. If DISCORD_WEBHOOK isn’t listed, you skipped Step 4. If it IS listed but the URL is wrong, you can’t see/edit, just delete and re-add.
  2. The TARGETS secret is missing or malformed. Re-create it with a comma-separated list and no spaces.
  3. The target has zero subdomains. Unlikely but possible for tiny domains. Try a target with broader presence (any major company).
  4. Look at the workflow logs. Actions → click the run → click “Run recon pipeline”. Check that subfinder printed subdomains and that curl did not return an error. If subfinder found nothing, no alert is sent.

The cron: '0 */6 * * *' schedule means the workflow auto-runs at 00:00, 06:00, 12:00 and 18:00 UTC every day. There’s nothing more to set up, GitHub Actions handles it.

One quirk: GitHub disables scheduled workflows on repos with no activity for 60 days. As long as you commit something occasionally (or workflow runs commit data/ changes back), this won’t apply to you. The workflow commits only when data/ changed, so a quiet target can still go idle. Make a small commit now and then, or re-enable the workflow if GitHub disables it.


Setup is done. Here’s what to expect over the next few weeks.

The scheduled workflow fires every 6 hours. You’ll likely get alerts on the first 1-3 scheduled runs as subfinder discovers subdomains it missed initially, then it’ll go quiet for stretches as the diff converges.

A realistic alert cadence stabilizes. Expect 0-3 alerts a day. Quiet days are normal.

If you’re seeing 50+ alerts per day, something’s wrong. Tighten the target list or see the alert-hygiene advice in Automated Recon.

This is when the value starts to show. New subdomains are rare and high-signal. When you DO get an alert, that subdomain is fresh attack surface that 99% of other hunters haven’t even seen yet.

This is the bug-bounty advantage: you’re first to the new infrastructure, every time.

  1. Stop scrolling. Open the subdomain in a browser. Or curl -sI it from your terminal.
  2. Check what it is. Login page? Internal admin tool? Staging API? File upload feature?
  3. Apply the bug class playbook from the guide’s bug classes, IDOR if it’s an API (see the IDOR checklist), info disclosure if it’s a debug endpoint, subdomain takeover if subzy flagged it.
  4. Don’t rush. First hunter ≠ best hunter. Take 30 minutes to map the new asset before you start firing payloads.

The repo is largely self-maintaining. Things to do occasionally:

  • Add new programs: edit the TARGETS secret. The next run picks them up.
  • Remove out-of-scope targets: remove the domain from the TARGETS secret. The state files stay in data/ for reference, and you can delete them.
  • Rotate API keys: sign up for new sources as they emerge. Add them to GitHub Secrets and add a line for each in the “Configure API keys” step of recon.yml.
  • GitHub Actions usage: One run is roughly 5-10 minutes. 4 runs a day × 7 min × 30 days is about 840 minutes a month. Time grows with the number of targets.
  • Free tier limit (private repos): 2,000 minutes/month.
  • Practical capacity at free tier: a few targets at this cadence. For more, reduce frequency (cron '0 */12 * * *') or buy more Actions minutes.

Many serious hunters end up on a $5/mo VPS running cron instead of Actions, but Actions is the right place to START. You can migrate later.

  • Re-read section 11 of the guide, your week-by-week roadmap.
  • The guide’s Automated Recon section covers the VPS script, alert hygiene, and the scope rules for automation.
  • If alerts are noisy: split your Discord channels (#takeovers for high-priority only, #new-subs for routine).

Good hunting.

Connections4 backlinks · 4 outgoing · 1 cross-guideFull graph →
Open local graph around this page
Open full graph →
Click a node to open · Drag to reposition · Scroll to zoom

Bug Hunting for BeginnersFor authorized testing only. Read the ethics note before you put a domain in scope.