Skip to content

The unattended night

5 min readRecon Atlas

A pipeline that has died and a pipeline with nothing to report look identical in the morning. Five minutes of checks before bed prevent most bad nights: disk, scope, locks and a dry run of one stage. Ten minutes in the morning turn the night’s output into decisions. Thirty minutes a week keep the scoring honest. A heartbeat and an outside health check tell you when the pipeline itself has died.


Run these the first few nights, and after any change to scope, scripts or tools. The checklists page has a tick-box version.

Terminal window
# 1. Disk: warn if less than 5 GB is free on the pipeline filesystem
free_gb=$(df -BG --output=avail ~/pipeline | tail -1 | tr -dc '0-9'); echo "free: ${free_gb} GB"; [[ $free_gb -lt 5 ]] && echo "LOW DISK: fix before running"
Terminal window
# 2. Scope: the files exist, are non-empty, and say what you think they say
for p in ~/pipeline/programs/*/; do echo "== $p"; grep -vE '^\s*(#|$)' "$p/scope/in-scope.txt"; grep -E '^(RATE|AUTOMATED_SCANNING)=' "$p/scope/policy.env"; done
Terminal window
# 3. Locks: nothing is running, so tonight's run will not be refused with exit 5
for l in ~/pipeline/programs/*/state/.lock; do flock -n "$l" true && echo "free: $l" || echo "HELD: $l"; done
Terminal window
# 4. Dry run one stage by hand: enumeration only, scope-filtered, nothing active
PROGRAM=example; sed -nE 's/^\*\.([^ #]+).*/\1/p' ~/pipeline/programs/$PROGRAM/scope/in-scope.txt | subfinder -silent | PROGRAM=$PROGRAM ~/pipeline/bin/inscope | head
Terminal window
# 5. Pre-flight: what each active stage would touch (Part 4)
PROGRAM=example ~/pipeline/bin/preflight | less
Terminal window
# 6. The scheduler will actually fire
systemctl --user list-timers | grep auto-triage

If any step surprises you, do not run unattended tonight. Fix it, then run once while watching.

Ten minutes, the same order every day. The goal is a decision for every new item, written down.

  1. Health first (1 minute). Did the pipeline run? Read the heartbeat and the last lines of the run log.

    Terminal window
    # Last run status per program: heartbeat line and any warnings
    for p in ~/pipeline/programs/*/; do printf '%-12s %s\n' "$(basename "$p")" "$(cat "$p/state/heartbeat" 2>/dev/null || echo MISSING)"; grep -h 'WARN\|FATAL' "$p/current/run.log" 2>/dev/null | tail -3; done
  2. New findings (4 minutes). Read the digest, or current/triage.tsv directly. For each line: open evidence/<fp>/meta.txt and response.txt.

    Terminal window
    # Everything the last run delivered, highest severity first
    sort -t$'\t' -k1,1 ~/pipeline/programs/example/current/triage.tsv | column -t -s$'\t'
  3. Decide (3 minutes). Every finding gets one of three outcomes, recorded:

    • Confirm: reproduce by hand, write manual.md, then move the folder to reports/ and start a report (see writing reports).
    • Suppress: add a line to state/suppress.txt with the date and reason.
    • Park: leave it; it is already in the ledger and will not alert again. Note it in notes.md if you want to come back.
    Terminal window
    # Move a confirmed finding into the reports folder, keeping its fingerprint as the folder name
    mv ~/pipeline/programs/example/evidence/2d7bbe2f093b189d ~/pipeline/programs/example/reports/
    Terminal window
    # Suppress a template on this program, with a date and reason
    echo "tid:tech-detect # $(date -u +%F) informational, never actionable here" >> ~/pipeline/programs/example/state/suppress.txt
  4. Queue (2 minutes). Read the top ten lines of current/queue.tsv. Anything new near the top is where today’s manual testing starts.

If the review regularly takes more than ten minutes, the pipeline is sending too much. That is a tuning problem, not a discipline problem.

Thirty minutes, once a week, with the weekly checklist.

Task Command or file Decision
Re-score last week’s tested leads The outcome rates in Part 5 Move at most one or two weights, by 5 or 10
Check the alert budget Part 7 template counts Suppress or reroute the noisiest template
Review suppressions state/suppress.txt Remove lines whose reason no longer holds (a fixed host, a policy change)
Check timing grep 'timed out' runs/*/run.log for the week Raise a timeout or shrink a stage’s input
Update tools and templates pdtm -update-all, nuclei -update-templates Run one stage by hand after updating; flags and JSON fields can change
Refresh the CVE list Part 6 Check the file’s date is this week
Commit state git commit in ~/pipeline A message saying what you changed and why

