nhi-audit 0.1.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (32) hide show
  1. nhi_audit-0.1.0/PKG-INFO +226 -0
  2. nhi_audit-0.1.0/README.md +167 -0
  3. nhi_audit-0.1.0/agentsentry/__init__.py +7 -0
  4. nhi_audit-0.1.0/agentsentry/__main__.py +4 -0
  5. nhi_audit-0.1.0/agentsentry/cli.py +519 -0
  6. nhi_audit-0.1.0/agentsentry/core/__init__.py +8 -0
  7. nhi_audit-0.1.0/agentsentry/core/graph.py +231 -0
  8. nhi_audit-0.1.0/agentsentry/core/models.py +202 -0
  9. nhi_audit-0.1.0/agentsentry/core/scorer.py +432 -0
  10. nhi_audit-0.1.0/agentsentry/enrichment/__init__.py +3 -0
  11. nhi_audit-0.1.0/agentsentry/enrichment/cisa_kev.py +233 -0
  12. nhi_audit-0.1.0/agentsentry/providers/__init__.py +100 -0
  13. nhi_audit-0.1.0/agentsentry/providers/aws.py +83 -0
  14. nhi_audit-0.1.0/agentsentry/providers/azure.py +185 -0
  15. nhi_audit-0.1.0/agentsentry/providers/base.py +125 -0
  16. nhi_audit-0.1.0/agentsentry/providers/gcp.py +202 -0
  17. nhi_audit-0.1.0/agentsentry/providers/github.py +231 -0
  18. nhi_audit-0.1.0/agentsentry/providers/k8s.py +191 -0
  19. nhi_audit-0.1.0/agentsentry/providers/local.py +382 -0
  20. nhi_audit-0.1.0/agentsentry/scanners/__init__.py +1 -0
  21. nhi_audit-0.1.0/agentsentry/scanners/aws.py +333 -0
  22. nhi_audit-0.1.0/agentsentry/scanners/langchain_scanner.py +423 -0
  23. nhi_audit-0.1.0/agentsentry/scanners/mock.py +215 -0
  24. nhi_audit-0.1.0/nhi_audit.egg-info/PKG-INFO +226 -0
  25. nhi_audit-0.1.0/nhi_audit.egg-info/SOURCES.txt +30 -0
  26. nhi_audit-0.1.0/nhi_audit.egg-info/dependency_links.txt +1 -0
  27. nhi_audit-0.1.0/nhi_audit.egg-info/entry_points.txt +2 -0
  28. nhi_audit-0.1.0/nhi_audit.egg-info/requires.txt +43 -0
  29. nhi_audit-0.1.0/nhi_audit.egg-info/top_level.txt +1 -0
  30. nhi_audit-0.1.0/pyproject.toml +78 -0
  31. nhi_audit-0.1.0/setup.cfg +4 -0
  32. nhi_audit-0.1.0/tests/test_scorer.py +172 -0
