How secrets end up in code
It is rarely carelessness. A key gets pasted into a file to make something work during a late session, and the file gets committed. An AI assistant writes a working example with the real key in it. A config file that was meant to stay local is added by a broad commit.
Once it is in the history, deleting the line does not remove it.
What Bugstack does
Bugstack does autonomous software maintenance. For secrets:
- It scans nightly. Every connected repository, every night.
- It reports each finding on your Security page, with the file and the kind of secret.
- It gives you a checklist. When you approve the rotation step, Bugstack opens a GitHub issue with what to do, in order.
- It skips obvious examples. A key in documentation or a test fixture is not treated as an emergency.
Why it does not rotate the secret for you
Rotating a secret means creating a new key in the service it belongs to, putting the new key everywhere the old one was used, and then deleting the old one. Done in the wrong order, it takes your app down. Done by a tool with access to your provider accounts, it is a tool with access to your provider accounts.
Bugstack does not hold those credentials and does not ask for them. This is the one job where it deliberately stops at telling you.
What to do when a secret is found
- Treat it as stolen. You cannot know who has seen the repository.
- Create a new key in the service it belongs to.
- Put the new key in your host’s settings, never back in the code.
- Deploy, and check the app still works.
- Delete the old key in the service.
- Remove it from the code. This is last on purpose. It tidies up; it does not protect you.
What this scan does not cover
- Secrets outside the repository, such as in a chat message or a screenshot.
- Whether your host’s settings are themselves exposed.
- Secrets in your running app’s logs.
How to start
- Sign in with GitHub and start the 14-day trial. It includes $50 of credit.
- Install the Bugstack GitHub App on your repository.
The first scan runs when the repository is connected. No SDK is needed.
Questions
I deleted the key from my code. Am I safe?
No. The key is still in the repository’s history, and anyone who copied it still has it. The fix is to make the old key useless by creating a new one and deleting the old one in the service.
Why will Bugstack not rotate it for me?
Because rotating needs access to your accounts at other companies, and a mistake in the order takes your app down. Bugstack tells you what it found and what to do, and leaves that step to you.
How often does it scan?
Every night, for every connected repository.