// tech stack
// the challenge
Attack surface changes quietly: a forgotten subdomain starts answering, a database port opens to the internet, a panel title changes from 'Welcome' to 'Jenkins'. Point-in-time scanners produce raw text dumps that a human has to compare by hand, and a failed discovery run easily looks like 'everything disappeared', which creates false diffs and destroys trust in the report.
// the solution
ASTrack orchestrates existing tools behind a single Bash entrypoint with strict mode (set -Eeuo pipefail), per-stage timeouts and a trap-based temp-file cleanup. Discovery output is filtered to the requested domain, every stage writes into an isolated run directory, and snapshot.sh commits the merged JSON atomically, so a failed or empty discovery aborts before the baseline is replaced. diff.sh compares snapshots with jq and comm, and risk.sh evaluates four pipe-delimited rule files — ports, titles, security headers and TLS — against both the diff and the current snapshot so new hosts are assessed, not only changed ones.
// measurable impact
One command now answers the only question that matters for monitoring: what changed since yesterday. New subdomains, newly exposed ports, new web hosts and metadata drift arrive as JSON for tooling and as a single self-contained HTML report for humans, with risky ports and exposed admin panels already classified by severity. It also runs fully offline in tests: the suite validates Bash syntax, diffing, critical-risk classification and HTML escaping against local fixtures, and CI adds ShellCheck on every push.
- Timeline
- Jun 2026 – Aug 2026
- Team
- Solo
- Role
- Architecture, Bash implementation, jq diff engine, risk rules, tests, CI and v0.1.0 release
// key highlights
- ◆Eight Bash modules (discovery, ports, web, snapshot, diff, risk, report, dependencies) behind one `astrack.sh scan <domain>` entrypoint
- ◆Failed discovery aborts the run and never replaces a valid baseline snapshot
- ◆jq-driven diff of subdomains, ports, web hosts, titles, status codes, servers and technologies
- ◆Pipe-delimited risk rules for ports, titles, security headers and TLS — extensible without touching code
- ◆Self-contained HTML report with escaping verified by a fixture that tries to inject a script tag
- ◆ShellCheck plus offline integration tests in GitHub Actions on every push and pull request
// implementation sample
run_with_timeout() {
local seconds="$1"; shift
require_command timeout
timeout --preserve-status --signal=TERM --kill-after=5s "${seconds}s" "$@"
}
resolve_httpx() {
local candidate output
for candidate in "$ASTRACK_ROOT/go/bin/httpx" "$(command -v httpx 2>/dev/null || true)"; do
[[ -x "$candidate" ]] || continue
output="$("$candidate" -version 2>&1 || true)"
# The Python client shares the name; only ProjectDiscovery httpx is accepted.
if [[ "$output" == *"Current Version:"* || "$output" == *"projectdiscovery"* ]]; then
printf '%s\n' "$candidate"
return 0
fi
done
return 1
}