AI coding agents are writing pasted secrets to plaintext on dev workstations. How are you covering that?

Secret scanning at my last few places covered repos and CI. None of it covered developer workstations, and I think AI coding agents have quietly opened a gap there.

Cursor, Claude Code, Windsurf and the rest write full conversation transcripts to local disk as plaintext JSON. If a developer pastes a connection string or an .env into a prompt while debugging, which they do constantly, that value is now sitting unencrypted in a file outside the repo, with no expiry and no rotation trigger. Nothing in a normal pipeline looks there.

The parts I do not have a good answer for:

  1. Detection. I can match prefixed formats (sk-, ghp_, AKIA, xoxb-) and flag high-entropy strings, but a bare password or an internal hostname has no shape to match on. Everything I have tried either misses those or drowns in false positives.
  2. Scope. Agent history paths move between versions, and every new agent adds another directory. It does not feel like something endpoint DLP is watching.
  3. Policy. Is the right control a scanner, a pre-commit style hook at paste time, or just telling people not to paste secrets, which has never worked for anything else.

For my own machines I wrote a CLI that walks those directories and redacts what it finds, dry run first: github.com/Ishannaik/agent-sweep. It is MIT and I am not selling anything, but it only solves point 1 partially and does nothing for 2 or 3.

How are you handling this where you work, if at all? Genuinely asking, because I suspect the honest answer at most places is that nobody has looked yet.

reddit.com
u/Ishannaik — 12 hours ago

[H] ₹450 UPI [W] Lakme Salon Gift Voucher ₹1500

Paying ₹450 UPI for a ₹1500 Lakmé Salon gift voucher.

Need the code and validity date before payment. Nothing expiring inside 2 weeks. Happy to use a mod-approved middleman, or I go first if you have trade history.

Can take multiple.

reddit.com
u/Ishannaik — 12 hours ago

[H] ₹100 UPI [W] BMS / District BOGO for ₹750 ticket

Odyssey (IMAX), Miraj Cinemas Wadala, Monday 17 August, 11:00 AM. Ticket price is ₹750.

Looking for BMS or District BOGO. Also interested in any other BOGO or movie offers, not just this show.

Comment here first and then DM.

reddit.com
u/Ishannaik — 5 days ago

[H] ₹50 UPI [W] Myntra / Nykaa ₹500 off coupon

Also interested in any other Myntra or Nykaa offers or coupons, not just this one.

Comment here first and then DM.

reddit.com
u/Ishannaik — 5 days ago

[H] ₹450 UPI [W] Lakme Salon Gift Voucher (₹1500 face value, India)

Looking for a Lakme Salon gift voucher, face value ₹1500.

Paying ₹450 via UPI, sent as soon as you share the code.

Comment here first and then we can move to DM. I will not reply to any PM from someone who has not commented on this post.

10 year old reddit account, 9 confirmed trades on r/IndiaDealsExchange with 8 different traders. Happy to use a middleman if you prefer.

reddit.com
u/Ishannaik — 6 days ago

[H] ₹450 UPI [W] Lakme Gift Card

Looking for a Lakme gift card / voucher.

Paying ₹450 UPI, sent the moment you share the code.

Comment here first, then DM with the face value and the expiry date.

10 year old account, 9 confirmed trades with 8 different traders. Happy to use the admin method if you prefer.

Online now.

reddit.com
u/Ishannaik — 6 days ago

[H] 400 UPI [W] spa/saloon voucher

[H] 400 UPI [W] SPA VOUCHER

open to negotiating

Can pay instantly via UPI.

Please comment before DM as per subreddit rules.

reddit.com
u/Ishannaik — 15 days ago

[H] ₹25 UPI [W] 2x District/BMS (200rs ticket) BOGO

Looking for someone with the W District/BMS BOGO offer to book 2 tickets for:

I'll pay:

• Full ticket amount

• Your booking/service fee

Payment via UPI. Please DM if you can book.

reddit.com
u/Ishannaik — 24 days ago

[self-promo] I built a zero-knowledge pastebin with SvelteKit 2 and the Web Crypto API, the server only ever sees ciphertext

Built with SvelteKit 2 and TypeScript. Sharing the architecture because the interesting part is where the crypto sits.

