← 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

  1. Install GitAegis from the release binary.
  2. Run `gitaegis scan .` to scan the current folder.
  3. Read the findings that the tool prints.
  4. Run `gitaegis ignore` to update the .gitignore file.
  5. Run `gitaegis init --prehook` to add a pre-commit check.

Tech stack

  • Language: Go
  • CLI: Cobra
  • Parsing: tree-sitter
  • Shell: Bash, Git hooks