Non-Human Identity (NHI) Audit
An NHI audit evaluates every machine credential across an organization: API keys, OAuth tokens, service accounts, No-Code workflows (n8n, Make), and AI agent credentials (MCP). In modern environments, machine identities outnumber human users 10× to 50× while bypassing MFA and HR offboarding.
See the 4-phase methodology →The 4 Phases of an NHI Audit
A repeatable, auditable technical workflow:
- Discovery and inventory of machine identities
- Privilege, exposed secret, and zombie access analysis
- Adversarial validation (agent & API hijacking)
- Remediation, vaulting, and lifecycle governance
What Does an NHI Audit Cover?
While traditional IAM audits focus on employees (SSO, MFA, Active Directory), an NHI audit inventories and hardens every credential that authenticates without direct human interaction.
The 4 Families of Non-Human Identities
- API Keys & Tokens: SaaS API keys, OAuth tokens, Personal Access Tokens (PATs), webhook URLs
- Service & Cloud Accounts: AD/Entra ID service accounts, Cloud IAM roles (AWS, Azure, GCP), CI/CD bots
- Secrets & Certificates: SSH keys, TLS certificates, database passwords stored in
.envfiles - AI Agent & No-Code Identities: LLM API keys, MCP server credentials (
mcp.json), Make, n8n, and Zapier connectors
What the Audit Verifies
- Ownership & Activity: Is every key tied to a named human owner and an active production use case?
- Least Privilege: Does a read-only script or AI agent hold unnecessary
Admin *permissions? - Storage Hygiene: Are secrets hardcoded in Git repositories, workflow JSON exports, or application logs?
- Credential Lifespan: Do tokens expire automatically, or remain valid indefinitely?
Why Run an NHI Audit?
The rapid adoption of No-Code automations and autonomous AI agents has turned unmanaged machine credentials into a primary intrusion vector.
5 Concrete Technical Risks
Read/Write * during prototyping expose the entire stack.
Business & Regulatory Drivers
In practice, organizations initiate an NHI audit around four recurring triggers:
- ISO 27001, NIS2, SOC 2 & DORA: external auditors increasingly require an up-to-date machine identity inventory, least-privilege evidence, and revocation logs.
- AI Agents & EU AI Act (Art. 15): securing an MCP server or RAG pipeline requires controlling the underlying identities querying internal databases.
- Shadow Automation (No-Code): business teams connect CRMs, email, and ERPs via n8n, Make, or Power Automate outside IT oversight.
- Staff offboarding & cyber-insurance: technical departures often expose dozens of scripts and workflows running on personal or shared keys.
How an NHI Audit Is Practiced (4 Phases)
A structured workflow combining local static analysis, Cloud/IAM review, and controlled adversarial testing against automations.
Phase 1: Discovery & Inventory (Making the Invisible Visible)
Objective: Catalog all active and dormant machine identities within the defined scope.
- Scan Git repositories (including commit history),
.envfiles, and containers for hardcoded secrets - Export IAM roles, service accounts (Cloud, AD/Entra ID), and authorized third-party OAuth apps
- Collect No-Code workflow exports (n8n, Make, Zapier JSON) and AI agent
mcp.jsonconfigurations - Cross-reference each identity with access logs (last-used timestamp) to flag zombie accounts
Deliverable: Consolidated NHI register with assigned owner (or flagged "orphan") and last-seen activity.
Phase 2: Privilege & Exposure Analysis
Objective: Measure the gap between granted permissions and strictly required capabilities.
- Flag wildcard permissions (
*,admin,full_access) across APIs, RAG vector stores, and MCP tools - Identify public webhooks exposed without HMAC signature verification or strong auth
- Assess credential age and missing automated rotation policies
- Map privilege escalation paths across connected SaaS tools and cloud roles
Deliverable: Risk-ranked exposure matrix (Critical / High / Moderate) and immediate zombie revocation list.
Phase 3: Adversarial Validation (No-Code & AI Agents)
Objective: Verify under controlled conditions whether an NHI can be hijacked or replayed.
- Test replay of exposed tokens and direct invocation of unauthenticated webhooks
- Run indirect prompt injection tests against MCP/RAG agents to verify whether they execute unauthorized actions with their own credentials
- Verify multi-tenant isolation: can an NHI scoped to Tenant A read Tenant B's records or embeddings?
Deliverable: Reproducible proof-of-concept scenarios demonstrating concrete business impact.
Phase 4: Remediation, Vaulting & Lifecycle Governance
Objective: Prevent credential sprawl from returning three months after cleanup.
- Staged revocation of zombie keys and rotation of exposed secrets without breaking production
- Centralization in a secrets vault and gradual migration from static keys to short-lived tokens (OIDC / ephemeral auth)
- Enforcing a simple governance rule: 1 NHI = 1 named human owner + 1 expiration date
- Mapping technical evidence to ISO 27001, NIS2, SOC 2, and EU AI Act controls
Deliverable: Prioritized 30/60/90-day remediation roadmap, NHI register, and lifecycle policy.
Open-Source Tooling & Techniques
A rigorous NHI audit can be conducted without proprietary SaaS lock-in by combining open-source, locally executed tooling.
Discovery & Technical Assessment
- Gitleaks / TruffleHog: detects hardcoded API keys, tokens, and secrets across Git history and local files
- Prowler / ScoutSuite: audits service accounts, stale access keys, and over-privileged IAM roles (AWS, Azure, GCP)
- Static JSON / MCP analysis: local inspection of
n8n,Make, andmcp.jsonconfigs (see our local MCP Scanner)
Remediation & Lifecycle Control
- OpenBao / Infisical: open-source secrets managers for centralized storage, audit trails, and automated rotation
- OIDC Federation & SPIFFE/SPIRE: replaces long-lived static keys with short-lived cryptographic workload identities
- Runtime guardrails: strict tool schema validation and immutable logging of every machine-initiated action
Typical Duration & Market Cost Benchmarks
Audit duration and budget depend on the number of cloud accounts, repositories, No-Code workflows, and AI agents in scope. The table below summarizes typical European/international market benchmarks for independent or boutique assessments (excluding optional commercial SaaS licenses).
| Audit Tier | Typical Scope | Average Duration | Observed Market Range (excl. VAT) |
|---|---|---|---|
| Flash Audit (Targeted) | SMB / Agency: critical API keys, main repositories, and 5–15 No-Code workflows (Make/n8n) or MCP servers. | 2–3 days | €2,500 – €4,500 |
| Full NHI & AI Agent Audit | Mid-market / SaaS: Cloud IAM, Git, OAuth connectors, No-Code, MCP/RAG agents, and ISO 27001 / NIS2 mapping. | 5–8 days | €6,000 – €12,000 |
| Enterprise / Regulated Audit | Large organization (Banking, Healthcare): multi-cloud, CI/CD pipelines, deep adversarial testing, and remediation support. | 10–15 days | €14,000 – €25,000+ |
| Periodic Review (Ongoing) | Quarterly or semi-annual review of new NHIs, staff offboarding, and secret rotation compliance. | 1–2 days / review | €1,500 – €3,000 |
Key cost drivers: whether an initial inventory already exists, number of cloud providers (AWS/Azure/GCP), volume of Shadow IT automations, and documentation depth required by external auditors (ISO 27001, SOC 2, DORA, NIS2).
FAQ — Non-Human Identity (NHI) Audits
How does an NHI audit differ from a standard IAM audit?
Standard IAM audits review human employee access (SSO, MFA, HR onboarding/offboarding). An NHI audit targets machine credentials (API keys, OAuth tokens, service accounts, webhooks, AI agents) that bypass those controls.
Can an NHI audit break production automations?
Not during discovery and analysis, which are read-only. Revoking zombie keys or tightening scopes is then executed in controlled batches after verifying recent usage logs.
How often should Non-Human Identities be audited?
An initial baseline audit followed by quarterly reviews (or semi-annual for SMBs) is standard, as teams continuously spin up new API keys, No-Code connectors, and AI agents.
Can teams run a first NHI check internally for free?
Yes: by running Gitleaks on Git repositories, reviewing third-party OAuth apps in Google Workspace / Microsoft 365, and locally inspecting mcp.json files and n8n/Make exports.
Related Pages
Local MCP & Agent Security Scanner
100% client-side, zero-telemetry tool to inspect mcp.json configs and flag excessive privileges.
AI Agent Security Audit
Tool-use vulnerabilities, privilege escalation, and multi-agent coordination failures.
Read guide →AI System Audit Framework
Full-stack 4-layer methodology covering models, RAG vector stores, agents, and governance.
Read guide →EU AI Act & ISO 42001
Mapping technical audit evidence to European regulatory requirements and AIMS controls.
Read guide →