Azure identity posture · read-only

Find the path to Tier-0 before an attacker does.

PostureHound ingests your Azure identity graph and shows exactly how a low-privileged principal can escalate to tenant-critical control - as graded findings, framework-mapped, on a native attack graph. This guide takes you from a clean machine to your first scan.

Read-only - never writes to your tenant Runs locally · 127.0.0.1 145 deterministic rules + AI Docker or Python

01 What it is

One tool, three lenses on the same graph.

PostureHound reads an AzureHound collection (or pulls the graph live with a read-only service principal) and assesses it three ways at once:

Deterministic rules

145 always-on rules across identity, apps, RBAC, Key Vault, storage, compute, and tenant governance - mapped to MITRE ATT&CK, Azure Threat Matrix, and CIS.

AI analyst pipeline

Optional. 17 domain specialists plus a cross-domain synthesizer and an adversarial skeptic turn raw facts into compound, verified findings.

Native attack graph

Every escalation edge - ownership, RBAC, managed-identity theft, PIM - rendered as an interactive graph you can trace from any principal to Tier-0.

It never changes anything in Azure. The only input is a data file processed in memory (or read-only API calls in live mode), and the whole app runs on your own machine.

02 Prerequisites

Pick the Docker path (recommended) or the Python path.

  • Docker Desktop (recommended) - or Python 3.11+ if you run it directly.
  • Data to scan, either:
    • an AzureHound collection (*.json or a .zip) - see the AzureHound collector, or
    • a read-only Azure service principal for live collection (Reader + Policy.Read.All) - setup in docs/AZURE_SP_SETUP.md.
  • Optional: an Anthropic API key to enable the AI analyst pipeline. Everything except AI findings works without it.

03 Quick start (Docker)

From zero to the dashboard in about a minute.

  1. Unpack & enter the project

    unzip posturehound.zip # or: git clone <your-repo>
    cd posturehound
  2. Create your environment file

    Copy the template - it documents every setting. You do not need to fill anything in to start.

    cp .env.example .env

    Then set a signing secret so sessions survive restarts (recommended):

    # generates a random secret and appends it to .env
    echo "PH_JWT_SECRET=$(python3 -c 'import secrets;print(secrets.token_urlsafe(48))')" >> .env
  3. Build & start

    docker compose up -d --build

    The container binds to 127.0.0.1:31337 only and restarts automatically.

  4. Open the app

    Visit http://127.0.0.1:31337 and sign in (next section).

Health check
curl -s http://127.0.0.1:31337/health should return {"status":"ok","version":"2.0.0"}.

04 Configuration

Everything is set through environment variables in .env. Secrets stay in the environment - they are never written to disk by the app or returned by any API.

VariableWhat it doesDefault
PH_JWT_SECRETSigning secret for login sessions. Set it so sessions survive a restart.random per install
PH_ADMIN_PASSWORDOverrides the seeded admin password on first boot only.posturehound
PH_AUTH_TTL_HOURSHow long a login stays valid.12
ANTHROPIC_API_KEYEnables the AI analyst pipeline. Optional.-
PH_ARG_TENANT_ID
PH_ARG_CLIENT_ID
PH_ARG_CLIENT_SECRET
Read-only service principal for live Azure collection.-
PH_ADO_PATAzure DevOps token (Work Items: Read & Write) to create work items from findings.-
PH_MAX_UPLOAD_MB
PH_MAX_TOTAL_MB
Upload size caps for collection files.512 / 1024
PH_DATA_DIRWhere scans, graphs and settings are stored.~/.posturehound
Where secrets live
The Anthropic key, service-principal secret, ADO token and JWT secret are read from the environment (or held in memory) and are never persisted to settings.json. The UI only ever shows whether each one is set.

05 First sign-in

The web UI requires authentication out of the box.

  1. Sign in with the default credentials

    Username admin, password posturehound (or whatever you set in PH_ADMIN_PASSWORD).

  2. Change the password immediately

    Go to Settings → Account & sign-in, enter the current password and a new one (8+ characters). The banner and the startup warning clear once you do.

Change the default before you use it for real
PostureHound holds your tenant's entire privilege map. It binds to localhost only, but the default password is public knowledge - rotate it, and set PH_JWT_SECRET, before storing any real scan.

06 Get your data in

Two interchangeable sources feed the same assessment.

Option A - upload an AzureHound collection

Run AzureHound against your tenant, then in PostureHound go to New scan and upload the resulting files. A split collection (ad.json + rm.json) or a single .zip both work - select them together.

Option B - live collection (read-only)

Configure a read-only service principal (Reader on the subscriptions + Policy.Read.All on Microsoft Graph) under Settings → Azure live collection, then trigger a live scan. This also sees network exposure, database config, and Conditional Access / MFA posture that AzureHound alone cannot. Full setup is in docs/AZURE_SP_SETUP.md.

Re-assess anytime
Raw collections are stored per scan, so you can re-run the analysis or rebuild the graph later without collecting again.

07 Run a scan

Deterministic rules always run; AI is additive.

  1. Start it

    From New scan, upload files (Option A) or trigger live collection (Option B). Toggle AI analysis on if you configured an Anthropic key.

  2. Watch the job

    Progress streams live - parsing, escalation-edge derivation, deterministic rules, then (if enabled) the AI specialists and skeptic review.

  3. Land on the dashboard

    When it finishes you get a posture grade, finding counts, and the attack graph - pre-warmed so it opens instantly.

