dereuromark/cakephp-audit-stash

Flexible and rock solid audit log tracking plugin for cakephp

Maintainers

Package info

github.com/dereuromark/cakephp-audit-stash

Homepage

Type:cakephp-plugin

pkg:composer/dereuromark/cakephp-audit-stash

Statistics

Installs: 11 134

Dependents: 2

Suggesters: 2

Stars: 6

Open Issues: 1

2.0.0 2026-05-04 11:57 UTC

README

Build Status Coverage Status PHPStan Latest Stable Version Minimum PHP Version License Total Downloads Coding Standards

This branch is for CakePHP 5.3+. See version map for details.

Audit-trail plugin: records every create / update / delete on your Table classes, together with who made the change and from which request.

Features

  • Entity audit trail — single behavior captures changed fields, before/after values, user, and request context.
  • Tamper-evidence — optional SHA-256 hash chain for GoBD / SOX / HIPAA-grade integrity, verifiable via CLI.
  • Admin viewer — built-in dashboard, coverage report, search, diffs, timeline, and CSV/JSON export under /admin/audit-stash.
  • Monitoring & alerting — rules for mass-deletion and off-hours activity, notifications via email, webhook, or log channel.
  • Retention & cleanup — per-table retention policies and a dry-run-friendly cleanup CLI.
  • GDPR helpers — redaction and subject-access-export tooling.
  • Custom event types — log arbitrary actions (logins, exports, permission grants) through the same persister and viewer.
  • Flexible storage — database persister out of the box, optional Elasticsearch driver, or plug in your own.

Installation

composer require dereuromark/cakephp-audit-stash
bin/cake plugin load AuditStash
bin/cake migrations migrate -p AuditStash

Then enable the behavior on any Table you want tracked — see the Getting Started guide for the full walkthrough.

Documentation

Full docs: https://dereuromark.github.io/cakephp-audit-stash/

  • Getting Started — installation, behavior setup, request metadata
  • Configuration — persisters, table list, route prefix
  • Usage — behavior options, custom events, custom persisters
  • TestingAuditAssertionsTrait for your own test suite
  • Features overview — viewer, monitoring, retention, tamper-evidence, GDPR

Demo

https://sandbox.dereuromark.de/sandbox/audit-stash

Related Plugins

If you need to moderate or approve changes before they happen (rather than auditing them after), check out the Bouncer plugin. AuditStash records what already changed; Bouncer gates changes before they're persisted.