Everything encrypts in the browser with AES-256-GCM (Web Crypto) before it ever leaves the page. The decryption key is generated client-side and lives in the URL fragment after the #, which browsers never send to the server. So my SvelteKit endpoints and the MongoDB behind them only ever hold an opaque blob. Even I cannot read what people paste.

On the Svelte side: encryption runs client-side before the form action fires, the ciphertext plus a salt is all that hits the server, and the key never touches a +page.server.ts. Password-protected pastes add a PBKDF2 layer at 100k iterations. There is burn-after-read, expiry from one hour to never, and no accounts or cookies.

Open source (AGPL-3) and self-hostable. Marking this as self-promotion per rule 4.

Repo: https://github.com/Ishannaik/CloakBin Live: https://oss.cloakbin.com

Would love feedback on the SvelteKit structure, mainly whether keeping the crypto in a client load is the cleanest pattern or if there is a more idiomatic way.

u/Ishannaik — 27 days ago

[H] ₹100 UPI, ₹50-100 UPI [W] District Movie BOGO (No Cap), ₹250 District Dining Voucher

Looking to buy:

  • 🎬 District Movie BOGO (preferably No Seat Amount Limit / No Cap)
  • 🍽️ District Dining vouchers (₹250 / ₹500 or higher)

Please comment first, then DM with:

  • Price
  • Expiry
  • Number of vouchers available

UPI ready. Looking for regular sellers as well.

reddit.com
u/Ishannaik — 29 days ago

Your AI agent's history is quietly storing the API keys you pasted into it

Something I keep running into building with agents: the local history and log files these tools keep are a quiet secret-leak surface. Every time you paste an API key, a token, or a chunk of a .env into a prompt, it can persist in those files on disk long after the conversation is gone. Most people never clean them.

I built a small open-source CLI that scans those agent history and log files (Claude Code, Cursor, and others), finds API keys, tokens, and credentials, and redacts them in place. The history stays readable, the secret is gone, and it runs entirely locally so nothing is uploaded.

Honest framing: it is local hygiene, not a substitute for rotating a key you actually sent to a hosted model. If you leaked a live key to a cloud agent, rotate it. This closes the on-disk residue.

Repo link in the first comment (subreddit rule). Curious how others here handle secret residue in agent histories.

reddit.com
u/Ishannaik — 1 month ago

Warp: browser-to-browser file transfer where the server provably can't see your bytes (WebRTC/DTLS, open source)

Sharing this here for the threat model rather than as a "check out my app" post, because the interesting part is what the server is architecturally prevented from seeing.

Most "send a file" services are a trust-me box: you upload plaintext (or "encrypted, but we hold the keys") to someone's bucket and hope. Warp is built so the operator cannot be a meaningful adversary:

  • The only server component is a WebSocket signaling worker. It brokers the SDP/ICE handshake to introduce two peers, then steps out. No file byte ever transits it. You can watch the network tab: the transfer traffic goes peer-to-peer, not to my origin.
  • The actual transfer rides the WebRTC data channel, which is DTLS-encrypted end to end. Keys are generated in-browser and never leave the two endpoints. Your ISP, the coffee-shop AP doing a MITM, and the signaling server all see ciphertext only.
  • No account, no stored file, no cloud bucket. Nothing at rest to subpoena, leak, or expire.

Honest limitations, since this crowd will (correctly) poke at them:

  • No TURN relay by design. If both peers are behind symmetric NATs and STUN can't establish a path, it fails with a real error instead of silently relaying through a server. That keeps the "server never sees bytes" guarantee true, at the cost of some hostile-NAT pairs not connecting. Same-LAN and most NAT combos punch through fine.
  • Trust still rests on the client you're served. It's open source (MIT) and you can self-host the whole thing (static frontend + a free Cloudflare Worker), so you can verify the code that runs and pin it yourself.
  • Signaling metadata (that peer A and peer B connected, when, and their IPs during ICE) is visible to the signaling server, like any WebRTC app. It's the file contents that stay private, not the fact a session happened.

Repo + protocol write-up: https://github.com/Ishannaik/warp Threat-model / how-it-works deep dive (NAT, STUN, DTLS, chunking, and why a truly-free relay is impossible): https://warp.ishannaik.com/how

