django-DefectDojo
django-DefectDojo copied to clipboard
SLA Breach Notification for Disabled Severity Level
Bug description I think I stumbled over a bug and found the fix for me, posted in Slack without response before I opened this. When you disable SLA for a severity level, all findings in this category get alerted as SLA breach. Looking at the database content, the sla_expiry_date is set to NULL (mysql). util.py will check the value of sla_age and if None (which is the case) set it to 0. Few lines later when age == 0, you alert an SLA breach. Continuing instead of setting the sla_age = 0 fixed the issue for me.
Steps to reproduce Steps to reproduce the behavior:
- Go to Configuration / SLA Configuration
- Disable "Enforce Low Finding SLA Days"
- Enable Notifications for SLA Breaches
- Run python manage.py sla_notifications
Expected behavior No notifications for findings without an SLA (in this case low severity), instead all findings without SLA are marked as SLA breach.
Deployment method (select with an X
)
- [X] Docker Compose (Migrated DB to MySQL 8)
- [ ] Kubernetes
- [ ] GoDojo
Environment information
- DefectDojo version v. 2.36.5 ( release mode )