← Projects
What I did
GitAegis
A Go CLI security engine for secret detection
GitAegis is a Go command line tool. It scans source code for API keys, tokens, and sensitive data. It uses Shannon entropy analysis and regular expressions. It parses code with tree-sitter for higher accuracy. The tool runs before a commit to prevent secret leaks. It writes the results to a JSON file.
GoCobraTree-sitterSecurityCLI
View on GitHub →Features
- It uses Shannon entropy analysis to find high-entropy strings.
- It matches known secrets with regular expressions.
- It parses source code with tree-sitter.
- It scans files in parallel with Go goroutines.
- It runs before a commit through a Git pre-hook.
- It writes the scan results to a JSON log.
How it works
- Install GitAegis from the release binary.
- Run `gitaegis scan .` to scan the current folder.
- Read the findings that the tool prints.
- Run `gitaegis ignore` to update the .gitignore file.
- Run `gitaegis init --prehook` to add a pre-commit check.
Tech stack
- Language: Go
- CLI: Cobra
- Parsing: tree-sitter
- Shell: Bash, Git hooks