Findings
Bulk actions
Apply one triage decision, with one reason, to many findings at once, by selection or to every finding like a given one.
A bulk action applies one decision with one reason to several findings. You choose the findings by ticking them, or by pointing at one finding and asking for every finding like it. Each finding is still changed, audited and remembered on its own.
#What you need first
- Any member can do this in the console. By API, a key with the
writeoradminscope. - A reason, when the decision is False positive or Accepted risk. The same reason is recorded on every finding.
#In the console
#Selected findings
- Open Findings and filter the list.
- Tick the findings. The box in the header ticks every finding on the page. The selection is kept as you move between pages.
- Press Decide for all selected….
- Choose the Decision: False positive, Accepted risk, Patched or Open.
- Give the Reason. For an accepted risk you can also set Review on (optional).
- Press Apply to N findings.
Clear selection unticks everything.
#Every finding like this one
- Open a finding and go to Findings like this.
- Under Similar findings, press Decide all N like this….
- The dialog lists every finding the decision will apply to, each with its current state and location. Read the list.
- Choose the decision, give the reason, and apply.
"Like this" means the same repository, the same weakness class and the same dangerous statement. It is the group shown under Similar findings. It is not available for a finding with no record of its code's shape, such as a dependency finding.
#By API
POST /findings/bulk takes the decision and one or both ways of choosing findings.
| Field | Meaning |
|---|---|
ids | A list of up to 500 finding ids. |
like | One finding id. The decision applies to that finding and to every finding like it. |
expect | Used with like: the number of findings you expect the decision to apply to, counting the like finding itself. |
state | open, patched, accepted_risk or false_positive. Required. |
reason | Up to 2,000 characters. Required for accepted_risk and false_positive. |
reviewAt | A future date. Only with accepted_risk. |
state, reason and reviewAt follow the same rules as for a single finding. See Triage.
#ids
curl -s -X POST -H "Authorization: Bearer $NULLGAP_API_KEY" \
-H "Content-Type: application/json" \
-d '{"ids":["fnd_8f3a2c9d1b4e","fnd_2b7d0e5a9c13"],"state":"false_positive","reason":"Both ids are cast to integers in parseOrderId before they reach the query."}' \
"$NULLGAP_URL/api/orgs/$NULLGAP_ORG/findings/bulk"
An id that names no finding of the organisation does not fail the request. It is reported in skipped.
#like and expect
First ask how many findings are like the one you have:
curl -s -H "Authorization: Bearer $NULLGAP_API_KEY" \
"$NULLGAP_URL/api/orgs/$NULLGAP_ORG/findings/fnd_8f3a2c9d1b4e/similar"
The answer's similar list holds the others. The number to expect is its length plus one. Then decide:
curl -s -X POST -H "Authorization: Bearer $NULLGAP_API_KEY" \
-H "Content-Type: application/json" \
-d '{"like":"fnd_8f3a2c9d1b4e","expect":4,"state":"accepted_risk","reason":"Admin-only report endpoints. Replaced in the Q2 rewrite.","reviewAt":"2027-06-30T23:59:59.000Z"}' \
"$NULLGAP_URL/api/orgs/$NULLGAP_ORG/findings/bulk"
expect is a safety check. The group can grow or shrink between the moment you looked and the moment you decide, because a run finished in between. If the group no longer has the size you expect, nothing is changed and the request is answered with 409 changed and a message giving the current number. Look at the list again, then send the new number.
expect is optional. Without it the decision applies to whatever the group holds at that moment. Send it.
ids and like can be sent together. The decision applies to the union.
#The answer
An answer to a request that named three ids:
{
"changed": [
{ "id": "fnd_8f3a2c9d1b4e", "state": "false_positive", "stateReason": "Both ids are cast to integers in parseOrderId before they reach the query.", "stateBy": "dana@acme.example" }
],
"skipped": [
{ "id": "fnd_2b7d0e5a9c13", "why": "Already in this state with this reason" },
{ "id": "fnd_000000000000", "why": "Not found" }
]
}
The sample is abridged: each entry of changed is the whole finding.
| Part | Meaning |
|---|---|
changed | The findings that were changed, as they are now. |
skipped | Findings left as they were, each with why. |
The two reasons a finding is skipped:
why | Meaning |
|---|---|
Not found | The id in ids names no finding of this organisation. |
Already in this state with this reason | The finding already has this state, this reason and this review date. It is not rewritten, so its "decided by" and date stay as they were. |
A finding in the same state with a different reason is changed: the new reason and the new decider replace the old.
#When the request is refused
| Status and code | When |
|---|---|
400 bad_request | ids is not a list of up to 500 strings; no finding was chosen at all; state is not one of the four; a dismissal has no reason; reviewAt is not valid. |
404 not_found | The like finding does not exist. |
409 changed | The group no longer has expect findings. |
403 insufficient_scope | The API key is read-only. |
In each of these cases nothing is changed.
#What happens to each finding
Each finding goes through the same path as a single triage decision:
- its own entry in the audit log, marked as part of one decision for several findings;
- its own
finding.state_changedwebhook event; - its own remembered decision, for a dismissal. Each dismissed finding holds back later findings that match its code. See Memory of dismissals;
- its own linked Jira issue moved, when status sync is on.
Findings are changed one after another. To undo a bulk decision, apply another one: the same ids with state set to open.
#Related
Nullgap documentation