Audit-log bug report status changes (B-60)

Every other admin mutation — config edit, pause/resume, privkey export, password
reset — leaves a trace; this one could silently mark a report resolved. With one
shared ADMIN_TOKEN and no per-admin identity, the audit log is the only
accountability there is.

bug_report_status_changed records the report id and the before/after status, and
carries the report's author as user_id so the entry is traceable from either
side. Nothing is written when the status doesn't actually change, matching
config_updated: an edit that changes nothing isn't an event, and noise hides the
real changes.

Also documents the new event in docs/guida-admin.md's audit table.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
davideandClaude Opus 5 committed 2026-08-03 22:59:00 +02:00
1 parent 6246b13247
commit 77e07e87dc
5 files changed
+70 -16

No files matched your search

-13
View File
@@ -38,19 +38,6 @@ remains the last prerequisite for running unattended.
---
## High — security
### B-60 — `POST /admin/bug-reports/{id}/status` writes no audit entry
`app/api/routes/admin.py:404-419`.
Every other admin mutation (config edit, pause/resume, privkey export, password
reset) is audit-logged. This one is not, so a report can be silently marked
`resolved` with no trace — and with one shared `ADMIN_TOKEN` and no per-admin
identity, the audit log is the only accountability there is.
---
## Medium — correctness and robustness
### B-61 — config edits apply retroactively to the round already in progress