Secure: the keys your app carries
A secret is a password that your app uses to sign in to another service. Builders also call it a key, a token or a credential.
“The kit” on this page means The Thresh Lab System: the rules, written procedures and automatic checks your builder works from.
Start with the picture. Open a rule to see what taught us. Open the builder check only if you want proof.
Three levels: 1 · See it — 2 · Understand it — 3 · Prove it (inside each rule)
1 · See it
Your app
Signs in to each service
Some keys are public by design. The secret ones are the danger, because a secret key works for anyone who holds it.
Select a service to see what its key opens, and what a stranger could do with it.
Database: Holds your customers’ data. With the full-access key, a stranger can read, change or delete it.
- Database · key
Sign-in: Lets customers sign in. With this key, a stranger can pretend to be your app when customers sign in.
- Sign-in provider · key
Email: Sends mail in your name. With this key, a stranger can send mail that looks like it comes from you.
- Email service · key
Payments: Takes your customers’ money. With the secret key, a stranger can see payment records or issue refunds.
- Payment provider · key
Outside data: Paid data services count every request. A stolen key can use up your plan or run up your bill. Public services, like a government weather service, need no key, so there is nothing to steal.
- Paid price data · key
- Paid weather data · key
- Public weather service · no key needed
AI model: Bills you for every use. With this key, a stranger can run up charges on your account.
- AI provider · key
2 · Understand it: five rules
None of the problems in our records came from a clever attack. Each time, a key was in a place where the wrong person could see it, or in a place we forgot. Each rule removes one of those places.
The rule
Keep every secret in one system that holds the master copy, and copy it outward from there. Never keep the same key by hand in two places.
What taught us
Early on, our keys lived in two places, and we updated each one by hand. Two hand-kept copies become different, and nothing warns you.
3 · Prove it — ask your builder
Are all your keys kept in one system, and copied outward from there?
Correct answer: Yes. Each exception is on the written list from rule 4.
How to check: Ask your builder to show you the one system that holds the keys, and the list of places it copies them to.
The rule
The app collects its keys when it starts, and holds them only while it runs. Keys are not saved in files in your code.
What taught us
In September 2026, an audit found two keys for paid data services saved in files in one of our products. We replaced both keys and removed the files. The old keys are still in the file history, because a deleted file stays in the history, but they no longer work.
3 · Prove it — ask your builder
Is it true that no working key is saved in a file in your code?
Correct answer: Yes. Old keys can stay in the file history, but each one must be cancelled.
How to check: Ask your builder for a secret scan of the code and its full history. Each key the scan finds must be cancelled.
The rule
Live keys must not be readable by anyone who can sign in to a dashboard.
What taught us
On July 4, 2026, we found that a default setting in our hosting service let anyone with dashboard access reveal our live database and service keys. We deleted the keys and created them again in a form that nobody can reveal.
3 · Prove it — ask your builder
Can someone with dashboard access read a live key?
Correct answer: No.
How to check: Sign in to your hosting dashboard and open a live key. You must not be able to reveal its value.
The rule
Before you change a key, list every place that holds a copy. Update all of them. Check the app works on the new key. Cancel the old key last.
What taught us
In August 2026, we changed a sign-in key in our key cabinet and everything kept working. When we cancelled the old key, sign-in broke. A second service held its own copy, entered once at setup and never updated.
3 · Prove it — ask your builder
For each key, is there a written list of every place it is stored?
Correct answer: Yes.
How to check: Ask for the list. Pick one key, and confirm that each place on the list holds it.
The rule
A key is never pasted into a chat, including a conversation with an AI assistant. The person who needs to enter it types it directly where it goes.
What taught us
This one is a precaution. Anything you paste into a conversation is stored, can be forwarded and can be searched. You cannot un-paste it. We build our setup steps so that no key passes through a chat.
3 · Prove it — ask your builder
Has any key ever been pasted into a chat?
Correct answer: No. If yes, that key has been replaced and the old one cancelled.
How to check: Ask your builder directly. For each key that was pasted, ask for the date it was replaced.
If a key leaks
Make a new key. Update every copy. Check the app works on the new key. Cancel the old key last.
What we do not claim
No system is perfectly secure. We do not promise that a leak cannot happen. We record what we learn when something goes wrong, and we change these rules to match.