@@ -0,0 +1,226 @@
1
+ Metadata-Version: 2.4
2
+ Name: nhi-audit
3
+ Version: 0.1.0
4
+ Summary: Open-source auditor for Non-Human Identities and AI Agent attack surfaces in cloud environments
5
+ Author-email: Abhiram Lanka <lankaabhiram16@gmail.com>
6
+ License-Expression: MIT
7
+ Project-URL: Homepage, https://agent-sentry-beta.vercel.app
8
+ Project-URL: Repository, https://github.com/Abhiram-ops/agent-sentry
9
+ Project-URL: Bug Tracker, https://github.com/Abhiram-ops/agent-sentry/issues
10
+ Project-URL: Documentation, https://agent-sentry-beta.vercel.app/docs
11
+ Keywords: security,cloud,iam,ai-agents,non-human-identity,attack-graph
12
+ Classifier: Development Status :: 3 - Alpha
13
+ Classifier: Intended Audience :: Information Technology
14
+ Classifier: Intended Audience :: Developers
15
+ Classifier: Topic :: Security
16
+ Classifier: Topic :: System :: Systems Administration
17
+ Classifier: Programming Language :: Python :: 3
18
+ Classifier: Programming Language :: Python :: 3.10
19
+ Classifier: Programming Language :: Python :: 3.11
20
+ Classifier: Programming Language :: Python :: 3.12
21
+ Classifier: Operating System :: OS Independent
22
+ Requires-Python: >=3.10
23
+ Description-Content-Type: text/markdown
24
+ Requires-Dist: networkx>=3.2
25
+ Requires-Dist: pyvis>=0.3
26
+ Requires-Dist: click>=8.1
27
+ Requires-Dist: rich>=13.7
28
+ Requires-Dist: jinja2>=3.1
29
+ Requires-Dist: httpx>=0.27
30
+ Requires-Dist: pydantic>=2.6
31
+ Requires-Dist: python-dateutil>=2.9
32
+ Provides-Extra: aws
33
+ Requires-Dist: boto3>=1.34; extra == "aws"
34
+ Provides-Extra: azure
35
+ Requires-Dist: azure-identity>=1.16; extra == "azure"
36
+ Requires-Dist: azure-mgmt-authorization>=4.0; extra == "azure"
37
+ Requires-Dist: azure-mgmt-resource>=23.0; extra == "azure"
38
+ Provides-Extra: gcp
39
+ Requires-Dist: google-auth>=2.28; extra == "gcp"
40
+ Requires-Dist: google-api-python-client>=2.120; extra == "gcp"
41
+ Provides-Extra: github
42
+ Requires-Dist: requests>=2.31; extra == "github"
43
+ Provides-Extra: k8s
44
+ Requires-Dist: kubernetes>=29.0; extra == "k8s"
45
+ Provides-Extra: all-clouds
46
+ Requires-Dist: agentsentry[aws]; extra == "all-clouds"
47
+ Requires-Dist: agentsentry[azure]; extra == "all-clouds"
48
+ Requires-Dist: agentsentry[gcp]; extra == "all-clouds"
49
+ Requires-Dist: agentsentry[github]; extra == "all-clouds"
50
+ Requires-Dist: agentsentry[k8s]; extra == "all-clouds"
51
+ Provides-Extra: dev
52
+ Requires-Dist: pytest>=8.0; extra == "dev"
53
+ Requires-Dist: pytest-cov; extra == "dev"
54
+ Requires-Dist: black; extra == "dev"
55
+ Requires-Dist: ruff; extra == "dev"
56
+ Requires-Dist: mypy; extra == "dev"
57
+ Provides-Extra: dashboard
58
+ Requires-Dist: streamlit>=1.32; extra == "dashboard"
59
+
60
+ # AgentSentry ๐Ÿ›ก๏ธ
61
+
62
+ ![CI](https://github.com/Abhiram-ops/agent-sentry/actions/workflows/ci.yml/badge.svg)
63
+ ![Python](https://img.shields.io/badge/python-3.10%2B-blue)
64
+ ![License](https://img.shields.io/badge/license-MIT-green)
65
+
66
+ **Open-source auditor for Non-Human Identities and AI Agent attack surfaces in cloud environments.**
67
+
68
+ > *"45 machine identities for every 1 human. Almost none of them are governed."*
69
+
70
+ 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.
71
+
72
+ ---
73
+
74
+ ## Why AgentSentry?
75
+
76
+ 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.
77
+
78
+ In 2026, with autonomous AI agents taking real-world actions (sending emails, writing databases, deploying code), a single compromised NHI can cascade into a breach that defeats every perimeter control simultaneously.
79
+
80
+ No free, open-source tool maps this risk. AgentSentry does.
81
+
82
+ ---
83
+
84
+ ## Features
85
+
86
+ - ๐Ÿ” **NHI Discovery** โ€” Finds all IAM roles, API keys, service accounts, and AI agents
87
+ - ๐Ÿ“Š **Risk Scoring** โ€” Computes `Risk = Privilege ร— Reachability ร— Exposure ร— AI-Amplification`
88
+ - ๐Ÿ•ธ๏ธ **Attack Graph** โ€” Builds an interactive graph of access relationships and blast radius
89
+ - ๐Ÿค– **AI Agent Analysis** โ€” Scans LangChain/CrewAI configs for autonomy level and tool risk
90
+ - ๐Ÿ—บ๏ธ **MITRE ATT&CK Mapping** โ€” Maps every finding to ATT&CK techniques
91
+ - ๐Ÿ“‹ **CISA KEV Enrichment** โ€” Correlates findings against known exploited vulnerabilities
92
+ - ๐Ÿ†“ **100% Free** โ€” Runs on AWS free tier, outputs to local HTML, no SaaS required
93
+
94
+ ---
95
+
96
+ ## Quick Start
97
+
98
+ ```bash
99
+ # Install
100
+ git clone https://github.com/yourusername/agentsentry
101
+ cd agentsentry
102
+ pip install -e ".[dev]"
103
+
104
+ # Run against mock environment (no credentials needed)
105
+ agentsentry scan mock
106
+
107
+ # Generate interactive attack graph
108
+ agentsentry scan mock --visualize
109
+
110
+ # Analyze blast radius for a specific identity
111
+ agentsentry blast "ml-pipeline"
112
+ ```
113
+
114
+ ---
115
+
116
+ ## Sample Output
117
+
118
+ ```
119
+ โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ
120
+ โ”‚ AgentSentry v0.1.0 โ”‚
121
+ โ”‚ NHI & AI Agent Risk Auditor โ”‚
122
+ โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ
123
+
124
+ NHIs Discovered: 6 Critical: 3 High: 1 AI Agents: 2
125
+
126
+ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
127
+ โ”‚ Identity โ”‚ Type โ”‚ Risk โ”‚ Score โ”‚ Findings โ”‚
128
+ โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
129
+ โ”‚ langchain-crm-agent โ”‚ ai_agent โ”‚ โ— CRITICAL โ”‚ 150.0 โ”‚ 2 โ”‚
130
+ โ”‚ ml-pipeline-executor โ”‚ iam_role โ”‚ โ— CRITICAL โ”‚ 112.5 โ”‚ 3 โ”‚
131
+ โ”‚ github-actions-prod-deploy โ”‚ github_secretโ”‚ โ— CRITICAL โ”‚ 90.0 โ”‚ 2 โ”‚
132
+ โ”‚ legacy-reporting-service-key โ”‚ iam_user_key โ”‚ โ— HIGH โ”‚ 52.5 โ”‚ 2 โ”‚
133
+ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
134
+
135
+ โš  langchain-crm-agent โ€” Fully Autonomous AI Agent With Irreversible Tools
136
+ This agent has FULLY_AUTONOMOUS execution with delete_record, send_email.
137
+ AI-Amplification Factor: 10.0x
138
+ Remediation: Implement human-in-the-loop approval for all irreversible tools.
139
+ MITRE: T1651, T1059
140
+ ```
141
+
142
+ ---
143
+
144
+ ## The Scoring Model
145
+
146
+ ```
147
+ NHI Risk Score = P ร— R ร— E ร— A
148
+
149
+ P = Privilege Score (1โ€“10) How powerful are the permissions?
150
+ R = Reachability Score (1โ€“3) How accessible is this identity to attackers?
151
+ E = Exposure Score (1โ€“5) How poor is the credential lifecycle?
152
+ A = AI-Amplification (1โ€“60) [NOVEL] How much does agent autonomy multiply blast radius?
153
+
154
+ Score โ‰ฅ 100 โ†’ CRITICAL
155
+ Score โ‰ฅ 50 โ†’ HIGH
156
+ Score โ‰ฅ 20 โ†’ MEDIUM
157
+ Score < 20 โ†’ LOW
158
+ ```
159
+
160
+ The **AI-Amplification Factor (A)** is the novel academic contribution of this project.
161
+ No existing NHI risk framework accounts for how autonomous AI agents compound the impact
162
+ of a compromised machine identity. See the [paper](paper/) for the formal model.
163
+
164
+ ---
165
+
166
+ ## Architecture
167
+
168
+ ```
169
+ agentsentry/
170
+ โ”œโ”€โ”€ core/
171
+ โ”‚ โ”œโ”€โ”€ models.py # Data models (NonHumanIdentity, Resource, Finding)
172
+ โ”‚ โ”œโ”€โ”€ scorer.py # Risk scoring engine โ€” P ร— R ร— E ร— A
173
+ โ”‚ โ””โ”€โ”€ graph.py # NHI Attack Graph (NetworkX + Pyvis)
174
+ โ”œโ”€โ”€ scanners/
175
+ โ”‚ โ”œโ”€โ”€ mock.py # Demo environment โ€” no credentials needed
176
+ โ”‚ โ”œโ”€โ”€ aws.py # AWS IAM scanner (Phase 1)
177
+ โ”‚ โ””โ”€โ”€ langchain.py # AI agent static analyzer (Phase 3)
178
+ โ”œโ”€โ”€ enrichment/
179
+ โ”‚ โ”œโ”€โ”€ cisa_kev.py # CISA KEV feed correlation
180
+ โ”‚ โ””โ”€โ”€ mitre.py # MITRE ATT&CK mapping
181
+ โ””โ”€โ”€ cli.py # Click-based CLI
182
+ ```
183
+
184
+ ---
185
+
186
+ ## Roadmap
187
+
188
+ - [x] Core scoring model (P ร— R ร— E ร— A)
189
+ - [x] Mock scanner for demos
190
+ - [x] CLI with Rich terminal output
191
+ - [x] Interactive attack graph visualization
192
+ - [ ] AWS IAM scanner (boto3)
193
+ - [ ] LangChain agent static analyzer
194
+ - [ ] CISA KEV enrichment
195
+ - [ ] MITRE ATT&CK enrichment
196
+ - [ ] Azure AD service principal scanner
197
+ - [ ] GitHub Actions secrets scanner
198
+ - [ ] Streamlit dashboard
199
+ - [ ] Research paper (arXiv)
200
+
201
+ ---
202
+
203
+ ## Contributing
204
+
205
+ This is an open research project. Contributions welcome โ€” especially:
206
+ - Cloud provider scanner implementations
207
+ - Additional AI agent framework support (CrewAI, AutoGen, Semantic Kernel)
208
+ - Threat intelligence enrichment integrations
209
+ - Validation datasets for the scoring model
210
+
211
+ ---
212
+
213
+ ## Paper
214
+
215
+ The formal scoring model and evaluation methodology is being written up as a research paper.
216
+ Pre-print will be available on arXiv. See [`paper/`](paper/) for the LaTeX source.
217
+
218
+ ---
219
+
220
+ ## License
221
+
222
+ MIT โ€” use it, fork it, build on it.
223
+
224
+ ---
225
+
226
+ *Built by Abhiram Lanka | Addressing the NHI blindspot in enterprise security*
@@ -0,0 +1,167 @@
1
+ # AgentSentry ๐Ÿ›ก๏ธ
2
+
3
+ ![CI](https://github.com/Abhiram-ops/agent-sentry/actions/workflows/ci.yml/badge.svg)
4
+ ![Python](https://img.shields.io/badge/python-3.10%2B-blue)
5
+ ![License](https://img.shields.io/badge/license-MIT-green)
6
+
7
+ **Open-source auditor for Non-Human Identities and AI Agent attack surfaces in cloud environments.**
8
+
9
+ > *"45 machine identities for every 1 human. Almost none of them are governed."*
10
+
11
+ 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.
12
+
13
+ ---
14
+
15
+ ## Why AgentSentry?
16
+
17
+ 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.
18
+
19
+ In 2026, with autonomous AI agents taking real-world actions (sending emails, writing databases, deploying code), a single compromised NHI can cascade into a breach that defeats every perimeter control simultaneously.
20
+
21
+ No free, open-source tool maps this risk. AgentSentry does.
22
+
23
+ ---
24
+
25
+ ## Features
26
+
27
+ - ๐Ÿ” **NHI Discovery** โ€” Finds all IAM roles, API keys, service accounts, and AI agents
28
+ - ๐Ÿ“Š **Risk Scoring** โ€” Computes `Risk = Privilege ร— Reachability ร— Exposure ร— AI-Amplification`
29
+ - ๐Ÿ•ธ๏ธ **Attack Graph** โ€” Builds an interactive graph of access relationships and blast radius
30
+ - ๐Ÿค– **AI Agent Analysis** โ€” Scans LangChain/CrewAI configs for autonomy level and tool risk
31
+ - ๐Ÿ—บ๏ธ **MITRE ATT&CK Mapping** โ€” Maps every finding to ATT&CK techniques
32
+ - ๐Ÿ“‹ **CISA KEV Enrichment** โ€” Correlates findings against known exploited vulnerabilities
33
+ - ๐Ÿ†“ **100% Free** โ€” Runs on AWS free tier, outputs to local HTML, no SaaS required
34
+
35
+ ---
36
+
37
+ ## Quick Start
38
+
39
+ ```bash
40
+ # Install
41
+ git clone https://github.com/yourusername/agentsentry
42
+ cd agentsentry
43
+ pip install -e ".[dev]"
44
+
45
+ # Run against mock environment (no credentials needed)
46
+ agentsentry scan mock
47
+
48
+ # Generate interactive attack graph
49
+ agentsentry scan mock --visualize
50
+
51
+ # Analyze blast radius for a specific identity
52
+ agentsentry blast "ml-pipeline"
53
+ ```
54
+
55
+ ---
56
+
57
+ ## Sample Output
58
+
59
+ ```
60
+ โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ
61
+ โ”‚ AgentSentry v0.1.0 โ”‚
62
+ โ”‚ NHI & AI Agent Risk Auditor โ”‚
63
+ โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ
64
+
65
+ NHIs Discovered: 6 Critical: 3 High: 1 AI Agents: 2
66
+
67
+ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
68
+ โ”‚ Identity โ”‚ Type โ”‚ Risk โ”‚ Score โ”‚ Findings โ”‚
69
+ โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
70
+ โ”‚ langchain-crm-agent โ”‚ ai_agent โ”‚ โ— CRITICAL โ”‚ 150.0 โ”‚ 2 โ”‚
71
+ โ”‚ ml-pipeline-executor โ”‚ iam_role โ”‚ โ— CRITICAL โ”‚ 112.5 โ”‚ 3 โ”‚
72
+ โ”‚ github-actions-prod-deploy โ”‚ github_secretโ”‚ โ— CRITICAL โ”‚ 90.0 โ”‚ 2 โ”‚
73
+ โ”‚ legacy-reporting-service-key โ”‚ iam_user_key โ”‚ โ— HIGH โ”‚ 52.5 โ”‚ 2 โ”‚
74
+ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
75
+
76
+ โš  langchain-crm-agent โ€” Fully Autonomous AI Agent With Irreversible Tools
77
+ This agent has FULLY_AUTONOMOUS execution with delete_record, send_email.
78
+ AI-Amplification Factor: 10.0x
79
+ Remediation: Implement human-in-the-loop approval for all irreversible tools.
80
+ MITRE: T1651, T1059
81
+ ```
82
+
83
+ ---
84
+
85
+ ## The Scoring Model
86
+
87
+ ```
88
+ NHI Risk Score = P ร— R ร— E ร— A
89
+
90
+ P = Privilege Score (1โ€“10) How powerful are the permissions?
91
+ R = Reachability Score (1โ€“3) How accessible is this identity to attackers?
92
+ E = Exposure Score (1โ€“5) How poor is the credential lifecycle?
93
+ A = AI-Amplification (1โ€“60) [NOVEL] How much does agent autonomy multiply blast radius?
94
+
95
+ Score โ‰ฅ 100 โ†’ CRITICAL
96
+ Score โ‰ฅ 50 โ†’ HIGH
97
+ Score โ‰ฅ 20 โ†’ MEDIUM
98
+ Score < 20 โ†’ LOW
99
+ ```
100
+
101
+ The **AI-Amplification Factor (A)** is the novel academic contribution of this project.
102
+ No existing NHI risk framework accounts for how autonomous AI agents compound the impact
103
+ of a compromised machine identity. See the [paper](paper/) for the formal model.
104
+
105
+ ---
106
+
107
+ ## Architecture
108
+
109
+ ```
110
+ agentsentry/
111
+ โ”œโ”€โ”€ core/
112
+ โ”‚ โ”œโ”€โ”€ models.py # Data models (NonHumanIdentity, Resource, Finding)
113
+ โ”‚ โ”œโ”€โ”€ scorer.py # Risk scoring engine โ€” P ร— R ร— E ร— A
114
+ โ”‚ โ””โ”€โ”€ graph.py # NHI Attack Graph (NetworkX + Pyvis)
115
+ โ”œโ”€โ”€ scanners/
116
+ โ”‚ โ”œโ”€โ”€ mock.py # Demo environment โ€” no credentials needed
117
+ โ”‚ โ”œโ”€โ”€ aws.py # AWS IAM scanner (Phase 1)
118
+ โ”‚ โ””โ”€โ”€ langchain.py # AI agent static analyzer (Phase 3)
119
+ โ”œโ”€โ”€ enrichment/
120
+ โ”‚ โ”œโ”€โ”€ cisa_kev.py # CISA KEV feed correlation
121
+ โ”‚ โ””โ”€โ”€ mitre.py # MITRE ATT&CK mapping
122
+ โ””โ”€โ”€ cli.py # Click-based CLI
123
+ ```
124
+
125
+ ---
126
+
127
+ ## Roadmap
128
+
129
+ - [x] Core scoring model (P ร— R ร— E ร— A)
130
+ - [x] Mock scanner for demos
131
+ - [x] CLI with Rich terminal output
132
+ - [x] Interactive attack graph visualization
133
+ - [ ] AWS IAM scanner (boto3)
134
+ - [ ] LangChain agent static analyzer
135
+ - [ ] CISA KEV enrichment
136
+ - [ ] MITRE ATT&CK enrichment
137
+ - [ ] Azure AD service principal scanner
138
+ - [ ] GitHub Actions secrets scanner
139
+ - [ ] Streamlit dashboard
140
+ - [ ] Research paper (arXiv)
141
+
142
+ ---
143
+
144
+ ## Contributing
145
+
146
+ This is an open research project. Contributions welcome โ€” especially:
147
+ - Cloud provider scanner implementations
148
+ - Additional AI agent framework support (CrewAI, AutoGen, Semantic Kernel)
149
+ - Threat intelligence enrichment integrations
150
+ - Validation datasets for the scoring model
151
+
152
+ ---
153
+
154
+ ## Paper
155
+
156
+ The formal scoring model and evaluation methodology is being written up as a research paper.
157
+ Pre-print will be available on arXiv. See [`paper/`](paper/) for the LaTeX source.
158
+
159
+ ---
160
+
161
+ ## License
162
+
163
+ MIT โ€” use it, fork it, build on it.
164
+
165
+ ---
166
+
167
+ *Built by Abhiram Lanka | Addressing the NHI blindspot in enterprise security*
@@ -0,0 +1,7 @@
1
+ """
2
+ AgentSentry โ€” Non-Human Identity & AI Agent Risk Auditor
3
+ Open-source. Zero cost. Built for the 2026 threat landscape.
4
+ """
5
+
6
+ __version__ = "0.1.0"
7
+ __author__ = "Abhiram Lanka"
@@ -0,0 +1,4 @@
1
+ from agentsentry.cli import main
2
+
3
+ if __name__ == "__main__":
4
+ main()