Thanks for helping secure the AI era!
git clone https://github.com/luoowei/aegis.git
cd aegis
go build -o aegis ./cmd/aegis
./aegis scan .- Open
internal/rules/rules.go - Add a new
Rulestruct entry inAll() - Pick a unique ID following the pattern: AEG-XXX
- Write a Go-compatible regex pattern (no lookahead/behind)
- Provide a clear
FixHinttelling users what to do
Rule guidelines:
- Minimize false positives β test against real code before submitting
- Prefer specific patterns over broad ones
- Always include
(?i)for case-insensitive matching where appropriate - Category constants are in the same file
aegis/
βββ cmd/aegis/main.go # CLI entry point (Cobra)
βββ internal/
β βββ rules/rules.go # Security rule definitions
β βββ scanner/scanner.go # File walker + parallel scanning engine
β βββ report/report.go # Terminal + JSON output formatting
β βββ hook/hook.go # Git hook + GitHub Actions installers
βββ docs/ # Landing page (GitHub Pages)
βββ install.sh # One-line installer
go fmt,go vet,go lint- Descriptive variable names
- Comments on exported functions
- Small, focused functions
- Fork and create a feature branch
- Add your changes
- Verify build:
go build ./... - Run self-scan:
./aegis scan . - Open a PR with a clear description
Open an Issue or start a Discussion.