Scoring and triage engines
Hand-ranking hundreds of hosts every morning does not scale, but your judgment about which ones matter does. The testing guide taught you which signals make a host worth testing. This part turns that judgment into an additive score with weights in a plain config file. The pipeline then ranks hosts the way you would, and you can tune the weights from your own accepted and rejected reports. jq reads the data, awk does the arithmetic, and a suppression list keeps known noise out.
From signals to a number
Section titled “From signals to a number”The triage guide explains why staging hosts, self-hosted panels, odd status codes and hosts with no CDN deserve your time first. That reasoning stays the same. Automation adds two things: every host is scored the same way every night, and the weights are written down where you can change them.
The formula is a plain weighted sum. Each signal is a yes or no question about a host. Each yes adds its weight. Negative weights push hosts down.
# The scoring formulascore(host) = sum over signals of weight(signal) x matched(signal, host) where matched is 1 if the signal fires, otherwise 0A weighted sum is deliberately simple. You can explain every score in one line, which the pipeline writes into a why column. Fancier models are harder to tune and harder to trust at 7 AM.
The scoring config
Section titled “The scoring config”Weights live in etc/score.conf, shared by all programs, with an optional per-program override at programs/<name>/etc/score.conf. The pipeline fails closed if the file is missing.
# Keywords are awk regexes, matched against the lowercased host name and page title.kw_staging=(^|[^a-z])(dev|stag|staging|uat|test|qa|preprod|sandbox)([^a-z]|$)kw_panel=(admin|login|dashboard|jenkins|grafana|kibana|console|manager)odd_status=^(401|403|500)$
# Weights. Positive raises a host in the queue, negative lowers it.w_staging=30 # non-production name or titlew_panel=25 # admin panel or self-hosted product in the titlew_port=15 # served on a port other than 80 or 443w_status=10 # 401, 403 or 500 at the rootw_new=20 # host first seen in this runw_unique_len=10 # content length no other host shares (needs 20 or more hosts)w_cdn=-15 # behind a CDN: more filtering, often more hardenedw_cve=20 # detected tech has a CVE published in the last 90 days (Part 6)The starting weights above are opinions, not measurements. They encode the core testing priority order: non-production and panels first, then unusual exposure, then freshness. Your own outcomes will move them. See tuning from outcomes below.
What each signal reads
Section titled “What each signal reads”| Signal | Source field | Why it earns points | Common false positive |
|---|---|---|---|
| Staging keyword | host name, httpx title |
Debug on, auth off, test data | latest, contest without the boundary in the regex |
| Panel keyword | httpx title |
Known product, known bugs, default logins | A marketing page titled “Login to your dashboard” |
| Uncommon port | httpx port |
Services nobody put behind the main proxy | Port 8443 that is the same app as 443 |
| Odd status | httpx status_code |
Something gated or broken worth a look | A host that 403s everything because it is offline to you |
| New host | new-hosts.txt from anew |
Zero testers so far | Rotating cloud names that come and go daily |
| Unique content length | httpx content_length across all hosts |
Not a clone of the marketing site | Small scopes where every host is unique, hence the 20-host minimum |
| CDN | httpx cdn |
Pushes hardened, filtered hosts down | Origin exposed elsewhere; see origin discovery and WAF bypass |
| Fresh CVE tech | httpx tech against state/cve-tech.txt |
Patch windows are open | Product match without a version match. Part 6 tags these as unconfirmed |
| Missing security headers | response headers | Weak signal of a careless deployment | Almost everything on the internet. Keep the weight small |
Missing headers are not in the worked pipeline’s formula, because httpx does not put response headers in its JSON by default. httpx has an option to include them. Check the README for the current flag name. Add the signal only if you find it changes your ranking; on most programs it does not.
Worked through on example rows
Section titled “Worked through on example rows”These are the real rows the worked pipeline produced in its test run, using the config above.
| URL | Port | Status | Title | Tech | CDN | New |
|---|---|---|---|---|---|---|
https://dev.example.com |
443 | 200 | Staging Admin Login | Nginx, Jenkins | no | yes |
http://jenkins.example.com:8080 |
8080 | 403 | Forbidden | Jetty | no | yes |
https://www.example.com |
443 | 200 | Example Home | Cloudflare | yes | yes |
state/cve-tech.txt contained jenkins. Fewer than 20 hosts, so the unique-length signal is off.
| URL | Signals that fired | Arithmetic | Score |
|---|---|---|---|
dev.example.com |
staging (30), panel (25), new (20), fresh CVE (20) | 30 + 25 + 20 + 20 | 95 |
jenkins.example.com:8080 |
port 8080 (15), status 403 (10), new (20) | 15 + 10 + 20 | 45 |
www.example.com |
new (20), CDN (-15) | 20 - 15 | 5 |
On the second night none of them is new, and the scores drop to 75, 25 and -15. That is intended: freshness is worth points only once. The output file queue.tsv keeps the reasons:
# runs/<stamp>/queue.tsv: score, URL, status, title, why95 https://dev.example.com 200 Staging Admin Login staging,panel,new,fresh-cve,45 http://jenkins.example.com:8080 403 Forbidden port8080,status403,new,5 https://www.example.com 200 Example Home new,cdn,Notice what the formula got right and wrong. jenkins.example.com scored well for the port and the 403, but the panel keyword missed it because the title was “Forbidden”. A human sees “jenkins” in the host name and moves it up. That is a tuning signal: add the host name to the panel match, or accept that the queue is a starting order, not a verdict.
The stage contract
Section titled “The stage contract”| Stage | Input | Output | Failure mode | Noise |
|---|---|---|---|---|
| Score | httpx.json, new-hosts.txt, state/cve-tech.txt, etc/score.conf |
queue.tsv sorted by score |
Missing config: run stops with exit 3. Empty httpx.json: empty queue, later stages skip. A broken regex in the config: awk errors, queue empty, logged |
Passive |
jq as the pipeline brain
Section titled “jq as the pipeline brain”jq reads JSON lines, filters them, reshapes them and writes TSV that awk and sort understand. Five recipes over httpx JSON output cover most of what a triage engine needs. Field names follow current httpx JSON; check one line of your own output first with head -1 httpx.json | jq ..
# 1. One clean TSV row per host: URL, status, length, title, tech listjq -r '[.url, .status_code, .content_length, (.title // "-"), ((.tech // []) | join(","))] | @tsv' httpx.json# 2. Group hosts by title and count them, to spot clones and the odd one outjq -r '.title // "-"' httpx.json | sort | uniq -c | sort -n | head -20# 3. Every host running a given product, with its version string if httpx detected onejq -r 'select((.tech // []) | any(test("^jenkins"; "i"))) | [.url, ((.tech // []) | map(select(test("^jenkins"; "i"))) | join(","))] | @tsv' httpx.json# 4. Content-length outliers: lengths that appear exactly once across all hostsjq -s -r 'group_by(.content_length) | map(select(length == 1)) | .[][] | [.content_length, .url] | @tsv' httpx.json# 5. Non-CDN hosts on uncommon ports with a non-200 status: a classic short listjq -r 'select((.cdn // false) == false and (.port | tostring | test("^(80|443)$") | not) and .status_code != 200) | [.status_code, .url, (.title // "-")] | @tsv' httpx.jsonThe // operator in jq means “use this default if the field is missing or null”. Use it on every optional field, or one host without a title breaks the whole stage.
One triage table
Section titled “One triage table”The morning question is “what should I open first”, and the answer needs three sources side by side: the score from httpx data, the Nuclei hits, and a screenshot to glance at. Join them on host into one table.
# Hosts with their highest Nuclei severity: host, severity, template idjq -r '[(.["matched-at"] | sub("^[a-z]+://"; "") | sub("[:/].*"; "")), .info.severity, .["template-id"]] | @tsv' current/nuclei.jsonl | sort -u > /tmp/hits.tsv# Screenshot paths keyed by host (adjust the pattern to your screenshot tool's file naming)find current/screens -type f -name '*.png' | awk '{f=$0; h=f; sub(/.*\//, "", h); sub(/(-[0-9]+)?\.png$/, "", h); gsub(/^https?[-_]+/, "", h); print h "\t" f}' > /tmp/shots.tsv# Join score, Nuclei hits and screenshots into current/triage-table.tsv, highest score firstawk -F'\t' -v OFS='\t' 'FILENAME==ARGV[1]{hit[$1]=hit[$1] $2 ":" $3 " "; next} FILENAME==ARGV[2]{shot[$1]=$2; next} {h=$2; sub(/^[a-z]+:\/\//,"",h); sub(/[:\/].*/,"",h); print $1, $2, $5, (h in hit ? hit[h] : "-"), (h in shot ? shot[h] : "-")}' /tmp/hits.tsv /tmp/shots.tsv current/queue.tsv > current/triage-table.tsv# current/triage-table.tsv: score, URL, why, nuclei hits, screenshot95 https://dev.example.com staging,panel,fresh-cve, critical:exposed-env screens/dev.example.com.png45 http://jenkins.example.com:8080 port8080,status403, medium:jenkins-panel screens/jenkins.example.com.pngScreenshot tools name their files differently, and naming changes between versions. gowitness, httpx’s -ss option and others each have their own scheme. Look at your own output folder and adjust the find pattern; this is a “check the README” step.
Suppression lists
Section titled “Suppression lists”Some findings are real and still not worth your attention: the program said “accepted risk”, you already reported it and it was a duplicate, or you decided a template is noise on this target. A suppression list hides them, with a reason, so you never have to make the same decision twice.
state/suppress.txt accepts three kinds of line. The worked pipeline checks all three.
# kind:value # date, reason (required, for future you)2d7bbe2f093b189d # 2026-11-14 reported, closed duplicate of an earlier reporttid:tech-detect # 2026-11-14 informational template, never actionable heretid:http-missing-security-headers # 2026-11-14 program policy excludes header findingshost:status.example.com # 2026-11-14 third-party status page, CNAME to a vendor| Kind | Hides | Use for |
|---|---|---|
| A bare fingerprint | One exact finding | Known duplicates, accepted risks for one instance, a finding you reported |
tid: plus a template ID |
Every finding from that template | Templates the program excludes by policy, or that always false-positive on this stack |
host: plus a host name |
Every finding on that host | Vendor-hosted assets that slipped past scope, decommissioned hosts that still resolve |
Ledger and suppression list together
Section titled “Ledger and suppression list together”They look similar and do different jobs.
| Ledger | Suppression list | |
|---|---|---|
| Written by | The pipeline, automatically | You, by hand |
| Means | “Already shown to the human” | “Do not show this, ever, for this reason” |
| Granularity | Exact fingerprint only | Fingerprint, template or host |
| If you delete a line | It alerts once more, then returns to the ledger | It comes back every run until you decide again |
| Reason recorded | No | Yes, always |
The order in the pipeline: a finding is dropped if it is in the ledger (seen) or suppressed (decided). Only findings that pass both reach verification and delivery. The ledger keeps growing on its own; the suppression list only grows when you decide something, which happens in the morning review.
Tuning weights from outcomes
Section titled “Tuning weights from outcomes”The scoring config is only as good as the evidence behind it. Every week, compare what the pipeline ranked highly with what turned into accepted reports.
Keep a small file of outcomes, one line per lead you actually tested, with the why column copied from the queue:
# programs/example/state/outcomes.tsv: date, URL, why at the time, outcome2026-11-02 https://dev.example.com staging,panel,new, resolved2026-11-05 https://www.example.com new,cdn, nothing-found2026-11-07 http://grafana.example.com panel, duplicate2026-11-09 https://uat-api.example.com staging,new, resolved# For each signal: how many tested leads carried it, and how many ended resolved (accepted)awk -F'\t' '{n=split($3,s,","); for(i=1;i<=n;i++) if(s[i]!=""){sub(/[0-9]+$/,"",s[i]); t[s[i]]++; if($4=="resolved") r[s[i]]++}} END{for(k in t) printf "%-14s tested=%-3d resolved=%-3d rate=%.0f%%\n", k, t[k], r[k], 100*r[k]/t[k]}' state/outcomes.tsv | sort -t= -k4 -rnRules for adjusting:
- Small samples lie. Do not move a weight on fewer than about 10 tested leads carrying that signal (an approximate rule of thumb; the right number depends on how different the rates are).
- Move one weight at a time, by 5 or 10, and note the date in a comment. If you change three at once you cannot tell which helped.
- A signal with zero resolved after many tests is a candidate for a lower weight, not deletion; it may still matter on another program.
- Per-program overrides are for real differences: a program whose staging hosts are all out of scope should get
w_staging=0in its ownetc/score.conf.
The outcomes file is a narrow, machine-readable slice of the hunting log that the sustainable hunting guide teaches you to keep. Keep the log for yourself and export the four columns here for the pipeline.
Next, re-check each ranked finding before it reaches you in the validation layer.
Open local graph around this page
Linked from here
- Staging token scoring decisionsRecon Atlas
- Auto-triage pipelinesRecon Atlas
- Pipeline thinkingRecon Atlas
- Scope enforcement as codeRecon Atlas
- State, storage and deduplicationRecon Atlas
- The unattended nightRecon Atlas
- The worked pipelineRecon Atlas
- Long-game habits and mindsetRecon Atlas
- Synthetic program profilesRecon Atlas
Recon AtlasFor authorized testing only. Your scope is the map edge.