(from, to) pair and assert the answer, including the pairs that must be
refused.
The alternative (one rule in the API handler, another in the scan reconciler,
a third in the expiry sweep) does not fail loudly. It fails as three subtly
different answers to “can a resolved finding be suppressed?”, discovered when a
customer’s audit does not reconcile.
The five states
The machine
The transition table
Everything not in that table is refused with a
400.
Two entries are worth reading twice. triaged → open is permitted: a finding
put back on the pile is a real outcome (“assessed, and it turns out somebody
else owns this”). And suppressed → suppressed is permitted, because amending
a suppression (extending it, shortening it, restating the justification) is a
decision, and it writes an event like any other.
Three refusals that are decisions, not omissions
A human cannot set resolved
resolved means a scan that would have found this did not. That is a
statement about evidence, not about opinion.
A button that set it would let a person assert evidence they do not have, and
the next scan would contradict them by reopening it.
- The way to close something you have decided not to fix is to suppress it, with a reason.
- The way to close something you have fixed is to rescan and let the absence speak.
PATCH /api/v1/findings/{id} with status: "resolved" is refused with a
message saying so: that status is established by a scan, not by a request.
A resolved finding cannot be suppressed
There is nothing to suppress: it is already closed. Pre-emptively accepting a risk that might return is a statement about an issue class rather than about this row, which makes it a policy object. A policy rule can name an advisory with anignore effect and have it apply everywhere, before the
finding exists.
reopened cannot be downgraded to open
reopened records that something was fixed once and came back. That is the
most interesting fact a vulnerability programme produces.
Letting a user quietly relabel it as open would erase a regression from the
backlog view while the timeline still says it happened: two records of one
fact, disagreeing. A reopened finding can be triaged or suppressed; it cannot
be made to look like it was never fixed.
What the scan does
Reconciliation is the other half of the machine, and it is whereresolved and
reopened come from:
Resolution by absence applies only to the scanner kinds that actually ran,
taken from the scan’s own result rather than from what the request asked for.
An engine that declines a scanner it cannot run would otherwise be read as
evidence that the findings of that kind are gone, silently closing an entire
backlog.
A suppressed finding is never resolved by absence. Doing so would discard the
acceptance: a package removed and re-added would come back as
reopened rather
than suppressed, silently undoing a permanent false-positive suppression. It
stays suppressed until its expiry returns it to the backlog, where the next
scan resolves it normally.
That leaves a real gap, stated rather than hidden: a permanently suppressed
finding for something long since removed never resolves. “Suppressed and not
seen in N scans” is a cleanup view, and it is not built.
Changing a state
findings:write. Suppression requires findings:suppress,
which is a separate permission. See
Tenancy and isolation.
Asking for the state a finding is already in
That succeeds, and writes nothing: no row, no event. A retried request, a double-clicked button and a stale tab all produce exactly that, and answering409 to any of them is a bug that reads as a race condition.
The exception is a suppression whose terms differ. Same status, different
reason or expiry, is an amendment rather than a no-op.
Conflicts are real
The write is conditional on the status the transition was evaluated against. Zero rows updated means something changed underneath (a scan reopened it, another tab suppressed it) and the caller gets409 rather than silently
clobbering the other writer’s decision. Two browser tabs and a scan racing a
user are not hypothetical.
Doing it in bulk
POST /api/v1/findings/bulk applies one action to many findings. It always
returns 200 when the request itself was valid, including when some items were
rejected: a caller branches on the counts in the body, not on the status line.
Validation of the intent (is the status assignable, is a suppression reason
present, is its expiry inside the permitted window) happens once, before any
write. The answer is the same for every finding in the batch, so a bulk request
with a missing reason is one request-level 400 rather than five hundred
identical per-item rejections that add up to a “partial success” in which
nothing could ever have succeeded.
Reachability from a given row’s state genuinely differs per finding, so that is
a per-item outcome: applied, already_applied, not_found,
invalid_transition or conflict. A finding belonging to another tenant
returns not_found, identical to one that does not exist.
Where to go next
- Suppression: reasons, expiry, and what happens when the clock runs out.
- Findings and identity: why a state survives a rescan at all.
- Policies and verdicts: how these states are read by a gate.