chore: implement Phase 1 and 2 security remediations
Some checks failed
Automated Container Build / build-and-push (push) Has been cancelled
Some checks failed
Automated Container Build / build-and-push (push) Has been cancelled
This commit is contained in:
parent
82731e93b1
commit
701766b611
14 changed files with 213 additions and 55 deletions
|
|
@ -183,6 +183,6 @@ func (db *DB) AddAuditLog(action, details, ip string) error {
|
|||
|
||||
// CleanOldAuditLogs deletes audit logs older than 30 days.
|
||||
func (db *DB) CleanOldAuditLogs() error {
|
||||
_, err := db.Exec("DELETE FROM audit_log WHERE timestamp < datetime('now', '-30 days')")
|
||||
_, err := db.Exec("DELETE FROM audit_log WHERE created_at < datetime('now', '-30 days')")
|
||||
return err
|
||||
}
|
||||
|
|
|
|||
Reference in a new issue