Skip to main content

Log Sanitizer Guide

How to Remove Secrets From Logs Before Sharing

Copy-pasting a raw log into an AI assistant, a support ticket, or a public GitHub issue is one of the fastest ways a real secret gets exposed. This checklist walks through what to look for and how to clean a log without losing the context you actually need to debug it.

Read the checklist

  1. Scan for credentials first. API keys, bearer tokens, JWTs, database connection strings, and private key blocks are the highest-risk items - a leaked key can be used immediately, unlike most other log data.
  2. Check for customer and personal data. Emails, phone numbers, payment fields, and identity numbers (SSN, and region-specific formats) should never travel outside your organization's approved tools.
  3. Look at field names, not just values. Structured logs (JSON, key=value, Syslog, CEF/LEEF) often label sensitive values clearly - customer_id, tenant_id, session_id - which makes them easy to catch with field-aware redaction even when the value itself doesn't "look" sensitive.
  4. Don't forget infrastructure details. Internal hostnames, Kafka topics, cloud resource ARNs, and cluster/namespace names can reveal your internal architecture to someone who shouldn't see it.
  5. Keep what makes the log useful. Timestamps, HTTP methods, status codes, stack traces, and error messages are almost never sensitive on their own and are exactly what a human (or an AI assistant) needs to help you debug - don't strip these.
  6. Add your own patterns. No automated tool knows your internal project codenames, employee names, or workspace IDs out of the box - add them as custom rules once and reuse them every time.
  7. Review before you paste. Skim the cleaned output (or the mapping table) one more time before sharing - especially for a strict/high-stakes destination like a public issue tracker.
  8. Rotate real secrets regardless. If a genuine key, password, or cookie appears anywhere in your history for that log - sanitized or not - treat it as exposed and rotate it in the actual system.

What the sanitizer can hide

The built-in cleaner is designed for real logs, stack traces, copied request context, and support snippets that often include accidental share-risk details.

Secrets and credentials

API keys, JWTs, bearer tokens, cookies, auth headers, database URLs, and config-style secret values.

PII and customer data

Emails, phone numbers, payment card fields, identity-like values, customer IDs, request IDs, and trace IDs.

Internal infrastructure

Hostnames, private URLs, tenant names, brokers, topics, cloud resource names, and internal-only references.

Local environment clues

User paths, device details, browser strings, file locations, and copied machine-specific context.

Use cases

Before sharing with AI

Remove secrets, customer details, and internal service names before asking an AI assistant to help debug.

Before sending to support

Hide cookies, auth headers, account details, request IDs, and private URLs before opening a vendor ticket.

Before posting in GitHub issues

Strip tokens, local paths, hostnames, trace IDs, and internal infrastructure names from repro logs.

Before sharing with teammates

Keep the debugging context readable while cleaning private fields that should not travel across chats or docs.

Ready to clean a log?

Head back to the sanitizer, paste or upload your log, and choose what to hide. Have a question first? See the FAQ.