lastproof: confirm or kill one finding
job
answer "is this one finding real on the running app" with the smallest safe test, so the user fixes real bugs first and drops false alarms.
gap it targets
- evidence (public record): the open autonomous pentest agents run whole engagements, and some are AGPL. lastproof does a narrower job under MIT: one finding, one proof, read only.
- hypothesis: per-finding proofs remove more false positives from static output than a full pentest run does. not measured.
scope gate (do this before any packet)
- read
keelsec.scope.toml in the repo root. if it is missing, stop and ask the user to create it. never write it yourself.
- the target must be listed there, and the user must have confirmed in this session that they own it.
- refuse, even if listed: cloud metadata and link-local addresses (
169.254.0.0/16 including 169.254.169.254 and 169.254.170.2, fd00:ec2::254, 100.100.100.200, metadata.google.internal, metadata.azure.com), and any host that resolves to one of them. resolve the name first and check the IP, so a DNS trick cannot point you there.
- refuse production unless the entry says
allow_production = true, which only the user may write.
- if any check fails, stop with "refused by scope" and send nothing.
example scope file:
[[target]]
name = "staging"
url = "https://staging.example-owned.dev"
proof = "http-token" # local | compose | http-token | dns-txt
allow_active = false
max_rps = 5
inputs
- one finding ID from sinkmark, tidegate, or ropewalk, and a scope entry with
allow_active = true.
proof types (all read only)
- SQL injection: send the normal value, then the same value with a harmless always-true and always-false tail. a stable difference in result count or page body is a confirm. time-based checks only if the user agrees, at most 2 seconds, at most 3 tries.
- code eval: send an arithmetic expression like
7*191 and look for 1337 in the reply. no imports, no file or OS access.
- reflected output: send a unique marker inside a harmless tag and check whether it comes back unencoded.
- access control: covered by ropewalk's two-account method.
- anything else: write the planned request and ask the user first.
method
- pass the scope gate. read the finding and the code at that location.
- write the exact requests you will send and the result that would confirm or rule it out. show them to the user.
- send at most 10 requests for the finding.
- mark
confirmed, not_reproduced (with what you tried), or inconclusive (with why).
- after a fix, rerun the same requests and record the result as proof of the fix.
what counts as a finding
- an update to an existing finding's
status, with the requests and responses attached (secrets redacted).
output
{"id":"ks-3b91","command":"lastproof","rule_id":"ks.py.sqli.string-built-query","kind":"sast","status":"confirmed","target":{"url":"https://staging.example-owned.dev/user?id=1","method":"GET"},"evidence":"true-tail returns 12 rows, false-tail returns 0, normal returns 1","sources":["sinkmark","lastproof"]}
today vs later
- today:
curl with the planned requests.
- once the keelsec engine exists:
keelsec lastproof <finding-id> --target staging.
stop and scope
- never dump tables, read files, write data, or try to get a shell. proving the flaw exists is the goal; using it is out of scope.
- never run against production, even if the finding looks urgent. tell the user instead.
1---2name: lastproof3description: "Use when a static finding needs a yes or no: take one specific finding, such as a suspected SQL injection, and try a safe, read-only proof against the user's own staging app to mark it confirmed, not reproduced, or inconclusive."4metadata:5 source: https://skillmd.com/skills/codejunkie99/lastproof6---78# lastproof: confirm or kill one finding910## job11answer "is this one finding real on the running app" with the smallest safe test, so the user fixes real bugs first and drops false alarms.1213## gap it targets14- evidence (public record): the open autonomous pentest agents run whole engagements, and some are AGPL. lastproof does a narrower job under MIT: one finding, one proof, read only.15- hypothesis: per-finding proofs remove more false positives from static output than a full pentest run does. not measured.1617## scope gate (do this before any packet)181. read `keelsec.scope.toml` in the repo root. if it is missing, stop and ask the user to create it. never write it yourself.192. the target must be listed there, and the user must have confirmed in this session that they own it.203. refuse, even if listed: cloud metadata and link-local addresses (`169.254.0.0/16` including `169.254.169.254` and `169.254.170.2`, `fd00:ec2::254`, `100.100.100.200`, `metadata.google.internal`, `metadata.azure.com`), and any host that resolves to one of them. resolve the name first and check the IP, so a DNS trick cannot point you there.214. refuse production unless the entry says `allow_production = true`, which only the user may write.225. if any check fails, stop with "refused by scope" and send nothing.2324example scope file:25```toml26[[target]]27name = "staging"28url = "https://staging.example-owned.dev"29proof = "http-token" # local | compose | http-token | dns-txt30allow_active = false31max_rps = 532```3334## inputs35- one finding ID from sinkmark, tidegate, or ropewalk, and a scope entry with `allow_active = true`.3637## proof types (all read only)38- SQL injection: send the normal value, then the same value with a harmless always-true and always-false tail. a stable difference in result count or page body is a confirm. time-based checks only if the user agrees, at most 2 seconds, at most 3 tries.39- code eval: send an arithmetic expression like `7*191` and look for `1337` in the reply. no imports, no file or OS access.40- reflected output: send a unique marker inside a harmless tag and check whether it comes back unencoded.41- access control: covered by ropewalk's two-account method.42- anything else: write the planned request and ask the user first.4344## method451. pass the scope gate. read the finding and the code at that location.462. write the exact requests you will send and the result that would confirm or rule it out. show them to the user.473. send at most 10 requests for the finding.484. mark `confirmed`, `not_reproduced` (with what you tried), or `inconclusive` (with why).495. after a fix, rerun the same requests and record the result as proof of the fix.5051## what counts as a finding52- an update to an existing finding's `status`, with the requests and responses attached (secrets redacted).5354## output55```json56{"id":"ks-3b91","command":"lastproof","rule_id":"ks.py.sqli.string-built-query","kind":"sast","status":"confirmed","target":{"url":"https://staging.example-owned.dev/user?id=1","method":"GET"},"evidence":"true-tail returns 12 rows, false-tail returns 0, normal returns 1","sources":["sinkmark","lastproof"]}57```5859## today vs later60- today: `curl` with the planned requests.61- once the keelsec engine exists: `keelsec lastproof <finding-id> --target staging`.6263## stop and scope64- never dump tables, read files, write data, or try to get a shell. proving the flaw exists is the goal; using it is out of scope.65- never run against production, even if the finding looks urgent. tell the user instead.