Menu

1 / 2

An append-only, hash-chained audit log in SQLite, and a script to check it

DEV Community: database·Nic Flemmer·about 5 hours ago
#rOA8AI4W
#devtodatabase#devto#dev#styx#hash
Reading 0:00
15s threshold

When a coding agent can ask for production access, the question afterwards is simple: who touched production, with what, and why? Styx answers it with an audit log on your machine. This post is about how that log is built, what it does and doesn't protect against, and a short script you can run to verify it.

What goes in

Every time an agent asks for access, and every time access is granted, used, denied, revoked or expires, one row is written. Connecting or removing a target, changing a policy and opening a pull request are rows too. Each row carries:

the actor: you, the system (a policy or a timer), or the agent by name

the target, the scope and the duration

the agent session and the worktree it came from

what triggered it: for a use, the command itself, like $ vercel deploy --prod

the policy that decided it, if one did

detail such as the agent's reason, and whether you verified with Touch ID, Windows Hello or your password

Before a row is written, anything shaped like a secret is scrubbed out of…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.