← Reddit

I got paranoid about my chat history, so I built a local auditor for leaked secrets

Reddit · frangelbarrera · August 6, 2026
A developer created DidiLeak, a Python script that audits chat histories from AI services including Cursor, Claude, ChatGPT, and Kimi to identify accidentally leaked sensitive information such as AWS keys, GitHub tokens, and personally identifiable information. The tool operates entirely locally without transmitting data externally and generates HTML reports to help users identify content requiring rotation or remediation.

Detailed Analysis

A developer's paranoia about accidentally leaking sensitive information into AI chat logs has produced DidiLeak, a small open-source Python tool designed to audit conversation exports from Claude, ChatGPT, Cursor, and Kimi for secrets that users may have inadvertently pasted during their sessions. The tool works by parsing export files and local databases, then running them through regex pattern matching and entropy analysis to flag likely credentials such as AWS keys, GitHub tokens, personally identifiable information, and other high-entropy strings that often indicate API keys or passwords. Critically, the entire process runs locally, with no data transmitted off the user's machine, and results are compiled into a straightforward HTML report that highlights what might need to be rotated or revoked.

The underlying concern reflects a well-known but under-addressed risk in the era of AI-assisted coding and chat-based workflows. Developers using tools like Cursor and Claude frequently paste code snippets, configuration files, environment variables, and stack traces directly into conversations to get debugging help or code generation assistance. In the rush to solve a problem, it's easy to include a live API key, database connection string, or customer PII without noticing. Unlike traditional secret-scanning tools that operate on git repositories or CI/CD pipelines, chat histories with AI assistants represent a largely unmonitored surface where sensitive data can accumulate silently across weeks or months of daily use, often stored in local databases (as with Cursor) or cloud-synced export files (as with ChatGPT and Claude).

This matters because as AI coding assistants become deeply embedded in developer workflows, the attack surface for credential leakage expands correspondingly. Companies have already faced incidents where secrets committed to public repositories were exploited within minutes, and chat logs represent an even less scrutinized vector since they aren't typically covered by existing DevSecOps tooling like git-secrets or TruffleHog. Anthropic and other AI providers generally do not offer built-in mechanisms to flag or redact sensitive content a user pastes into a conversation, placing the burden of vigilance entirely on the individual. A local, offline auditing tool addresses this gap without requiring users to trust a third party with potentially the exact same sensitive data they're trying to protect—an important design choice given that uploading chat exports to a cloud-based scanner would simply relocate the risk rather than eliminate it.

The emergence of grassroots tools like DidiLeak also reflects a broader trend in the AI tooling ecosystem: as large language model assistants become daily-use infrastructure for millions of developers, an ancillary market of privacy, security, and hygiene tools is forming around them, often built by individual practitioners rather than the AI vendors themselves. This mirrors earlier patterns in software security tooling, where community-driven utilities filled gaps left by platform providers before more robust, officially sanctioned solutions emerged. Given growing enterprise scrutiny over data governance and compliance frameworks like SOC 2 and GDPR, tools that help retroactively audit AI chat histories for leaked secrets could see increasing adoption, particularly among engineering teams trying to reconcile the productivity benefits of AI assistants with the practical realities of credential hygiene and incident response.

Article image Read original article →