liberusoftware / module-cms-audit
Audit logging for Liberu CMS: turns security-relevant events into append-only audit records with a read-only admin viewer.
Package info
github.com/liberusoftware/module-cms-audit
Type:liberu-module
pkg:composer/liberusoftware/module-cms-audit
Requires
- php: ^8.5
- illuminate/auth: ^13.38.0
- illuminate/contracts: ^13.38.0
- illuminate/database: ^13.38.0
- illuminate/http: ^13.38.0
- illuminate/support: ^13.38.0
- liberusoftware/module-cms-contracts: ^0.1
- liberusoftware/module-cms-core: ^0.1
Requires (Dev)
None
Suggests
None
Provides
None
Conflicts
None
Replaces
None
This package is auto-updated.
Last update: 2026-11-14 19:55:09 UTC
README
Repository
Source, issues, and release history: https://github.com/liberusoftware/module-cms-audit-and-history
Composer package: https://packagist.org/packages/liberusoftware/module-cms-audit-and-history
Audit logging for Liberu CMS. Turns security-relevant events into append-only audit records (Part B ยง18 / OWASP A09), with a read-only admin viewer.
What it captures
Registered only while the module is enabled (disabling it stops auditing):
| Action | Source |
|---|---|
auth.login, auth.logout, auth.failed |
Framework auth events (Illuminate\Auth\Events\*) |
content.published |
ContentPublished (EventBus) |
content.state_changed |
ContentStateChanged (EventBus) |
Each record snapshots the actor (id + a human label so it survives user deletion), the subject type/id, the acting team, the request IP, the action, metadata, and a timestamp.
Design
- Pure listener. Depends only on
cms-contracts+cms-core; no emitter imports anything from here. Content events cross theEventBusInterface; authentication events are framework events on the underlying dispatcher. - Append-only / tamper-evident.
AuditLogrefuses updates and deletes, and the Filament viewer disables every write path.team_idis a plain column (noHasTenant), so tenant scoping never rewrites history. - Gated viewer.
AuditLogResourceis read-only and gated by the module-ownedaudit.viewpermission (the ticket-04 authorization pattern), filterable by action, actor, and date.
Not yet captured
Role/permission changes, tenant switches, and module enable/disable are not emitted as events by their sources today; capturing them is a follow-up that adds event emission at each site (then a handler here).