Audit · Guides
Check that the log is whole
Events are only ever added. Each carries the hash of the one before it, every finished day is sealed, and a check names the first event that no longer matches. The Integrity page says whether the log is whole.
The chain
Each project's events are numbered from 1, without gaps, in the order Audit takes them in. Each event's hash is SHA-256 of the hash of the event before it and of everything the event holds. So an event changed in the database, put in between or deleted breaks the link to every event after it.
An event's page shows its number, the hash it follows and its own hash, and says whether what it holds still gives that hash.
Sealed days
A chain alone could be rewritten from some event on, hashes and all. So a few minutes after midnight UTC, Audit seals the day before with a checkpoint: the numbers of its events, how many there were, the hash of its last event and the hash of the checkpoint before. The checkpoint is signed with the chain's own Ed25519 key. A day with no events is sealed too: it says nothing happened then.
Integrity lists the latest 14 sealed days, and names the seal key and its public key.
The nightly check and Check it now
Every night at 04:10 UTC, Audit recomputes each project's chain from its first kept event to its newest, and holds it against every sealed day: each checkpoint's hash, signature and order, each event's number, link and hash, and that the chain ends where it should. It stops at the first problem.
Check it now on the Integrity page runs the same check at once. Anyone who opens the project in Audit can run it; the page only shows hashes and numbers, never anyone's actions. The latest checks are listed with their result and who ran them.
A broken chain is written in Audit's own log whoever found it, the nightly check too. When the last check is more than a day old, the page says so.
What a broken chain says
A broken chain is named by the first event that doesn't hold, as Broken at #1042, with one of these:
| Problem | What it means |
|---|---|
| Changed after it was written | The event was edited in the database after it was written: what it says now is not what was recorded. |
| Link to the event before is broken | The event before it was rewritten, or this one was put in between: the link from one to the next no longer holds. |
| Events missing | Numbers are skipped: events were deleted from the database. |
| Does not match a sealed day | The events agree with each other but not with a sealed day: the chain was rewritten from some event on, hashes and all. |
| A sealed day is broken | A sealed day itself does not hold: its hash, its signature, its order or its numbers were changed. |
| The newest events are missing | The chain's head names more events than there are. A restore from an older backup does this too. |
| The oldest events are missing | The oldest events are gone with no sealed day for the first kept one to follow. |
Anything after the first problem may be fine, or not: the check stops at the first.
If it is ever not whole
Leave the rows as they are
- Open the event it names. Its own page says whether it still gives its hash, and whether it follows the event before it.
- Export the events now (Events → Export CSV): every column and every hash, a copy to keep outside Audit.
- Compare with the last sealed day before it. Its signed seal says how many events that day had, their numbers and its last hash. What differs after it was changed.
- Tell the project's admins and your data protection officer. If people's data may have been changed or seen, they decide whether it is a breach to report (GDPR art. 33: within 72 hours of knowing). Who read it shows who read the log.
- Write to us through the contact page, with the project and the number the check names: the log lives in our database.
- Check it again once the cause is found and the rows are back as they were.
Old events
Every night, whole sealed days older than the months the project keeps are removed. Their seals stay, so the first event kept still follows the last removed day's seal and the chain checks as whole. The Integrity page marks such a day Pruned, seal kept, and each removal is written in Audit's own log.
How many months are kept is set in the project's Settings in Audit, up to the package's most: Months events are kept.