-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Description
Bug description
When we update the expiration date of an already expired risk acceptance, the pure value is updated but the state of the linked findings is not changed.
Steps to reproduce
Steps to reproduce the behavior:
- Create a risk acceptance for an active finding with expiration date set to tomorrow.
- Wait until is expired (or click Expire now in the DefectDojo web UI).
- Get the ID of this risk acceptance.
- Sent a patch request via API to this risk acceptance with
expiration_dateset to a date in the future. The patch request must include the existingaccepted_findingslist (see Additional context). - The linked findings are still active.
Expected behavior
The linked findings should be set to Inactive and Risk accepted. The Expiration handled on the risk acceptance should be reset (expiration_date_warned and expiration_date_handled).
Environment information
- DefectDojo version: v. 2.54.0 ( e85bbd242 )
Additional context
Another unexpected behavior of the risk acceptance API is that we must sent the accepted_findings for patch requests again. If we omit the key in the patch request the accepted findings list is set to empty.
Also, we can set expiration_date_handled via the patch request although the OpenAPI description states that this field is read-only.