Pular para o conteúdo
Kitbay
Skill

lgpd-audit-logging

MITAtualizado em 19 de nov. de 2026279Estrelas no GitHub

One of the sub-skills of a Brazilian LGPD privacy engineering set, for building an audit log that shows tampering.

O que a skill ensina

One of the sub-skills of a Brazilian LGPD privacy engineering set, for building an audit log that shows tampering. It explains that the law does not demand a hash chain but treats one as a sensible control for accountability and security, and it separates retention for incident records from shorter periods for routine logs. The agent adds a Prisma model with an increasing sequence number, a TypeScript writer that serialises entries with a PostgreSQL advisory lock and chains their hashes, database triggers and permissions that block edits and deletes, and a daily job that checks the chain and stores the latest hash in write-once storage or a SIEM, alerting on any mismatch.

O que faz

  • Add a hash-chained audit log table with Prisma
  • Block edits and deletes with database triggers
  • Schedule a daily chain check with external anchoring
  • Log sensitive actions without raw personal data