Open-source auditor for Non-Human Identities and AI Agent attack surfaces in cloud environments
Project description
AgentSentry ๐ก๏ธ
Open-source auditor for Non-Human Identities and AI Agent attack surfaces in cloud environments.
"45 machine identities for every 1 human. Almost none of them are governed."
AgentSentry discovers every IAM role, API key, service account, and AI agent in your environment, builds an attack graph of their access relationships, and scores the blast radius if any identity is compromised โ including a novel AI-Amplification Factor that quantifies how autonomous AI agents multiply attack surface.
Quick start
pip install nhi-audit
agentsentry scan mock # demo โ no credentials needed
agentsentry scan aws # requires: aws configure
agentsentry scan github --org myorg
Editions
| Feature | Community (free) | Pro ($49 one-time) |
|---|---|---|
| AWS / Azure / GCP / GitHub / K8s scanners | โ | โ |
| LangChain / CrewAI / AutoGen static analyzer | โ | โ |
| PรRรEรA risk scoring | โ | โ |
| MITRE ATT&CK mapping | โ | โ |
| Blast radius analysis | โ | โ |
| CLI โ local, no accounts needed | โ | โ |
| MIT license | โ | โ |
--visualize interactive HTML attack graph |
โ | โ |
--enrich CISA KEV threat intelligence |
โ | โ |
--json machine-readable output |
โ | โ |
interactive guided multi-provider scan |
โ | โ |
| Lifetime license ยท no subscription | โ | โ |
| Priority support | โ | โ |
After purchase you'll receive a key by email. Activate it with:
agentsentry activate AS-XXXX-XXXX-XXXX-XXXX
agentsentry license # verify activation
Validation is fully offline โ HMAC-SHA256 embedded in the key, no server call required after activation.
Why AgentSentry?
Modern enterprises have a critical blind spot: Non-Human Identities (NHIs). While security teams focus on human user access, machine identities โ CI/CD service accounts, AI agents, API keys, Lambda execution roles โ operate with minimal governance, often with excessive permissions, and almost no rotation discipline.
The risk compounds when AI agents enter the picture. A compromised LangChain agent with delete_record and send_email tools isn't just a leaked credential โ it's an autonomous actor with tools that can cause cascading damage. No existing NHI security framework accounts for this.
AgentSentry addresses both problems.
Example output
โฌก AGENTSENTRY v0.1.3 ยท NHI & AI Agent Risk Scanner ยท MIT ยท free forever
4 identities found ยท 2 critical ยท 1 high ยท 1 AI agents
โ langchain-crm-agent ai_agent โ CRITICAL 150.0 2
โ ml-pipeline-executor iam_role โ CRITICAL 112.5 3
โ github-actions-prod-deploy github_key โ CRITICAL 90.0 2
โ legacy-reporting-service-key iam_user_key โ HIGH 52.5 2
โ langchain-crm-agent โ Fully Autonomous AI Agent With Irreversible Tools
This agent has FULLY_AUTONOMOUS execution with delete_record, send_email.
AI-Amplification Factor: 10.0x
Remediation: Implement human-in-the-loop approval for all irreversible tools.
MITRE: T1651, T1059
The Scoring Model
NHI Risk Score = P ร R ร E ร A
P = Privilege Score (1โ10) How powerful are the permissions?
R = Reachability Score (1โ3) How accessible is this identity to attackers?
E = Exposure Score (1โ5) How poor is the credential lifecycle?
A = AI-Amplification (1โ60) How much does agent autonomy multiply blast radius?
Score โฅ 100 โ CRITICAL
Score โฅ 50 โ HIGH
Score โฅ 20 โ MEDIUM
Score < 20 โ LOW
The AI-Amplification Factor (A) is the novel contribution of this project. No existing NHI risk framework accounts for how autonomous AI agents compound the impact of a compromised machine identity.
Providers
| Provider | Install | Requirements |
|---|---|---|
mock |
(built-in) | None โ demo data |
local |
(built-in) | Scans local env vars, SSH keys, .env files |
aws |
pip install nhi-audit[aws] |
aws configure |
azure |
pip install nhi-audit[azure] |
az login |
gcp |
pip install nhi-audit[gcp] |
gcloud auth application-default login |
github |
pip install nhi-audit[github] |
GITHUB_TOKEN env var |
k8s |
pip install nhi-audit[k8s] |
kubectl configured |
agents |
(built-in) | Scans Python code in --path |
Install all providers at once: pip install "nhi-audit[all]"
Commands
agentsentry scan <target> [options] # scan an environment
agentsentry blast <identity-name> # show blast radius for one NHI
agentsentry providers # list ready/missing providers
agentsentry permissions <provider> # check IAM permissions needed
# Pro
agentsentry interactive # guided multi-provider scan [Pro]
agentsentry activate <key> # activate Pro license
agentsentry license # show license status
Pro flags for scan:
--visualizegenerate interactive HTML attack graph--enrichcorrelate findings with CISA KEV threat feed--jsonoutput full scan result as JSON
Architecture
agentsentry/
โโโ core/
โ โโโ models.py # Data models (NonHumanIdentity, Resource, Finding)
โ โโโ scorer.py # Risk scoring engine โ P ร R ร E ร A
โ โโโ graph.py # NHI Attack Graph (NetworkX + Pyvis)
โโโ scanners/
โ โโโ mock.py # Demo environment โ no credentials needed
โ โโโ aws.py # AWS IAM scanner
โ โโโ langchain_scanner.py # AI agent static analyzer
โโโ enrichment/
โ โโโ cisa_kev.py # CISA KEV feed correlation [Pro]
โโโ providers/ # Cloud provider wrappers
โโโ license.py # Offline HMAC license validation
Changelog
v0.1.3
- Pro license tier โ
agentsentry activate <key>command agentsentry licensecommand to check activation status--visualize,--enrich,--json, andinteractiveare now Pro features- Banner shows
โก PROwhen a valid license is active - Offline HMAC-SHA256 key validation (no server call after activation)
v0.1.2
- LangChain / CrewAI static analyzer scanner
- Interactive multi-provider scan mode
- CISA KEV threat intelligence enrichment
- Full AWS IAM, Azure, GCP, GitHub, K8s provider implementations
v0.1.1
- Interactive HTML attack graph (Pyvis)
- Blast radius analysis
- MITRE ATT&CK mapping
v0.1.0
- Initial release: mock scanner, PรRรEรA scoring, Rich CLI output
Contributing
Open-source core, forever. Issues and PRs welcome โ especially:
- Cloud provider scanner implementations
- Additional AI agent framework support (AutoGen, Semantic Kernel, Dify)
- Threat intelligence enrichment integrations
License
MIT โ use it, fork it, build on it.
Built by Abhiram Lanka ยท agentsentry.tool
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file nhi_audit-0.1.3.tar.gz.
File metadata
- Download URL: nhi_audit-0.1.3.tar.gz
- Upload date:
- Size: 52.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
95601008495c5c427cd38c09634b59995b27843116dbad3568d76e7505568a9e
|
|
| MD5 |
869dceae58b156880cad43a912aff6b5
|
|
| BLAKE2b-256 |
f7d36bc394f9dc2f98722add02f8348db2ef256a41f1b6db25907e5ff77e75a4
|
File details
Details for the file nhi_audit-0.1.3-py3-none-any.whl.
File metadata
- Download URL: nhi_audit-0.1.3-py3-none-any.whl
- Upload date:
- Size: 59.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f440e69085f2d2e9d3539cdb3c045a832b475d8e9312df2a02237174f5f9fa5e
|
|
| MD5 |
123c5a4b8c7b96a0135872d331e2f61b
|
|
| BLAKE2b-256 |
7d6789589d35beda0eb684b2385d2a2086778e00e554f66896068fa98cc763b0
|