Code security built for the AI era
Traditional SAST tools were not built for prompt injection, RAG pipelines, MCP servers, vector databases, or pickled models. AEGIS finds those, alongside the classic injection, secrets, and infrastructure-as-code issues, and runs on your own machine or server.
No signup needed. Sign in later to save your results.
1import pickle23def load_model(path):4 with open(path, "rb") as model:5 return pickle.load(model)
- mediumImport pickleline 1 ·
ast-import-pickle· CWE-502 - highpickle.load()line 5 ·
ast-pickle· CWE-502 - highPickle — RCEline 5 ·
ser-pickle· CWE-502
Where your code goes: scans run on your own machine or server, and nothing is uploaded to a hosted AEGIS service, because there isn't one. Two optional features send data out: LLM deep analysis (only when the server has an ANTHROPIC_API_KEY, or an AEGIS_LLM_PROVIDER such as a local Ollama; it sends the code, with detected secrets redacted, to that provider) and dependency advisory lookups (only when AEGIS_OSV_ENABLED=1; they send package names and versions to OSV.dev). Details
$ pip install -e . && aegis . --fail-on critical # the repository is private (access by invitation) and not on PyPI, so install from a clone
Prefer to read first? Quickstart · CLI reference
What legacy SAST tools miss
Snyk, Semgrep, and SonarQube catch SQL injection and CVEs. They were built before LLMs. AEGIS catches what they don't:
Prompt injection in LLM apps
F-strings interpolated into prompts, RAG pipelines accepting untrusted documents, jailbreak patterns, system-prompt leakage. AEGIS detects 12 LLM-specific patterns out of the box.
MCP server risks
Tools exposed without auth, shell tools without sandboxing, missing rate limits. AEGIS understands the Model Context Protocol threat model.
Vector DB misconfigurations
Hardcoded API keys, missing namespace isolation, unbounded retrieval. RAG security is a different threat model than traditional SQL injection.
Pickle-based model RCE
Loading a .pkl, .pt, or unsafe model file is arbitrary code execution. AEGIS performs pickle bytecode analysis to detect embedded payloads.
Secrets in Jupyter outputs
Cell outputs persist in committed notebooks. AEGIS extracts cells, scans both code AND outputs, and detects accidentally-committed API keys, OAuth tokens, and credentials.
Agentic AI patterns
Tools without allowlists, autonomous-agent loops without stop conditions, training-data consent gaps. AEGIS detects 47 patterns across the agentic AI threat model.
Detection coverage
329 baseline rules across 13 languages and 11 file types, plus 5 official Ed25519-signed marketplace packs and a community marketplace.
| Source | Coverage | Rule Count |
|---|---|---|
| Core regex + Python AST | Cross-language vulnerability patterns | 139 |
| Tree-sitter language-specific AST | Java, Kotlin, Ruby, PHP, Rust, C/C++, Swift, Scala | 47 |
| Java / Ruby / PHP regex | Language-specific vulnerability patterns | 28 |
| C# / Razor regex | ASP.NET, EF Core, Semantic Kernel and OpenAI .NET patterns | 33 |
| IaC (Terraform, K8s, CloudFormation) | Misconfiguration, IAM, encryption | 25 |
| Dockerfile / docker-compose | USER directive, ADD URL, secrets, base images | 15 |
| GitHub Actions | pull_request_target, expression injection | 10 |
| Jupyter notebooks | Cell outputs, magic commands, unsafe loads | 10 |
| MCP client configs and agent instruction files | Unpinned servers, hardcoded secrets, broad access, hidden directives | 13 |
| Raw hidden Unicode | Bidi controls, tag characters, zero-width characters | 3 |
| Go AST | Go-specific patterns via tokenizer-based AST | 5 |
| Tree-sitter cross-language | Demo rule | 1 |
| Baseline total (48 tree-sitter rules need optional language packs) | 329 | |
| LLM Strict pack | Prompt injection, RAG, MCP, vector DB | 12 |
| Fintech Specific pack | PII, decimal money, KYC, AML, sanctions | 15 |
| Healthcare HIPAA pack | PHI exposure, encryption, de-identification | 11 |
| Government / Defense pack | FIPS, CMMC, CUI, ITAR, PIV/CAC | 9 |
| PCI DSS Strict pack | Card data, CVV/PAN, key rotation | 8 |
| Marketplace packs (opt-in, all Ed25519-signed) | 55 | |
Plus a community marketplace (v4.5+) where any AEGIS user can submit rule packs through moderator review.
How teams use AEGIS
Real workflows from production deployments across AI startups, fintech, healthcare, government, and OSS projects.
Pre-commit on AI startup
4-engineer LangChain RAG team. aegis install-hook --fail-on high on every dev machine. F-strings into prompts caught before commit completes (~0.4s overhead).
PR scanning on fintech
30-engineer team installs the GitHub App. PRs trigger scans; findings post as inline review comments and check runs. Making those checks required is a GitHub repository setting, not something this app turns on.
HIPAA-oriented checks for healthcare code
The aegis-healthcare-hipaa pack detects PHI exposure and missing safeguards. These code checks do not create a BAA or establish HIPAA compliance.
Government air-gapped
Defense contractor licenses on-premises with Ed25519 license token. SAML 2.0 + SCIM 2.0. aegis-government pack. HMAC-chained tamper-evident audit log.
OSS maintainer using marketplace
Rust security researcher writes 25-rule pack using the Rule SDK. From a clone: cd rule-sdk && pip install -e . then python3 -m aegis_rule_sdk validate pack.json. Submits via API; moderator publishes.
Coding agent with self-scan
Claude-based code-gen agent integrates AEGIS via MCP. Every generated chunk pipes through aegis_scan_code. High/critical triggers regeneration. Shipped-clean rate: 60% → 90%.
Investor due diligence
VC firm runs AEGIS against startup repo. Result: 0 critical, 3 high (test-fixture FPs), 2 medium (one real prompt-injection in marketing demo). Diligence pack delivered same day.
Bank inspecting model files
Bank running AEGIS on third-party vendor's .pkl. Pickle bytecode analysis decompiles bytecode and detects embedded os.system curl exfil. Deployment blocked.
Cross-team benchmarking
200-engineer company opts into v4.5 cross-customer baseline. Discovers pi-fstr rate is in p99. Sweep PR adopting PromptTemplate drops it to p50 in 4 weeks.
Security and compliance built in
Controls added after an internal security review: ReDoS hardening, scoped keys, GDPR export/deletion, CWE/OWASP maps. This is not an independent assessment; SOC 2 is not issued.
ReDoS protection
Static analyzer detects nested quantifiers, overlapping alternation, wildcards in quantified groups. Wired into rule-pack import and community submission. 500ms execution budget on tortuous test inputs.
Scoped API keys
Multi-key per user with 7 explicit scopes (scan:read/write, rules:read/write, findings:read/write, admin). SHA-256 hashed storage. Optional expiry. CI/CD pipelines get tight blast-radius tokens.
GDPR endpoints
Article 20 data export and Article 17 right-to-erasure. Account deletion anonymizes user, revokes tokens, and detaches community packs while retaining audit-log integrity for compliance.
CWE / OWASP coverage maps
GET /api/coverage/cwe enumerates 49+ CWEs across all rule sources. GET /api/coverage/owasp maps Web Top 10 (2021) and LLM Top 10 (2025) to sample rule IDs (Web Top 10 is 7 covered + 3 Partial, LLM Top 10 is 8 covered + 2 Partial). Procurement RFP answer in one endpoint.
Rule SDK
Standalone Python package in rule-sdk/. From a clone: cd rule-sdk && pip install -e . then python3 -m aegis_rule_sdk validate pack.json. Validates schema, regex compile, severity, CWE format, duplicates, and ReDoS. Authors see server-side errors locally.
Integrates everywhere developers work
CLI, REST API, GraphQL, MCP, CI/CD, IDEs, browsers, Slack, Discord, JIRA, Linear. All bundled in the self-hosted edition.
Simple pricing
Self-host AEGIS for free once you have access to its private repository. Hosted AEGIS Cloud is not provided by this repository.
- All 329 baseline rules
- 5 official marketplace packs
- Community marketplace
- SAML 2.0 + SCIM 2.0
- All integrations
- Compliance reports, schedules, share links, custom rules, anomaly detection
- Web dashboard, browser extension, VS Code and JetBrains plugins
- Apache-2.0 licensed
- Hosted paid tiers are not provided by this repository
- Run the Free tier instead
- An on-premises license is the Enterprise tier
- On-premises license token
- Multi-region tagging (license field)
- Commercial support — the software does not enforce a retention or SLA gate
- Dedicated CSM (sales, not a code lock)