Set Model Provenance
set_model_provenanceRecord the origin of a model's description when generating from a repository or when the source changes. Use kind and source references to preserve provenance and bump the model version.
Instructions
Record where a model's description came from. Call this right after
generating a model from a repository (or pass the provenance_*
params to generate_threat_model), and again whenever the source
changes. Mutating: bumps the model version.
kind="code" with a commit_sha means the code is authoritative
and the model follows it: reconcile_model measures the model
against the code, and component changes observed in the code are
applied and queued for review. Any other kind (ticket,
document, manual, mixed) means the description is intent
and the code is measured against it.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ref | No | Branch or tag at that commit (optional). | |
| kind | Yes | One of ``code``, ``ticket``, ``document``, ``manual``, ``mixed``. | |
| model_id | Yes | ID of the threat model. | |
| repo_url | No | Repository URL (``code``). | |
| commit_sha | No | Commit the description was gathered at (``code``). | |
| source_ref | No | Ticket key or document identifier (``ticket`` / ``document``). | |
| source_url | No | URL of the ticket or document. | |
| server_version | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||