Interested in where you'd attack this. The signaling worker and the ICE path are the obvious surface.

u/Ishannaik — 1 month ago

I built Warp: peer-to-peer encrypted file transfer that never touches a server (free, no accounts, no size limit)

Every "send a big file" tool I tried either uploads to some cloud, caps the size, wants an account, or quietly charges you once the file is big enough. So I built the opposite.

Warp opens a room, gives you a short code (or a QR), and once the other device joins, your files stream browser-to-browser over an encrypted WebRTC channel. The server only introduces the two peers, then steps aside. It never sees, stores, or relays a single byte. No upload, no account, no size cap.

A few things I'm happy with:

  • End-to-end encrypted by default (DTLS on the WebRTC data channel, keys live only in the two browsers).
  • Multi-GB files stream straight to disk instead of buffering in RAM.
  • True multi-device: a room is a mesh, so you can fan one file out to every device at once.
  • Runs on Cloudflare's free tier + public STUN, so there's literally no paid relay that could ever bill me. $0, no card.

The one honest tradeoff: no TURN relay. If both peers are behind strict/symmetric NATs and can't punch through, Warp shows a real error instead of silently paying to relay your bytes. Same Wi-Fi always works, most networks connect fine via STUN.

Live: https://warp.ishannaik.com Code (MIT): https://github.com/Ishannaik/warp

Would love feedback, especially on the transfer UX and any network where it fails to connect.

u/Ishannaik — 1 month ago

agentsweep: a CLI that finds & redacts the secrets your AI coding agent (Codex, etc.) saved to disk in plaintext

Every time you paste an API key, DB URL, .env file, or (worst case) a crypto wallet seed phrase into Codex, Cursor, Claude Code, Cline, Aider, etc., it gets written to a local history file in plaintext.

And it doesn't just sit there — these agents re-read their own history as context, so that plaintext key keeps getting fed back to the model and can resurface in a later file, command, or reply. Most people never even look.

agentsweep is an open-source CLI that:

• Scans those history files with ~191 secret-detection rules (ported from gitleaks) plus a dedicated BIP-39 seed-phrase detector

• Supports ~30 agents out of the box (Codex, Cursor, Claude Code, Cline, Aider, Windsurf, and more)

• Redacts in place with atomic writes, .bak backups, post-write validation, and a full undo

Read-only by default; nothing destructive happens without a typed confirmation, and every redaction is reversible.

Install: pipx install agentsweep (then run: agentsweep)

Disclosure: I'm the author. It's free and MIT-licensed (not selling anything). Repo: https://github.com/Ishannaik/agent-sweep

Happy to answer questions or take PRs for more agents.

u/Ishannaik — 1 month ago
▲ 75 r/opsec+8 crossposts

agentsweep: a CLI that finds & redacts the secrets your AI coding agent (Codex, etc.) saved to disk in plaintext

Every time you paste an API key, DB URL, .env file, or (worst case) a crypto wallet seed phrase into Codex, Cursor, Claude Code, Cline, Aider, etc., it gets written to a local history file in plaintext.

And it doesn't just sit there — these agents re-read their own history as context, so that plaintext key keeps getting fed back to the model and can resurface in a later file, command, or reply. Most people never even look.

agentsweep is an open-source CLI that:

• Scans those history files with ~191 secret-detection rules (ported from gitleaks) plus a dedicated BIP-39 seed-phrase detector

• Supports ~30 agents out of the box (Codex, Cursor, Claude Code, Cline, Aider, Windsurf, and more)

• Redacts in place with atomic writes, .bak backups, post-write validation, and a full undo

Read-only by default; nothing destructive happens without a typed confirmation, and every redaction is reversible.

Install: pipx install agentsweep (then run: agentsweep)

Disclosure: I'm the author. It's free and MIT-licensed (not selling anything). Repo: https://github.com/Ishannaik/agent-sweep

Happy to answer questions or take PRs for more agents.

u/Ishannaik — 10 days ago

I grepped my AI assistant's chat logs, found my own AWS keys, and spent six weeks building the cleanup tool: AgentSweep

The problem

