Update an application's threat model
Rebuilds an application’s threat model from its repositories’ threat models, together with the context documents uploaded for the application. Hacktron first builds a threat model from the code for any repository that has none. Name the application by its id or slug. An application with no repositories returns 400 Bad Request. You need the member role or above.
The build runs in the background, and the response returns once it has started. To read the result, list the context documents of any of the application’s repositories with GET /context-documents. The application’s threat model is the document of kind application_threat_model.
Request
POST /applications/{idOrSlug}/threat-model/sync
Send an API key with the write scope in the X-Api-Key header.
Path parameters
| Parameter | Description |
|---|---|
idOrSlugstring, required |
Responses
200 OK
| Field | Description |
|---|---|
startedboolean, required | True if a workflow was started; false if nothing was pending. |