Many companies ban AI coding tools on internal code. Developers paste files into chats anyway, config files and test data included. One leaked API key or customer list is enough to cause real damage.
I wanted to know: if you replace secrets and rename the code's names before sending it to Claude, then swap everything back afterwards, does the answer get worse?
What I tested
- Two small test codebases (an invoicing system and a clinic booking system) with fake secrets planted in configs, docstrings, comments and test data.
- 11 coding tasks with hidden tests: partial payments, credit notes, VAT rules, booking limits and more.
- Fresh Claude agents that had never seen the real code solved each task twice: once with the real code, once with a cleaned-up copy.
Results
- Real code: 11/11 tasks passed, but secrets were sent in 8 of the 11 tasks.
- Cleaned copy: 28/28 task runs passed across 5 separate agents, and 0 planted secrets were sent.
- On a harder secret set written blind by another agent, the scanner caught 80%, not 100%. Names, addresses and some odd password formats still slip through.
What I learned
- Renaming did not hurt answer quality on these tasks, which was my biggest worry.
- Regex alone is not enough. You also need a list of your own company terms, and probably a small local AI for names.
- No tool like this should promise "zero leaks". You need a preview of exactly what gets sent.
What's next
This is a prototype, and these are small internal tests, not an audit. Before building a real tool, I want to know if anyone would use it. I'm calling it Swapline.
If you'd want this, the waitlist is here: https://swapline-ai.pages.dev
If not enough people sign up, I'll drop the idea and delete the list.
Questions and criticism are very welcome.