Claude Code stores your full conversation history as plaintext JSONL under ~/.claude/projects/. Every API key, DB password, and .env file you've ever pasted into a chat is sitting there in plain text. A single compromised npm package running postinstall can scan common paths and exfiltrate everything in one request.

I reviewed my own history and found 3 AWS keys and a Stripe secret key I'd forgotten about entirely.

What I built

agentsweep a CLI that scans AI agent history files and redacts secrets in place.

How it works

  • 189 detection rules (AWS, GitHub PATs, Stripe, OpenAI, Anthropic, Slack, JWT, PEM keys, DB URLs with passwords, BIP-39 crypto seed phrases, and ~167 more ported from the gitleaks pack)
  • Aho-Corasick keyword pre-filter before regex and fast even on large histories
  • Supports 10 agents: Claude Code, Codex, OpenCode, Cursor, Windsurf, Aider, Cline, Gemini CLI, Continue, GitHub Copilot Chat
  • Atomic writes + mandatory .bak backup before every change
  • agentsweep undo reverts any redaction instantly
  • Zero network calls it runs entirely on your machine

Install

pip install uv && uv tool install agentsweep && asweep

Interactive menu walks you through everything. Type REDACT to confirm — nothing destructive happens without an explicit confirmation.

Who is this actually for

If you use local agents (Aider + Ollama, OpenCode with a local model, etc.): Your keys never left your machine via the agent, but they're sitting in plaintext files that any process on your machine can read. A compromised npm package, a malicious VSCode extension, a stolen laptop. The local file is still an attack surface even if the network never saw it.

If you already pasted keys into cloud-backed agents (Claude Code, Cursor, etc.): Yes, the provider already received those keys, agentsweep can't undo that. But your local history is a separate, ongoing attack vector. Cleaning it up removes one more way those keys can be stolen, long after the conversation ended.

The honest framing: The best practice is to not paste production keys into any AI agent at all. This tool exists for the reality that most devs already have histories full of secrets they pasted months ago without thinking twice.

GitHub: https://github.com/Ishannaik/agent-sweep

Happy to answer questions about rule coverage, false positives, or agents I haven't added yet.

u/Ishannaik — 2 months ago
▲ 114 r/hacking

Your AI coding agent has been writing every API key you ever pasted to a plaintext file. Nobody is scanning it.

Every Claude Code session you've ever run is a JSONL transcript sitting in ~/.claude/projects/. Codex keeps them in ~/.codex/sessions/. Cursor and Windsurf dump conversation blobs into state.vscdb SQLite files. Aider drops a .aider.chat.history.md into every repo you've touched. All plaintext. All world-readable to anything running as your user.

Think about what's in there: every .env you asked for help with, every DB connection string you pasted "just to debug this one thing," every AWS key, every JWT. Stealer malware already knows this credential stealers shipped in malicious npm packages have been observed grepping exactly these paths. Your shell history gets cleaned; your agent history grows forever.

I built agentsweep to deal with mine: an open-source CLI that scans the history files of 10 agents (Claude Code, Codex, Cursor, Windsurf, Aider, Cline, Gemini CLI, OpenCode, Continue, Copilot Chat) with 189 detection rules ported from gitleaks, plus a checksum-validated BIP-39 seed phrase detector then redacts findings in place.

It's careful about it because corrupting your own history would suck: atomic writes, mandatory .bak backups, post-write JSON validation, agentsweep undo to revert everything. Zero network calls your secrets never leave the machine that's already holding them.

uv tool install agentsweep
agentsweep scan

Scan is read-only. Redaction requires you to literally type REDACT.

GitHub: https://github.com/Ishannaik/agent-sweep

Obvious caveat: redacting locally doesn't un-send anything to a cloud provider its more useful for locally hosted agents, and the real fix is rotating the keys. The tool prints rotation guidance per finding for exactly that reason.

u/Ishannaik — 2 months ago

I built a CLI that scans your Open Code history for leaked API keys and redacts them in place open source, fully offline (Python)

The problem

Open Code stores your full conversation history as plaintext JSONL. Every API key, DB password, and .env file you've ever pasted into a chat is sitting there in plain text. A single compromised npm package running postinstall can scan common paths and exfiltrate everything in one request.

I reviewed my own history and found 3 AWS keys and a Stripe secret key I'd forgotten about entirely.

