Skip to main content

Open-source auditor for Non-Human Identities and AI Agent attack surfaces in cloud environments

Project description

AgentSentry ๐Ÿ›ก๏ธ

CI PyPI PyPI Downloads Python License Website

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 โ€” โœ…

Buy Pro โ€” $49 one-time โ†’

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:

  • --visualize generate interactive HTML attack graph
  • --enrich correlate findings with CISA KEV threat feed
  • --json output 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 license command to check activation status
  • --visualize, --enrich, --json, and interactive are now Pro features
  • Banner shows โšก PRO when 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

nhi_audit-0.1.3.tar.gz (52.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

nhi_audit-0.1.3-py3-none-any.whl (59.4 kB view details)

Uploaded Python 3

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

Hashes for nhi_audit-0.1.3.tar.gz
Algorithm Hash digest
SHA256 95601008495c5c427cd38c09634b59995b27843116dbad3568d76e7505568a9e
MD5 869dceae58b156880cad43a912aff6b5
BLAKE2b-256 f7d36bc394f9dc2f98722add02f8348db2ef256a41f1b6db25907e5ff77e75a4

See more details on using hashes here.

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

Hashes for nhi_audit-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 f440e69085f2d2e9d3539cdb3c045a832b475d8e9312df2a02237174f5f9fa5e
MD5 123c5a4b8c7b96a0135872d331e2f61b
BLAKE2b-256 7d6789589d35beda0eb684b2385d2a2086778e00e554f66896068fa98cc763b0

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page