Skip to content
KitploitKITPLOIT
ToolsExploitsBlog
Log in
Submit
ToolsExploitsBlog
Submit

Hacking, PenTest, and Cybersecurity Tools for Your Security Arsenal!

Kitploit is a directory of hacking, cybersecurity, and pentesting tools. Discover the latest project updates to find vulnerabilities, analyze systems, automate testing, and strengthen your security.

FeedsContactPrivacyยฉ 2026 Kitploit

Tool Directory

Categories

View all categories
Loading categories
nhi-risk-analyzer โ€” 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. | Kitploit
Tools/GitHubGitHub/likithmanoj/nhi-risk-analyzer
Cloud Infrastructure SecurityDefensive ToolsPrivilege EscalationVulnerability AnalysisScripting & AutomationConfiguration AuditingCloud SecuritySecret Detection
Identity & Access Management (IAM)
Misconfiguration
Incident Response
GitHublikithmanoj/nhi-risk-analyzer

nhi-risk-analyzer

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.

View Repository
72119 days agoNot yet reviewed

Most Popular

View all โ†’

Discover the most used tools by our community.

Explore all tools

Browse our collection of tools

View all tools โ†’
Share

Multi-Cloud Non-Human Identity (NHI) Risk Analyzer & Remediator

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!


๐ŸŒ Multi-Cloud Identity Coverage

Cloud ProviderIdentity Types CoveredDiscovery EngineSecret / Credential InspectionRules ActiveStatus
๐ŸŸง AWSIAM Roles, Machine Users, Groups, PoliciesBoto3 + Session CachingAccess Keys (CreateDate, LastUsed)13 Rules (AWS_01โ€“16, TAG_01)โœ… Supported
๐ŸŸฆ AzureEntra ID Service Principals, App Registrations, Managed IdentitiesPure REST (Graph & ARM)Client Secrets (passwordCredentials), Certs (keyCredentials)5 Rules (AZURE_01โ€“05)โœ… Supported
๐ŸŸฅ GCPService Accounts, Workload Identity, IAM RolesPure 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.


๐Ÿ“‹ Overview

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:

  1. Multi-Cloud State Collection: Ingestion into a normalized inventory.json snapshot via lightweight, cloud-native mechanisms (Boto3 session-cached for AWS; zero-dependency pure REST for Azure and GCP).
  2. Offline Risk Evaluation: Evaluating security rules against the snapshot without live network dependencies. This means the risk engine can be re-run, tested, and iterated on without touching cloud providers again, and every finding is reproducible against the exact account/tenant state it was generated from.
  3. Automated Remediation & Containment: A fail-closed containment pipeline that neutralizes dangerous escalation attack paths via policy boundaries and deactivates stale/dormant credentials without causing operational microservice outages.

๐ŸŽฏ Why This Project Exists

Enterprise multi-cloud environments routinely contain non-human identities that are:

  • Unstandardized: Created manually across disparate clouds without unified provisioning standards.
  • Over-Permissioned: Granted administrative or wildcard permissions far exceeding actual operational needs.
  • Dormant & Forgotten: Left active long after workloads or integration pipelines have been decommissioned.
  • Incompletely Audited: Carrying inline policies, custom role definitions, or direct bindings that bypass standard compliance checks.
  • Credential Risks: Utilizing access keys, client secrets, or service account keys that are stale (>90 days old), expiring, or have never been used since inception.
  • Escalation-Prone: Holding cloud IAM permissions that, alone or combined, allow privilege escalation to full administrator access โ€” documented attack paths that most policy-only scanners don't check for.

NHI Risk Analyzer automates discovery, security analysis, and targeted remediation across cloud providers using cloud APIs and offline rule processing.


๐Ÿ—๏ธ Architecture & Workflow

  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”         โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”         โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
  โ”‚   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)    โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜                     โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
  1. State Collection (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.
  2. Selective Cloud Orchestrator (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.
  3. Modular Risk Runners (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.
  4. Artifact Export & Run-over-Run Diffing (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.
  5. Remediation & Policy Surgery (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.

โšก Engineering Optimizations

AWS Session Caching

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.

  • STS AssumeRole calls reduced: 35 โ†’ 1
  • Inventory execution time reduced: 79.58s โ†’ 45.67s (~43% runtime improvement)
  • Encapsulation: Authentication remains fully encapsulated inside session.py, requiring zero logic changes to discovery or rule modules.
Download Tool