# Lastproof

> 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.

- Skill: `codejunkie99/lastproof` (Agent Skill)
- Install (CLI): `npx get-skill add codejunkie99/lastproof`
- Raw SKILL.md: https://api.skillmd.com/api/skills/codejunkie99/lastproof/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Data & Analytics
- Author: codejunkie99 (https://skillmd.com/u/codejunkie99)
- Updated: 2026-11-16
- Page: https://skillmd.com/skills/codejunkie99/lastproof

---


# 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)
1. read `keelsec.scope.toml` in the repo root. if it is missing, stop and ask the user to create it. never write it yourself.
2. the target must be listed there, and the user must have confirmed in this session that they own it.
3. 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.
4. refuse production unless the entry says `allow_production = true`, which only the user may write.
5. if any check fails, stop with "refused by scope" and send nothing.

example scope file:
```toml
[[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
1. pass the scope gate. read the finding and the code at that location.
2. write the exact requests you will send and the result that would confirm or rule it out. show them to the user.
3. send at most 10 requests for the finding.
4. mark `confirmed`, `not_reproduced` (with what you tried), or `inconclusive` (with why).
5. 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
```json
{"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.

