A harness we built ourselves
The testing agent runs inside a harness that Midnira wrote. Off-the-shelf autonomous testing tools let the model drive. For work on a client's live systems, we wanted the limits in code that we own and can show you. The model chooses what to look at next. Code decides whether it may.
- Scope
- Each target is checked against the signed authorization at the moment of contact. A name is looked up again every time, and the tool is given the approved addresses, not the name. What cannot be verified is refused.
- Options
- Every tool has a short list of options it may use and speed caps the agent cannot lift. Anything else is refused.
- Pace
- One rate budget covers every worker, so agents running in parallel cannot crowd a host.
- Record
- Every decision goes into the log, the refusals too, with the exact command that ran.
No exploitation or denial-of-service tools are wired into it. Its tests run without touching a network, and each stage of the build gets a security review before the next begins.
scope.pyThe check every address goes through
# ---- direct IP target -------------------------------------------------
if kind == "ip":
ip = _canon_ip(host)
if ip is None:
return ScopeDecision(DENY, target, kind, host, [],
"unparseable IP target")
chost = str(ip) # canonical form, used as the rate-limit key too
for net in scope.exclude_cidrs:
if ip in net:
return ScopeDecision(DENY, target, kind, chost, [chost],
f"ip in exclude_cidr {net}", str(net))
# a special/non-public IP is in scope only if explicitly included
if _is_special(ip) and not any(ip in net for net in scope.include_cidrs):
return ScopeDecision(DENY, target, kind, chost, [chost],
"special/non-public IP not covered by an "
"explicit include_cidr")
for net in scope.include_cidrs:
if ip in net:
return ScopeDecision(ALLOW, target, kind, chost, [chost],
f"ip in include_cidr {net}", str(net),
scan_ips=[chost])
return ScopeDecision(DENY, target, kind, chost, [chost],
"ip not within any include_cidr")
recon-runWhat the agent gets back
$ recon-run nmap 10.20.0.14 --dry-run -- -sV -p 443
[DRY-RUN] nmap 10.20.0.14 :: dry run (not executed)
resolved: 10.20.0.14
argv: nmap -sT -T2 --max-rate 100 --host-timeout 15m -sV -p 443 10.20.0.14
$ recon-run nmap 10.20.0.53 -- -sV
[REFUSED] nmap 10.20.0.53 :: scope: ip in exclude_cidr 10.20.0.53/32
resolved: 10.20.0.53
$ recon-run nmap 10.20.0.14 -- --script vuln
[REFUSED] nmap 10.20.0.14 :: args: flag '--script' is blocked: NSE scripts are not permitted in the recon tier (flag for manual follow-up)
resolved: 10.20.0.14
The code is copied from the harness as written. The output is the harness's own, run against the example scope above.