wiaudit — Workload Identity Auditor
Alpha (0.1). Feedback and issues welcome.
Find risky GitHub Actions → Azure / Microsoft Entra OIDC trust, and see exactly why a workflow
gets AADSTS700213: No matching federated identity record found.
- Read-only. Collectors only list things (
az … list, GraphGET,gh apiGET). wiaudit never creates, changes or deletes anything and never handles credentials — it uses your existingaz/ghlogin. - Offline analysis. Collection writes plain JSON;
scananddoctorwork on those files, so you can collect in one place and analyse anywhere (or hand the JSON to an auditor). - Outputs: terminal, HTML, JSON, SARIF (GitHub code scanning). CI exit codes.
- Also ships a local MCP server, so coding agents (Claude Code, Copilot, Cursor) can run the audit.
Why now
- GitHub now issues immutable OIDC subjects (
repo:OWNER@OWNER_ID/REPO@REPO_ID:…) for repositories created, renamed or transferred on/after 2026‑07‑15. Federated credentials written in the old name‑based format silently stop matching for those repos, and Microsoft recommends migrating. - Name‑based trust to a deleted or renamed repo can be claimed by whoever registers that name again.
- CI identities often hold Owner / Contributor on a whole subscription and trust
pull_requestruns.
Install
pip install wiaudit
# latest from GitHub:
pip install git+https://github.com/wiaudit/wiaudit.git
pip install "wiaudit[mcp]" # + MCP server
Requires Python 3.10+, and for collection: Azure CLI (az login) and GitHub CLI (gh auth login).
Quick start
az login
wiaudit collect azure -o azure-snapshot.json # current subscription
# --all-subscriptions | --subscription <id> (repeat) | --app-prefix gh- | --no-apps | --no-managed-identities
wiaudit collect github --from-azure azure-snapshot.json -o repos.json # repo IDs, created date, deleted/renamed
wiaudit scan --azure azure-snapshot.json --github repos.json \
--repo ./my-repo --format html -o report.html \
--allowed-owners my-org,my-other-org # optional: flag every other owner
cd my-repo && wiaudit doctor --azure ../azure-snapshot.json --github ../repos.json
Permissions needed to collect: Azure Reader on the subscriptions, and in Entra the ability to read
applications (any member user can by default; Application.Read.All for service principals).
doctor output
[FAIL] .github/workflows/deploy.yml -> job 'deploy'
identity: managedIdentity:mi-new-svc (2222…)
REJECTED: repo:contoso@5544123/new-svc@900001:ref:refs/heads/main
closest credential subject: repo:contoso/new-svc:ref:refs/heads/main
hint: This repo was created, renamed or transferred on/after 2026-07-15, so GitHub sends the
immutable subject … The name-based credentials will not match.
Rules
| ID | Severity* | Finding |
|---|---|---|
| WIA001 | low–high | Name‑based (mutable) GitHub subject; suggests the immutable subject when IDs are known |
| WIA002 | high | Flexible credential with wildcards that does not bind repository_id / repository_owner_id |
| WIA003 | medium–critical | Identity trusts pull_request runs |
| WIA004 | medium–high | Privileged role (Owner, UAA, RBAC Admin, Contributor) at subscription / MG / root scope |
| WIA005 | low | Non‑default audience |
| WIA006 | critical | Trust to a GitHub repo that no longer exists (name can be re‑registered) |
| WIA007 | critical | Trust to a repo's old name after a rename |
| WIA008 | medium | Identity near the 20 federated credentials limit |
| WIA009 | low | Credential from an unrecognised issuer (collect azure --all-issuers) |
| WIA010 | medium–critical | Trust to a repo outside your organizations: owner not in --allowed-owners, or a personal GitHub account |
| WIA011 | info | Review list of all GitHub owners trusted in the tenant |
| WIA101 | critical | pull_request_target workflow with id-token: write |
| WIA102 | low | id-token: write granted at workflow level to several jobs |
| WIA103 | medium | azure/login with a long‑lived creds: secret instead of OIDC |
| WIA104 | medium | azure/login OIDC step without id-token: write |
| WIA201 | high | A workflow job's subject matches no federated credential (would fail at login) |
* Severity is raised when the identity holds privileged roles. wiaudit rules lists them.
CI: GitHub Action
permissions:
contents: read
security-events: write
jobs:
wiaudit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: wiaudit/wiaudit@v0
with:
fail-on: critical
# azure-snapshot: audit/azure-snapshot.json # optional, or collect-azure: true after azure/login
Without a snapshot the action checks workflows only (WIA101–104). Findings appear in the Security tab.
MCP server (for AI coding agents)
{ "mcpServers": { "wiaudit": { "command": "wiaudit-mcp" } } }
Tools: scan, doctor, list_rules — all read‑only, local files only.
Snapshot format
azure-snapshot.json (v1): { version, tenantId, identities: [{ kind: app|managedIdentity, displayName, clientId, objectId, resourceId?, federatedCredentials: [{ name, issuer, subject, audiences, claimsMatchingExpression? }], roleAssignments: [{ role, scope }] }] }. You can generate it yourself
(e.g. from Terraform state) and still use scan / doctor.
Limits (v0.1)
- GitHub Actions → Azure only (GitLab, Azure DevOps, AWS/GCP planned).
- Custom OIDC subject templates (
gh api repos/…/actions/oidc/customization/sub) are not yet modelled. - Reusable workflows (
job_workflow_ref) are not yet resolved.
Scan only tenants and repositories you are authorised to assess.
License: Apache‑2.0
Metadata
Release files for wiaudit 0.1.7
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| wiaudit-0.1.7.tar.gz | 42.5 kB | With provenance | Details for wiaudit-0.1.7.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| wiaudit-0.1.7-py3-none-any.whl | Python 3 | none | any | Details for wiaudit-0.1.7-py3-none-any.whl |
Total release size: 84.4 kB
Release files / wiaudit-0.1.7.tar.gz
| Download URL | wiaudit-0.1.7.tar.gz |
|---|---|
| Size | 42.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
afa0798219019aa68e214e5f999e2c0b371d4cdfa0206b99e33baa0d96eafb33
|
|
BLAKE2b-256 checksum How to use checksums |
f88cf8e85818c4da6ba6211c6473fb7ec0cf49946fcb10f52df3e8c77306c207
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 26, 2026.
Transparency logRelease files / wiaudit-0.1.7-py3-none-any.whl
| Download URL | wiaudit-0.1.7-py3-none-any.whl |
|---|---|
| Size | 41.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
0d978b50c7d6b8b6cbc78c148815d7b0ebf68a8ded0a2d5930c6d418dfd03e25
|
|
BLAKE2b-256 checksum How to use checksums |
0142a9ce9cf61f475e8b859f110df383c605d584ddd91c9d17393ebd0b2efd15
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 26, 2026.
Transparency logSecurity for wiaudit 0.1.7
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for wiaudit-0.1.7.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 26, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.