feat(audit): implement append-only audit trail and lifecycle tracking #327#386
feat(audit): implement append-only audit trail and lifecycle tracking #327#386rajesh-puripanda wants to merge 4 commits into
Conversation
utksh1
left a comment
There was a problem hiding this comment.
Requesting changes. Append-only audit logging is valuable, but backend-tests are failing and the PR adds SQLAlchemy as a runtime dependency while the app still uses aiosqlite. Please remove unnecessary ORM scaffolding or make it clearly dev-only, fix the failing tests, and add migration/backward-compatibility coverage for existing audit_log tables.
|
Thanks for following up. Clarifying the change request so it is actionable: Why this is blocked: What to do next:
|
utksh1
left a comment
There was a problem hiding this comment.
Re-reviewed latest state. The branch is conflicting after recent main changes, so it cannot merge. Please rebase and make sure the audit-log implementation stays aiosqlite-native, keeps migration/backward-compatibility coverage, and does not reintroduce unnecessary ORM/runtime dependencies.
Ready for re-review. Conflicts with Summary of changes:
All 24 audit-specific tests pass. No new warnings, no new runtime dependencies. |
|
Re-reviewed after the latest push. Still blocked: please keep the audit implementation aiosqlite-native, make sure migration/backward-compatibility coverage passes on current main, and avoid reintroducing unnecessary ORM/runtime dependency changes. |
|
Conflicts resolved. Ready for re-review. |
|
Re-reviewed after the latest push. Still blocked: please keep the audit trail implementation aiosqlite-native, avoid unrelated runtime dependency churn, and add/keep migration compatibility coverage for existing audit_log tables on current main. |
e60d075 to
66d4a9c
Compare
|
@utksh1 I've addressed all your review comments:
All 4 commits rebased cleanly onto current main. Please re-review when you get a chance! |
utksh1
left a comment
There was a problem hiding this comment.
Re-reviewed the latest push. This is still not mergeable: the branch is behind current main, and backend-tests has not completed on the latest visible run. Please update the branch against current main and get a completed green backend-tests run before requesting review again.
Description
Implements a persistent, append-only audit log system for SecuScan to track scan lifecycle events (created, started, completed, failed, cancelled, deleted).
Closes #327
Changes
audit_logtable with indexed fields and JSON metadata support.log_event()helper for lifecycle state machine hooks inexecutor.py.GET /api/v1/auditand memory-efficient streamedGET /api/v1/audit/export.AuditLogpage with debounced filtering andAuditTablefor metadata inspection.Type of Change
How Has This Been Tested?
Checklist
Closes #327