Operations
Project members can start, steer, and cancel investigations. Only an owner or admin can approve,
reject, or resolve an action, and only with a signed-in user token: the dashboard, or the CLI after
squasher login. The API refuses API keys for these three operations, even a key with the
actions:approve scope. The decision records your user id. An irreversible action can be approved
only in the dashboard; see Response actions.
Start an investigation
The body has a question, a subject, or both:201, created: true, and the new investigation. An incident has one
investigation. When the subject is an incident that already has one, the response has status 200,
created: false, and the existing investigation. A repeated idempotency_key also returns 200.
confidence is a number from 0 to 100.
time_to_diagnosis_seconds is the time from the start to the first diagnosis. thread_id is the
chat that is linked to the investigation.
List investigations
The response is
{ "investigations": [...], "total", "limit", "offset" }.
With the CLI, use squasher investigations list --project <project-id> --issue <issue-uuid>.
Read an investigation
investigation, entries, and actions. Each timeline entry has a sequence
number, a kind, an actor, and a payload. The kinds are hypothesis, evidence, action,
note, redirect, and status. Add after_sequence=<n> to get only the entries after entry n.
Add include_actions=false to leave out the action proposals (actions is empty) when you poll;
read them with actions.list.
Security verdicts
When an investigation is about a security finding,investigation.security_verdict holds the
verdict. On other investigations it is null.
verdictisbenign,suspicious,malicious, orinconclusive.confidenceislow,medium, orhigh.evidencelists each request that the Squasher Agent sent.urlruns a Squasher API request again; it isnullfor a query.- When the finding has a Slack alert, the agent also posts the verdict as a reply to that alert.
- Squasher also writes the verdict to the finding’s
security.agent_verdict, so the findings list and the finding page show it.confidencethere is a number:lowis 0.3,mediumis 0.6, andhighis 0.9. Each request becomes onequeryevidence item.
PUT .../security-verdict from a signed-in session.
The body is { "verdict", "reason", "confidence"?, "facts"? }. source becomes user, and
agent_verdict keeps the agent’s verdict. The correction also replaces the finding’s
security.agent_verdict, with the reason as its summary. The verdict, its timeline entry, the
finding, and the facts change together, or nothing changes. Each fact is one statement about one entity, for example
{ "entity": "aws_access_key:AKIA...", "fact": "the CI deploy key" }. Squasher keeps one fact per
entity in the agent’s memory, and the next triage reads it.
Add a note, steer, or cancel
notesadds a note to the timeline. The body is{ "text" }. The response has status201and the new entry inentry.redirectrecords the direction, and Squasher continues the investigation in that direction. This also works after a diagnosis. The body is{ "text" }. The response has status202.cancelstops an active investigation. The body is optional:{ "reason" }.
List actions
status, investigation_id, and incident_id, and set limit (1 to 100,
default 50). The statuses are proposed, approved, executing, unknown, succeeded, failed,
expired, and rejected. unknown means Squasher sent the call but did not see the result. Squasher
does not run the action again; it reads the provider to settle the result.
Approve or reject an action
status, precondition, and
postcondition. Reject uses the same body at /reject. The reason is optional, but the Squasher
Agent reads it. The agent does not propose a rejected action again for the same target in the same
investigation.
To change the params of a reversible action before it runs, add params to the approve body, for
example { "params": { "duration_minutes": 60 } }. Squasher rejects the proposal as edited and runs
the changed action at once. An irreversible action cannot be edited: approve it as proposed, or
reject it.
When the result is unknown, settle it at /resolve. Squasher reads the provider first. When the
provider cannot tell, send your finding after you check the provider:
outcome is succeeded or failed. note is optional. When the provider cannot tell and you send
no outcome, the response has status 409.
Errors
TypeScript client and CLI
squasher actions approve and squasher actions reject ask you to confirm. Add --yes to skip the
prompt.