Let's say I have a private, monolithic git repo where I store my docker compose server configurations.
The folders are in a structure like this:
/ root
|- project1/
|--- compose.yml
|--- optional.env
|--- conf/
|--- etc/
|- project2/
|- project3/
...
|-- projectn/
This script performs the following actions:
- Split the monorepo into individual repositories
- Scan those repositories for secrets
- Erase those secrets from the history
git-filter-repo
- For extracting project folders with their history
BFG Repo-Cleaner - For removing secrets from history Secret scanners: script supports:
ggshield(GitGuardian's CLI tool)gitleaks