Lion Cipher Lab
Check before you paste: a ten-second secret and personal-data check for anything you send to an AI chat
- AI Security
- Beginner
- ~30 min
- Free · no account required
Why it matters
The most common way secrets reach an AI service is not an attack: it is a person, stuck on a problem, pasting an error message or a config file that happens to contain a key, an address or someone's email. OWASP's guidance on sensitive information disclosure says users may unknowingly submit sensitive data and recommends scrubbing and validating input. Companies can add controls on their side, but the cheapest control is the moment before you press paste. A short script that looks for the obvious things takes ten seconds and catches the careless mistakes that cause most leaks.
What you'll learn
- recognising what people accidentally paste into AI chats
- writing five regular-expression rules for secrets and personal data
- reading text from standard input and returning a pass or stop exit code
- producing a redacted copy of a draft
- knowing what a pattern check cannot catch
Steps in this lab
- How secrets end up in chats
- Make a messy draft and a clean one
- Write the checker
- Run it on both drafts
- Find what it misses
- Make it a habit
- Clean up
Open the full interactive lab →