Skip to content

Security

Polygraph runs AI agents across your repositories and streams their logs to the web UI. The first piece of that story is keeping secrets out of those logs.

Before any agent log leaves your machine, the CLI scans each line for values that look like secrets and replaces them with [REDACTED]. Redaction runs locally and covers both the main agent and child agents.

It masks:

  • Private keys, bearer tokens, and prefixed provider tokens (pypi-, hf_, vercel_, and similar).
  • Credentials inside connection URLs like postgres://user:password@host.
  • Values of secret and connection environment variables (names containing SECRET, TOKEN, _KEY, _URL, and similar).
  • Email addresses.

Redaction matches known secret shapes, so treat it as a safety net rather than a guarantee. Don't rely on it to catch a secret you paste into a prompt or print to stdout.