The GitHub Actions job "CI" on rocketmq-dashboard.git/fix/audit-cleanup-audited 
has failed.
Run started by GitHub user unbridled-41 (triggered by unbridled-41).

Head commit for run:
ec925260aa1887cb1f72b7d7cb04b8ed7173b405 / unbridled-41 
<[email protected]>
fix(audit): record the audit-log cleanup in the audit trail

POST /audit-logs/cleanup deletes up to 10 000 audit rows per call and left no
trace of its own:

    log.info("Cleaning up audit logs older than {} days", beforeDays);
    return auditRepository.deleteBefore(cutoff, CLEANUP_BATCH_SIZE, 
CLEANUP_MAX_BATCHES);

so an administrator can erase older evidence of earlier operations and the trail
cannot say who did it or how much was removed - the audit table is the one store
whose own deletion is unaudited. Every sibling destructive operation records one
(alert bulk delete, DLQ resend, cloud-credential delete, certificate delete,
instance delete), and the scheduled sweep that reuses this method inherits the
fix.

Record CLEANUP_AUDIT_LOGS with the retention window and the deleted count when
rows were actually removed; a no-op call records nothing.

Tests (server/): mvn -o -B -ntp test -Dtest='AuditServiceTest' -> Tests run: 21,
Failures: 0, Errors: 0.
- new cleanupLogsRecordsWhatItDeletedTest fails before this change ("Wanted but 
not
  invoked: auditRepository.save") and passes after it.
- cleanupLogsRecordsNothingWhenNothingWasDeletedTest pins the no-op case.
- mvn -o -B -ntp test 
-Dtest='org.apache.rocketmq.studio.ops.audit.**,AuditControllerTest'
  -> Tests run: 45, Failures: 0, Errors: 0; checkstyle passes.

Report URL: 
https://github.com/apache/rocketmq-dashboard/actions/runs/37979712693

With regards,
GitHub Actions via GitBox

Reply via email to