Who Changed It/Evidence
The first thing a careful intruder does is delete the rows that describe them. In an ordinary activity log that leaves no mark. Here every record is chained to the one before it with HMAC-SHA256, so a missing or altered row is reported, and an export can be checked years later without WordPress.
A WordPress activity log is a database table. Anyone who can write to that table, whether through a compromised administrator account, a SQL injection in another plugin, or a hosting control panel, can remove a row. The table that remains looks complete. When the log is later shown to a client, an insurer or a court, the fair question is "how do you know nothing was removed?", and for most logs there is no answer.
No software running on a server can stop someone with full control of that server from changing data on it. Products that claim an "immutable" or "tamper-proof" log inside WordPress are describing something that cannot exist there. What can exist is a log where tampering leaves a mark that cannot be covered up without a secret the attacker does not have. That property is called tamper evidence, and it is the claim made here.
Every record stores three hashes:
Change a field and its payload hash no longer matches. Delete a row and the next one points at a hash that is gone. Insert a row and the positions stop lining up. The verifier walks the chain and says which of those happened and where:
3 record(s) removed without an authorized retention or
redaction entry (positions 412-414).
The stored fields no longer match the hash recorded when
this event was written.Verification status is shown on the log screen and the settings page, and it is included in every digest email.
The chain is exactly as strong as the secrecy of its key. By default the key is generated on first use and stored in the database, which defeats casual edits and accidents. It does not defeat an attacker who can read the database, because they can read the key and recompute a consistent chain.
Moving the key out of the database closes that route:
// wp-config.php
define( 'WHOCHITA_CHAIN_KEY', 'a long random string, unique to this site' );With the constant defined, database-only access is no longer enough to forge the chain. Three practical points:
Rows do need to be removed sometimes. Retention pruning runs daily, an administrator may purge the log, and a GDPR erasure changes what a row shows. If each of those broke the chain, every site would be permanently "tampered with" and the warning would mean nothing.
So a legitimate removal records a gap: the positions removed, how many records, the hash of the last one, and the reason. The surviving records still link across it and the chain verifies. A purge is also logged as its own event, classified dangerous, and cannot be muted. Redaction for an erasure request replaces the personal fields while the original payload hash stays, so the chain holds there too.
Anything that removes rows without recording a gap is what gets flagged: a hand-written DELETE, a row edited in phpMyAdmin, a partial database restore.
Evidence usually has to leave the site. Each CSV or JSON export carries a manifest, and the manifest is covered by an HMAC-SHA256 signature. It states:
The manifest also contains the algorithm, in words, so the file explains how to check itself. Verification needs the file and the key and nothing else: no WordPress, no plugin, no connection to the site. The five steps are in integrity and evidence.
It proves the records are internally consistent and that nothing was removed or altered without leaving a mark, by anyone who did not hold the key. That is a strong statement about the log.
It is not a statement about the world. The chain cannot show that an event was recorded correctly in the first place. It cannot see what never passed through WordPress: a file changed over SFTP, a row changed directly in the database. An attacker with full control can switch the plugin off, though the gap in an otherwise regular digest is then its own signal. And whoever holds the key can, in principle, rebuild a chain. If the log may one day be used against the party that holds the key, send signed exports to the other side on a schedule, so that a copy exists outside your control.
It does not replace backups or off-site log shipping either. For files on disk, pair it with integrity checks or a scanner such as WPSniffer.