Updating tools in the middle of the week, then leaving the pipeline to run, is a classic cause of a silent failure. Update during the weekly session, while you are watching.

The dangerous failure is not a crash. It is the pipeline that stops producing output while everything looks calm. Three cheap defences.

Run folders accumulate. Each one is small, but screenshots and responses add up, and a full disk makes every stage fail at once.

Terminal window
# Delete run folders older than 30 days, keeping current and everything in reports/ and evidence/
find ~/pipeline/programs/*/runs -mindepth 1 -maxdepth 1 -type d -mtime +30 -exec rm -rf {} +
# /etc/logrotate.d/auto-triage: rotate the scheduler's own log weekly, keep 8 compressed copies
/home/hunter/pipeline/cron.log {
weekly
rotate 8
compress
missingok
notifempty
copytruncate
}

Run the cleanup as its own scheduled job, not inside the pipeline, so a pipeline bug cannot also break cleanup. Never auto-delete evidence/ or reports/; those are yours to clean.

At the very end of a successful run, the worked pipeline writes one line to state/heartbeat: the run stamp, ok, and the finding count. A run that died halfway never writes it. So the heartbeat’s age tells you when the last good run finished.

Terminal window
# Alert if any program's heartbeat is older than 26 hours (a daily job plus slack for random delay)
for h in ~/pipeline/programs/*/state/heartbeat; do age=$(( ($(date +%s) - $(stat -c %Y "$h")) / 3600 )); [[ $age -gt 26 ]] && echo "STALE ${age}h: $h"; done | notify -id health -bulk -silent

That check itself runs from the scheduler, separately from the pipeline. If the pipeline and its own health check share one script, one bug kills both.

The heartbeat check runs on the same VPS. If the VPS itself is down, nothing alerts. An outside “dead man’s switch” service solves that: your box pings a URL after each good run, and the service alerts you if the ping stops arriving. Healthchecks.io is one such service with a free tier and an open-source self-hosted version; check its docs for current limits.

Terminal window
# Add to the end of a successful run: ping the outside check, with a timeout and a few retries
curl -fsS -m 10 --retry 3 "https://hc-ping.com/$HC_UUID" >/dev/null || log "WARN health ping failed"
Defence Catches Misses
Run log warnings A stage timing out or erroring The whole script not starting
Heartbeat age check Runs that died or never started The VPS being down
Outside ping service VPS down, scheduler broken, network gone Runs that “succeed” with empty output
Weekly summary counts (Part 7) Runs that succeed but find zero hosts for days Nothing, if you read it

The last row matters. A data source that dies, an expired API key or a resolver list gone stale can produce a run that exits 0 with a tiny host count. The weekly summary’s “new hosts” and the run log’s host count are how you notice. If a program that usually shows 1,400 hosts suddenly shows 40, something broke upstream.

2026-11-14T034510Z ok findings=4

The finish block writes this with printf '%s ok findings=%s\n'. The count is wc -l of that run’s triage.tsv.

This record asserts stage 8 reached the end and the file’s mtime moved. It does not assert the four rows are confirmed bugs. Open current/triage.tsv and decide each one.

HELD: /home/hunter/pipeline/programs/example/state/.lock

This record asserts flock -n could not take the lock, so a live process still holds it. The runner takes that lock with exec 9>"$P/state/.lock".

This record does not assert the pipeline crashed. A flock drops when the holder exits, including a crash, so a leftover .lock file after a reboot is not a held lock. HELD means the process is still alive. It does not mean the process is making progress. Read current/run.log. If lines are still arriving, let the run finish. If the log has stopped, the holder is hung.

[2026-11-14T02:30:00Z] WARN enum timed out after 1800s

This record asserts timeout returned 124 for the enum stage and the stage helper logged it. The enum budget in the worked pipeline is 1800 seconds. Stderr for that stage is logs/enum.err in the run folder.

This record does not assert enumeration produced nothing. Stdout written before the kill stays in subfinder.txt, and the pipeline keeps that partial list. Exit 6 happens when no in-scope hosts remain, not merely because this WARN exists.

Morning review0/5

Next, decide whether you need more than one machine in Scaling up.

Connections11 backlinks · 6 outgoingFull graph →
Open local graph around this page
Open full graph →
Click a node to open · Drag to reposition · Scroll to zoom

Recon AtlasFor authorized testing only. Your scope is the map edge.