Why this matters
LGPD requires accountability and records of processing activities.
Whenever PII is read, emit an audit event capturing actor, purpose, fields touched, and legal basis; never include raw PII in the audit payload—store hashes/tokens only.
LGPD requires accountability and records of processing activities.
Side-by-side examples engineers can pattern-match during review.
println!("ACCESS: user_email={}", user.email);let purpose = "support_ticket";\nlet email_hash = sha2::Sha256::digest(user.email.as_bytes());\naudit_log(AuditEvent{ actor, purpose, fields: vec!["email"], basis: Some("legitimate_interest"), pii_fingerprints: vec![format!("{:x}", email_hash)] });audit_log(AuditEvent{ purpose: "billing", ..Default::default() })println!("user_cpf={}", cpf)From the same buckets as this rule.