Update a repository's threat model
Folds a repository’s new context documents and triage feedback, such as false positives and accepted risks, into its threat model. Use the repository’s id from GET /repos. You need the member role or above.
- When the repository has no threat model yet, Hacktron builds its first one from the code and
initialistrue. Documents saved before then are folded in by the next update. startedisfalsewhen nothing new was waiting to be folded in.- A first build that can’t start returns
503 Service Unavailable. Try again later.
The update runs in the background for a few minutes. Read the result with GET /context-documents/{id}.
Request
POST /repositories/{id}/threat-model/sync
Send an API key with the write scope in the X-Api-Key header.
Path parameters
| Parameter | Description |
|---|---|
idstring, required |
Responses
200 OK
| Field | Description |
|---|---|
startedboolean, required | Whether an update started; false when nothing new was waiting to be folded in. |
initialboolean, required | Whether this builds the repository’s first threat model from its code. |