What I built

agentsweep a CLI that scans AI agent history files and redacts secrets in place.

How it works

  • 189 detection rules (AWS, GitHub PATs, Stripe, OpenAI, Anthropic, Slack, JWT, PEM keys, DB URLs with passwords, BIP-39 crypto seed phrases, and ~167 more ported from the gitleaks pack)
  • Aho-Corasick keyword pre-filter before regex and fast even on large histories
  • Supports 10 agents: Claude Code, Codex, OpenCode, Cursor, Windsurf, Aider, Cline, Gemini CLI, Continue, GitHub Copilot Chat
  • Atomic writes + mandatory .bak backup before every change
  • agentsweep undo reverts any redaction instantly
  • Zero network calls it runs entirely on your machine

Install

pip install uv && uv tool install agentsweep && asweep

Interactive menu walks you through everything. Type REDACT to confirm — nothing destructive happens without an explicit confirmation.

Who is this actually for

If you use local agents (Aider + Ollama, OpenCode with a local model, etc.): Your keys never left your machine via the agent, but they're sitting in plaintext files that any process on your machine can read. A compromised npm package, a malicious VSCode extension, a stolen laptop. The local file is still an attack surface even if the network never saw it.

If you already pasted keys into cloud-backed agents (Claude Code, Cursor, etc.): Yes, the provider already received those keys, agentsweep can't undo that. But your local history is a separate, ongoing attack vector. Cleaning it up removes one more way those keys can be stolen, long after the conversation ended.

The honest framing: The best practice is to not paste production keys into any AI agent at all. This tool exists for the reality that most devs already have histories full of secrets they pasted months ago without thinking twice.

GitHub: https://github.com/Ishannaik/agent-sweep

Happy to answer questions about rule coverage, false positives, or agents I haven't added yet.

u/Ishannaik — 2 months ago
▲ 4 r/codingProtection+1 crossposts

I built a CLI that scans your Claude Code history for leaked API keys and redacts them in place open source, fully offline (Python)

The problem

Claude Code stores your full conversation history as plaintext JSONL under ~/.claude/projects/. Every API key, DB password, and .env file you've ever pasted into a chat is sitting there in plain text. A single compromised npm package running postinstall can scan common paths and exfiltrate everything in one request.

I reviewed my own history and found 3 AWS keys and a Stripe secret key I'd forgotten about entirely.

What I built

agentsweep a CLI that scans AI agent history files and redacts secrets in place.

How it works

  • 189 detection rules (AWS, GitHub PATs, Stripe, OpenAI, Anthropic, Slack, JWT, PEM keys, DB URLs with passwords, BIP-39 crypto seed phrases, and ~167 more ported from the gitleaks pack)
  • Aho-Corasick keyword pre-filter before regex and fast even on large histories
  • Supports 10 agents: Claude Code, Codex, OpenCode, Cursor, Windsurf, Aider, Cline, Gemini CLI, Continue, GitHub Copilot Chat
  • Atomic writes + mandatory .bak backup before every change
  • agentsweep undo reverts any redaction instantly
  • Zero network calls it runs entirely on your machine

Install

pip install uv && uv tool install agentsweep && asweep

Interactive menu walks you through everything. Type REDACT to confirm — nothing destructive happens without an explicit confirmation.

Who is this actually for

If you use local agents (Aider + Ollama, OpenCode with a local model, etc.): Your keys never left your machine via the agent, but they're sitting in plaintext files that any process on your machine can read. A compromised npm package, a malicious VSCode extension, a stolen laptop. The local file is still an attack surface even if the network never saw it.

If you already pasted keys into cloud-backed agents (Claude Code, Cursor, etc.): Yes, the provider already received those keys, agentsweep can't undo that. But your local history is a separate, ongoing attack vector. Cleaning it up removes one more way those keys can be stolen, long after the conversation ended.

The honest framing: The best practice is to not paste production keys into any AI agent at all. This tool exists for the reality that most devs already have histories full of secrets they pasted months ago without thinking twice.

GitHub: https://github.com/Ishannaik/agent-sweep

Happy to answer questions about rule coverage, false positives, or agents I haven't added yet.

u/Ishannaik — 2 months ago