Prefer the terminal? The CLI runs the same deterministic assessment headless.

08 Read the results

Findings carry a severity, a status you control, and - where relevant - a real attack path.

Critical High Medium Low Info / best-practice

Dashboard

Grade & score, finding counts, remediation progress, and the posture trend across all your scans.

Findings & report

Each finding has why-it-matters, remediation, framework tags, and affected objects. Set a status (New / Resolved / Risk Accepted) and a validation label. Export HTML, PDF, CSV, or a leak-safe shareable report.

Rules page

Browse all 145 rules, filter by category / severity / framework, and see which fired, stayed silent, or were not assessed for the current scan.

History & compare

Every scan is kept; compare any two to see what was resolved, what's new, and how the score moved.

"Not assessed" ≠ "pass"
When a rule needs a property that wasn't collected, PostureHound reports it as not assessed rather than a clean pass - so a gap in your data never reads as a green light.
PostureHound overview
Dashboard · posture grade, score, finding counts, and highest-impact exposure
PostureHound findings list
Findings · prioritised list with severity, category, rule ID, and affected entities
PostureHound attack paths
Attack Paths · escalation routes to Tier-0, ranked by impact, with hop count and entry points

09 The attack graph

Trace how privilege actually flows - and where it ends.

Open Attack Graph to explore escalation paths on the graph PostureHound derived from your tenant. Tier-0 is the curated set of tenant-critical targets (Global Admin, subscription owners, and the like). From here you can:

  • See all shortest paths to Tier-0, or trace from any single principal.
  • Find the path between two nodes, or everything a node can reach.
  • Constrain a path to specific abuse primitives with the Via filter (e.g. CanGrantRole, CanStealManagedIdentity).
  • Rank paths by fewest hops or lowest difficulty, mark your own custom Tier-0 targets, and save queries.
  • Jump straight from a finding to its own path with View in attack graph.
  • Click any node to open its detail panel - full properties, Graph API roles, paths-through count, and ownership chain.

When the embedded Cypher backend is available, an ad-hoc query box lets you run read-only Cypher over the graph.

Attack graph - shortest paths to Tier-0
Shortest paths to Tier-0 · GraphApiApp reaches Global Administrator, Application Administrator, and Cloud Application Administrator in one hop each via CanGrantRole
Attack graph node detail panel
Node detail · click any node to see its full properties, permissions, and how many paths flow through it
Attack graph - dangerous app permissions
Dangerous app permissions · all service principals holding privileged Graph API roles, visualised as a subgraph

10 Azure DevOps integration

Optional. Turn a finding into a tracked work item.

Set PH_ADO_PAT (a token with Work Items: Read & Write) in your environment, then enable and configure the integration under Settings → Azure DevOps - organization URL, project, work-item type (default Feature), area path, tags, default assignee, and an optional parent Epic. A Create work item button then appears on each finding in the report.

Token handling
The PAT is read only from the environment - never written to disk and never returned by any API.

11 Command line

Headless assessment for pipelines and quick checks.

# assess a collection, print findings as JSON
python -m posturehound.cli scan ad.json rm.json

# write an HTML report, only Medium and above
python -m posturehound.cli scan collection.zip --format html --out report.html --min-severity Medium

# just validate/parse a collection without assessing
python -m posturehound.cli validate collection.zip

The exit code is non-zero when Critical findings are present, so scan drops straight into CI gates.

12 Run without Docker

Straight Python, for development.

  1. Install dependencies

    python3 -m venv .venv && source .venv/bin/activate
    pip install -r requirements.txt
  2. Start the server

    # uses HOST/PORT from the environment; defaults to 127.0.0.1
    ./start.sh
    # or directly:
    python -m uvicorn posturehound.api:app --host 127.0.0.1 --port 8000
PDF reports
The PDF export uses WeasyPrint, which needs native Pango/Cairo libraries. The Docker image bundles them; for a local install see the WeasyPrint docs for your OS.

13 Security model

This tool holds sensitive data, so it defends itself.

  • Read-only: never writes to your tenant; no SSRF; it never executes collection content.
  • Local by default: the container publishes to 127.0.0.1 only.
  • Authenticated: every request is validated against a signed JWT; the session cookie is httpOnly and SameSite-strict.
  • Secrets stay out of storage: API keys, the SP secret, the ADO PAT and the JWT secret live in the environment, never in settings.json or any API response.
  • Hardened responses: strict Content-Security-Policy, no-sniff, frame-deny, and upload size caps.
  • Shareable report is scrubbed of raw object ids and internal detail before it leaves the tool.

See docs/THREAT_MODEL.md and docs/PRD-auth.md for the full picture.

14 Troubleshooting

SymptomFix
Can't reach the app / connection refusedConfirm the container is up (docker compose ps) and that you're using 127.0.0.1:31337. If Docker Desktop was closed, reopen it - the container auto-restarts.
Signed out after a restartSet PH_JWT_SECRET in .env and rebuild - otherwise the signing secret regenerates and invalidates old sessions.
Forgot the passwordStop the app and delete ~/.posturehound/auth.json; the default admin account is reseeded on next start.
No AI findingsSet ANTHROPIC_API_KEY (env or Settings) and enable AI on the scan. Deterministic findings appear regardless.
Domains show as "not assessed"Those need the live-collection service principal (network, databases, Conditional Access aren't in an AzureHound file). Configure the SP.
PDF export fails locallyInstall WeasyPrint's native Pango/Cairo dependencies, or use the Docker image which includes them.