AI 101

Secret leakage

Also known as: secret leak · credential leak

Security

Secret leakage is when a credential, key, or token slips into a prompt, log, or model output — and from there, out.

  • A key in a log, copied into a prompt, echoed in output.
  • A model summarizing a config that contains a secret.
  • An agent writing a key to a shared file.

Prevention: keep secrets out of the model's context, filter logs, and treat any secret a model ever sees as compromised. Assume the worst.