Discovers, risk-assesses, and remediates non-human identities across AWS, Azure, and GCP using offline rule-based analysis, privilege-escalation detection, and permissions-boundary containment.
An enterprise-grade, offline-first security automation platform that discovers, inventories, analyzes, risk-assesses, and safely remediates Non-Human Identities (NHIs) โ service principals, service accounts, machine roles, access keys, and credentials โ across AWS, Azure, and Google Cloud Platform (GCP).
โญ๏ธ If you find this tool helpful for auditing and securing Non-Human Identities across clouds, please consider starring the repository!
| Cloud Provider | Identity Types Covered | Discovery Engine | Secret / Credential Inspection | Rules Active | Status |
|---|---|---|---|---|---|
| ๐ง AWS | IAM Roles, Machine Users, Groups, Policies | Boto3 + Session Caching | Access Keys (CreateDate, LastUsed) | 13 Rules (AWS_01โ16, TAG_01) | โ Supported |
| ๐ฆ Azure | Entra ID Service Principals, App Registrations, Managed Identities | Pure REST (Graph & ARM) | Client Secrets (passwordCredentials), Certs (keyCredentials) | 5 Rules (AZURE_01โ05) | โ Supported |
| ๐ฅ GCP | Service Accounts, Workload Identity, IAM Roles | Pure REST (IAM & Resource Mgr) | Service Account Keys (validAfterTime, user-managed) | 6 Rules (GCP_01โ06) | โ Supported |
๐งช Test Suite Status: 102 passed, 4 subtests passed (100% GREEN) across all providers and engines.
NHI Risk Analyzer addresses a critical multi-cloud security challenge: modern enterprise cloud environments accumulate hundreds of machine and non-human identities (service accounts, automation roles, CI/CD credentials, cross-cloud trust roles) with minimal visibility into which identities are over-privileged, dormant, or introduce privilege-escalation risk.
The platform enforces strict architectural decoupling across three distinct phases:
inventory.json snapshot via lightweight, cloud-native mechanisms (Boto3 session-cached for AWS; zero-dependency pure REST for Azure and GCP).Enterprise multi-cloud environments routinely contain non-human identities that are:
NHI Risk Analyzer automates discovery, security analysis, and targeted remediation across cloud providers using cloud APIs and offline rule processing.
โโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโ
โ AWS IAM โ โ Azure Entra โ โ GCP IAM โ
โ (Boto3) โ โ (Pure REST) โ โ (Pure REST) โ
โโโโโโโโฌโโโโโโโโ โโโโโโโโฌโโโโโโโโ โโโโโโโโฌโโโโโโโโ
โ โ โ
โโโโโโโโโโโโโโโโโโ โ โโโโโโโโโโโโโโโโโโ
โผ โผ โผ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ inventory.py โ
โ (Multi-Cloud Collector) โ
โโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโ
โผ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ inventory.json โ
โ (Unified State Snapshot) โ
โโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโ
โ
โผ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ risk.py โ
โ (--cloud Orchestrator) โ
โโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโ
โ
โโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโ
โผ โผ โผ
โโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโ
โ aws.py sub- โ โ azure.py sub-โ โ gcp.py sub- โ
โ runner โ โ runner โ โ runner โ
โ (13 Rules) โ โ (5 Rules) โ โ (6 Rules) โ
โโโโโโโโฌโโโโโโโโ โโโโโโโโฌโโโโโโโโ โโโโโโโโฌโโโโโโโโ
โโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโ
โผ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ dispatch.py โ
โ (Containment Dispatcher) โ
โโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโ
โ
โโโโโโโโโโโโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโโโโโโโโโโ
โผ โผ
โโโโโโโโโโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโโโโ
โ policy_surgery.py & โ โ credential.py โ
โ policy.py (Boundaries) โ โ (Deactivate Key) โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโโโโ
nhi/services/inventory.py): Queries cloud APIs across AWS, Azure, and GCP, enriches credential metadata (access key last-used, secret expiration), and serializes a clean state snapshot to inventory.json.nhi/risk/risk.py): Accepts --cloud {aws,azure,gcp,all} to selectively target cloud providers, saving unnecessary API calls and avoiding cross-tenant rate limits.nhi/risk/runners/): Decoupled execution engines (aws.py, azure.py, gcp.py) process provider inventories against modular security rules with defensive guards against partial or missing cloud payloads.nhi/services/export.py, nhi/remediation/diff.py): Calculates security drift against historical baseline scans, uploads execution artifacts to cloud storage, and exports findings to CSV and OASIS SARIF v2.1.0 for audit pipelines.nhi/remediation/): AST-level policy statement partitioning (policy_surgery.py) and non-destructive containment boundaries/key deactivation with dry-run simulation mode and nhi-ignore.yaml exemptions.To eliminate redundant AWS STS authentication calls during inventory collection, authenticated boto3.Session objects are cached for the lifetime of the Python process in nhi/aws/session.py.
AssumeRole calls reduced: 35 โ 179.58s โ 45.67s (~43% runtime improvement)session.py, requiring zero logic changes to discovery or rule modules.