← All writing

· 4 min read

I almost made my repo public with my own password in it

What I found when I audited ARIA before open-sourcing it, and why fixing the files was not enough.

ARIA is my personal AI assistant. I wanted to make it public, so I audited it first. I expected a few cleanups. I found a credential I had written myself.

What the audit turned up

Nothing exotic. It was the kind of thing that piles up in a private project because nobody else reads it. Run the scan to see the list.

Audit before going public

A simplified replay of what I found in ARIA.

  • A seed password inside a migration
  • Allowed origins hard-coded in the app
  • Deploy host and image path in the workflow
  • Private tooling folders tracked by git
  • All of the above, still in the git history

The part that surprised me

I fixed every file in the working tree, and the repository was still not safe to publish. Git remembers. The old versions, with the credential and the deployment details, were still in the history, one command away from anyone who cloned it.

What I did instead

  • Moved the seed user out of the migration into a script that reads its values from the environment and refuses weak defaults.
  • Replaced hard-coded origins, hosts and image paths with configuration.
  • Published from a brand-new repository with a single clean commit, instead of trying to rewrite years of history.
  • Treated every credential that ever lived in the old repository as burned, and rotated them.

If a private repo of yours might go public one day, the cheapest moment to keep secrets out is before the first commit. The second cheapest is before the first push.

Read the case study →