The audit log is the only way to reconstruct what happened in an incident. it's also, if not designed right, the juiciest file on your ship for an attacker.
Hex has three signs on the SOC wall:
When an incident comes in, you need to answer:
With those six fields you can reconstruct the what, the when, the who, the why.
API keys. They rotate, they leak, they end up in replicated logs. any key you log is compromised the moment you write it.
Plaintext PII. Affected user's emails, IDs, addresses. The audit log exists to reconstruct incidents, not to store PII. If you need to reference the user, use the user_id that points to a vault entry.
System prompt contents. Not only operational secret, but an attacker with log access can plan injections specific to your prompt.
For data that could be useful for correlation (the user input content, the model output), salt-hash or tokenize. Tomorrow, if two incidents share the same input hash, you know the attacker used the same payload. without you having the payload in plaintext.
Atlas's rule: a secure audit log is one that, if stolen, adds no new attack. If your leaked log gives the attacker PII, secrets, or hints about your prompt, you don't have an audit log. you have a second problem.
On the right are nine possible fields for your log. Classify each one before writing it.