-
-
Notifications
You must be signed in to change notification settings - Fork 0
Troubleshooting
# Verify installation
which aegis
aegis --version
# Check PATH
echo $PATH | grep -E '(usr|local|bin)'
# Reinstall from the latest release assets
# https://github.com/aliasfoxkde/aegis/releases/latest# Ensure Rust 1.75+ (the MSRV) is installed
rustc --version
# Update Rust
rustup update stable
# Clean and rebuild
cargo clean
cargo build --workspace# Make executable
chmod +x aegis
# Or on Linux
sudo chmod +x /usr/local/bin/aegisCheck the rule exists and what it scopes to:
# List all patterns
aegis list
# List by category
aegis list --category secrets
# Every pattern's regex, scoping, and a verified example lives in the
# generated catalog:
# https://github.com/aliasfoxkde/aegis/blob/main/docs/patterns/README.mdMind the scoping rules:
- Patterns with
file_extensionsset only run on matching files; a file without an extension (Dockerfile,README) never matches a scoped pattern. -
scope: environmentpatterns only run duringaegis scan --env. - All shipped patterns are enabled by default.
Try with lower threshold:
# Include all findings
aegis scan . --severity-threshold lowUse severity and category filtering:
# Scan only high+ severity
aegis scan . --severity-threshold high
# Scan only specific categories
aegis scan . --categories secrets,web-security
# Use the CI-optimized preset
aegis -c pipeline scan .Worker threads scale with the machine automatically. Scanning is streaming, so file size is bounded by the 10 MB default limit (configurable per profile).
Skip files with .aegisignore (gitignore syntax, in the scan root):
# Ignore test fixtures
test/
**/*_test.go
*.test.ts
# Ignore generated files
*.generated.*
.env.example
Suppress a finding inline — the directive must be on the same line
as the finding and name the pattern (a bare aegis:ignore suppresses
nothing):
DEBUG_KEY=fake_key_for_testing # aegis:ignore:generic-secret -- test fixtureRanges (aegis:ignore-start / aegis:ignore-end) and whole-file
(aegis:ignore-file) directives are also supported. Prefer an upstream
fix: patterns carry an exclude regex for safe idioms, so a repeat
false positive is worth a contribution to
the pattern source.
- Open the pattern's page in the generated catalog — it documents the exact regex, scoping, entropy floor, and a verified example input that provably fires.
- Check
file_extensions: your file must have a listed extension. - Check
exclude: your match span may be hitting a suppression rule. - Check inline directives in the file (
aegis:ignore:on the same line).
# Validate a YAML pattern list by bundling it
cargo build --release -p aegis-bundler
./target/release/aegis-bundler ./patterns-dir ./test.bundle
# Install a bundle into a running MCP server
# JSON-RPC: {"method": "update_bundle", "params": ["./my-patterns.bundle", true]}
# Refresh the CLI's cached bundle
aegis updateThere is no external action; copy the repository's own scanning workflow into your project: .github/workflows/aegis-scan.yml. It runs the scan on push/pull_request, uploads SARIF to code scanning, and fails on secrets, security-hardening, and web-security findings.
Check artifact upload:
- name: Upload SARIF
uses: actions/upload-artifact@v4
with:
name: aegis-results
path: results.sarif# Verify hook permissions
ls -la .git/hooks/pre-commit
# Make executable
chmod +x .git/hooks/pre-commit
# Test manually
.git/hooks/pre-commitA better pre-commit hook scans the staged content rather than the working tree:
aegis scan . --staged# Exit codes:
# 0 = success (or no NEW findings when --baseline is used)
# 1 = findings reported (also: a scan itself failed)
# 2 = invalid usage
# Debug with verbose
aegis scan . -vWith --baseline, exit 1 means findings that are not recorded in the
baseline — a clean CI gate over new work.
aegis-mcp speaks JSON-RPC 2.0 on stdio — it has no network port.
Test it by piping a request:
echo '{"jsonrpc":"2.0","id":1,"method":"list_categories"}' | aegis-mcpClient configuration:
{
"mcpServers": {
"aegis": {
"command": "/absolute/path/to/aegis-mcp"
}
}
}Restart the AI assistant completely after configuration changes.
# Use category filtering
aegis scan . --categories secrets,pii
# Use severity filter
aegis scan . --severity-threshold highScanning is streaming and per-file size is capped (10 MB by default);
the largest consumers are worker threads, which scale with CPU count.
Narrow the scan with --categories/--severity-threshold rather than
tuning workers.
# Built-in presets
aegis -c production scan .
aegis -c pipeline scan .
aegis -c development scan .
aegis -c mcp-integration scan .
# Or an explicit profile file
aegis -c ./config/profiles/production.json scan .A profile supplies defaults for flags you did not set explicitly (output format, categories, severity threshold); explicit flags always win. An unknown preset fails with the list of valid names.
There is no global config file; configuration is per-invocation via
flags and -c/--config. Use command-line flags for one-off overrides.
# Enable verbose output
aegis scan . -v
# Run with backtrace
RUST_BACKTRACE=1 aegis scan .The cached bundle is corrupt. Remove the cache and refresh:
# Linux: ~/.local/share/aegis/patterns.bundle
rm ~/.local/share/aegis/patterns.bundle
aegis update- Check YAML syntax
- Verify the regex compiles (RE2 syntax: no lookarounds)
- Ensure required fields are present:
name,match,severity,confidence,description
# Fix permissions
chmod +x aegis
chmod +x aegis-mcp| Resource | Link |
|---|---|
| Documentation | docs/ |
| GitHub Repository | aliasfoxkde/aegis |
| Issue Tracker | Report Issues |
| Discussions | GitHub Discussions |
| Pattern Catalog | 660 patterns across 34 categories |
Aegis is an open-source security scanning tool.
Aegis is provided as-is for security scanning purposes. While it aims to detect security issues accurately, it may produce false positives and negatives. Always validate findings manually. The developers are not liable for any damages resulting from use of this tool.
See Releases for the current version and the changelog for what shipped in each. The pattern catalog is generated from the source and always reflects the shipped rule set.
Built with Rust for performance and reliability.
- Installation Guide - Binary releases, Docker
- Quick Start - Basic workflows
- CLI Reference - All commands
- Configuration - Profiles and options
- CI/CD Integration - GitHub, GitLab, Jenkins
- MCP Server - AI tool integration
- Building from Source - Contributor setup
- Adding Patterns - Rust and YAML contribution
- Architecture - System design
- Coding Standards - Rust conventions
- Pattern Catalog - All 660 patterns, one detail page per category
- Secrets - API keys, credentials
- Security Hardening - Security best practices
- Web Security - XSS, injection, CORS, SSRF
- AI Safety - Agentic and LLM safety checks
- Project Plan - Roadmap and milestones
- Changelog
- Releases