scf_risk_write
Create, update, delete, or accept risk register entries by selecting an operation with the method field. Record or renew risk acceptances with rationale and expiry dates.
Instructions
Change the risk register (editor+; accept is admin): create a risk assessment, update one, delete one (destructive), or record or renew a risk acceptance. Pick with method.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| notes | No | Free-text notes on this risk assessment Used by: update. | |
| owner | No | Name or identifier of the risk owner Used by: create. | |
| title | No | Risk title (required, max ~100 chars) Used by: create. | |
| impact | No | Inherent impact on a 1–5 scale Used by: create, update. | |
| method | Yes | create: Create a new risk assessment in the risk register (write — editor+ role). Likelihood and impact scores populate the 5×5 risk matrix. update: Update a scored risk by code (write — editor). Only passed fields change. Setting accepted records no approval (use scf_accept_risk); re-scoring an accepted risk clears its approval. delete: Delete an organization's scoring of a risk code (destructive write — editor role). The catalog or custom risk definition itself remains; only this org's assessment row is removed. accept: Accept a risk (write — admin): records you as approver, now, the rationale and expiry. Renews an accepted risk. Also accepts a standards exception. A platform key without a user gets 403. | |
| org_id | Yes | Organization UUID — obtain from scf_list_organizations | |
| rationale | No | Why the risk is accepted (required, non-blank; stored trimmed). Blank is refused Used by: accept. | |
| risk_code | No | Risk code — catalog R-XX-N or custom R-ORG-N [update, delete] | Risk code — catalog R-XX-N or custom R-ORG-N — obtain from scf_list_risks or scf_list_custom_risks [accept] Used by: update, delete, accept. | |
| control_id | No | SCF control ID to link (e.g., 'AST-01') — obtain from scf_list_controls Used by: create. | |
| expires_on | No | Date the acceptance lapses (YYYY-MM-DD); must be after today (400 otherwise) Used by: accept. | |
| likelihood | No | Inherent likelihood on a 1–5 scale Used by: create, update. | |
| description | No | Risk description (required) Used by: create. | |
| owner_user_id | No | Risk owner — obtain from scf_list_members Used by: update. | |
| treatment_plan | No | How the risk is being treated Used by: update. | |
| residual_impact | No | Residual impact after treatment, 1–5 scale Used by: update. | |
| next_review_date | No | YYYY-MM-DD Used by: update. | |
| treatment_status | No | Treatment workflow status (default identified) [create] | Treatment lifecycle state. 'accepted' set here records no approval — scf_accept_risk does. Below admin, moving an accepted risk with an approval in force off accepted is ignored (it stays accepted); an admin's move clears the acceptance [update] Used by: create, update. | |
| treatment_due_date | No | YYYY-MM-DD Used by: update. | |
| residual_likelihood | No | Residual likelihood after treatment, 1–5 scale Used by: update. |