DocsSecurity & ComplianceRisk Acceptance

Risk Acceptance

Accept the risk of a security finding with a required justification and an expiry date: the approver is recorded, the finding leaves the work queue and goes back to open when the acceptance expires or the finding materially changes.


Overview

Acknowledged means "being worked on" and never expires. When a finding is a known, tolerated risk (a compensating control, a planned decommission), a manager or admin accepts it instead: the finding moves to risk_accepted until an expiry date, with a justification and the approver (the user who accepted). An accepted risk leaves the work queue, the dashboard counts and the asset score like a false positive (is_active=false), and is reassessed when it expires.

  • Only open and acknowledged findings can be accepted; any other status (resolved, false positive, already risk_accepted) returns 409
  • There is no in-place extension: to change the expiry, reopen the finding and accept it again
  • Viewers see accepted risks but not the "Accept risk" button (403 from the API)

Accepting a Risk

In the finding detail (/dashboard/security/findings/<id>), "Accept risk" opens a dialog with a required justification (at most 2000 characters) and an expiry day, from tomorrow to 179 days from today, so that the end of the chosen day stays within 180 days from now. The acceptance ends at the end of that local day. The confirm button stays disabled until both are filled; a field error from the API (for example an expiry beyond the maximum) is shown under its field and the dialog stays open. The change writes a status_changed event with the justification as reason and metadata {"expires_at": "<ISO datetime>"}, and the priority of the asset is recomputed.

Note: The maximum duration is the backend setting SECURITY_RISK_ACCEPTANCE_MAX_DAYS (default 180 days).

Finding detail with priority score explanation, ownership and timeline

Expiry and Reopening

The daily Celery task expire_risk_acceptances (beat entry expire-risk-acceptances) moves every risk_accepted finding whose expiry has passed back to open and active, with a system status_changed event: reason "Risk acceptance expired", metadata cause risk_acceptance_expired, expires_at and approver_username. The task is idempotent: a second run reopens nothing.

  • A scan that reports a material change (a new vulnerable version, a changed evidence hash, a higher severity) reopens the finding with a reopened_by_scan event from risk_accepted, like the other triaged statuses; an unchanged re-report keeps it accepted
  • Reopen (with a reason) revokes the acceptance at any time; Resolve and Mark as false positive are also allowed from risk_accepted, one at a time or in bulk
  • The acceptance data of the latest acceptance are kept, but are shown only while the status is risk_accepted

Reviewing Accepted Risks

Choose "Risk accepted" in the Status filter of the queue (URL status=risk_accepted): the table adds the Expires, Justification (truncated, hover for the full text) and Approved by columns, with the Reopen action. The finding detail shows a "Risk acceptance" card with the expiry, the justification and the approver. The full history of acceptances stays in the Finding Timeline (/docs/security/finding-timeline).

API

POST /api/v1/security/findings/<id>/accept-risk/ (manager or admin) takes {"justification": "...", "expires_at": "<ISO datetime>"} and returns the finding detail. A missing, blank, non-string or too long justification returns 400 on justification; a missing or invalid expires_at, one not in the future or more than SECURITY_RISK_ACCEPTANCE_MAX_DAYS days away returns 400 on expires_at. The body is validated before the status: an invalid body is a 400 even on a finding that cannot be accepted. GET /api/v1/security/findings/ and the detail return risk_acceptance: {expires_at, justification, approver, approver_username} while the status is risk_accepted, null otherwise.

# Accept the risk of finding 42 until March 1st
curl -X POST -H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json" \
  -d '{"justification": "Compensating control: WAF rule 42", "expires_at": "2027-03-01T22:59:59Z"}' \
  "https://idp.example.com/api/v1/security/findings/42/accept-risk/"

# Accepted risks
curl -H "Authorization: Bearer $TOKEN" "https://idp.example.com/api/v1/security/findings/?status=risk_accepted"

Example Event

The status_changed event of an acceptance (GET /api/v1/security/findings/<id>/events/):

{
  "event": "status_changed", "actor_type": "user", "actor": "manager",
  "from_status": "open", "to_status": "risk_accepted",
  "reason": "Compensating control: WAF rule 42",
  "metadata": {"expires_at": "2027-03-01T22:59:59Z"}
}