governance-drift
Deterministic AI-agent governance drift detection — evidence-backed findings, stated coverage gaps, and SARIF output for CI.
Your organization has an approved baseline of AI agents (which agents, which models, which
connectors) and a reality that drifts from it: vendors retire models that production agents
still pin; agents appear that nobody approved. governance-drift detects that drift and
reports it under rules that make the report trustworthy — every finding carries a source
URI, JSON field path, and content hash; findings that can't be re-verified are dropped; and
coverage gaps are stated rather than hidden.
This is the Python reference implementation. The same pipeline also runs as a Weft graph on WeaveMind Cloud (clonable, ~$0.03/run) with a human approval gate.
Install
pip install governance-drift # the govdrift CLI (pyyaml only)
pip install "governance-drift[http]" # + httpx, for wiring live sources in Python
Scope: govdrift scan reads local files. The [http] extra adds httpx and the
http_fetcher building block for consumers who construct sources in Python against live
Foundry/tenant endpoints — http_fetcher(url, client) takes a caller-owned client, so its
lifecycle stays with you rather than with the CLI. A URL branch for govdrift scan is not
shipped yet.
Scan
govdrift scan \
--inventory approved.yaml \
--foundry foundry_models.json \
--tenant tenant_observed.json \
--out out/
Writes out/<date>-drift.md (human report), out/findings.sarif (SARIF 2.1.0), and
out/hashes.json (cross-run source-change tracking). Exit code is 1 if any finding
survived verification, else 0 — so it doubles as a CI gate.
Governance drift as a GitHub code-scanning check
govdrift emits SARIF, which GitHub ingests natively. Drop this in a workflow to turn
unapproved-agent and retired-model findings into code-scanning alerts:
- run: govdrift scan --inventory approved.yaml --foundry foundry.json --out out/
continue-on-error: true # let SARIF upload run even when drift is found
- uses: github/codeql-action/upload-sarif@v3
with:
sarif_file: out/findings.sarif
What it checks
- Model retirement — a vendor-retiring/deprecated model that an approved agent still pins. Severity scales with days remaining (≤30 critical, ≤90 high, ≤180 medium).
- Unapproved agents — anything observed in the tenant that isn't in the approved baseline. HIGH by definition.
Every finding's evidence is re-resolved against the payload it came from before the report
is written; a finding citing an unresolvable path is dropped and counted. Adapters are
small classes implementing ChangeSource / InventorySource — Azure AI Foundry model
lifecycle and inventory/tenant JSON-YAML ship today; add your own in ~40 lines.
License
MIT © Jeremy Gracey
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file governance_drift-0.1.1.tar.gz.
File metadata
- Download URL: governance_drift-0.1.1.tar.gz
- Upload date:
- Size: 35.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e0907daeedbc149aba1be77156ce7bd97437c434bafeba990e9c5eff7e2d4111
|
|
| MD5 |
8ed75a9b07dff9dfe030b6c5003a180e
|
|
| BLAKE2b-256 |
14d8ff5f71a01b5443a0da19edd94aaac3b2cab0df958884af91e5017453d7e1
|
Provenance
The following attestation bundles were made for governance_drift-0.1.1.tar.gz:
Publisher:
python.yml on JeremyGracey-AI/governance-drift-researcher
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
governance_drift-0.1.1.tar.gz -
Subject digest:
e0907daeedbc149aba1be77156ce7bd97437c434bafeba990e9c5eff7e2d4111 - Sigstore transparency entry: 2519255252
- Sigstore integration time:
-
Permalink:
JeremyGracey-AI/governance-drift-researcher@66d4d2d91e00a68f3cb7facc49c172c787190b0d -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/JeremyGracey-AI
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python.yml@66d4d2d91e00a68f3cb7facc49c172c787190b0d -
Trigger Event:
push
-
Statement type:
File details
Details for the file governance_drift-0.1.1-py3-none-any.whl.
File metadata
- Download URL: governance_drift-0.1.1-py3-none-any.whl
- Upload date:
- Size: 24.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cbf05ef1f74a294fd014187e85e6d1f089c694b57d63080c2e5eaa505fcf38ea
|
|
| MD5 |
7c5acaf8a81adc4866d351354833a6b9
|
|
| BLAKE2b-256 |
38cdea9ce0b6393837d3d0766cc73a1597048a51ab16bdbb8f2dda171bcd5ad2
|
Provenance
The following attestation bundles were made for governance_drift-0.1.1-py3-none-any.whl:
Publisher:
python.yml on JeremyGracey-AI/governance-drift-researcher
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
governance_drift-0.1.1-py3-none-any.whl -
Subject digest:
cbf05ef1f74a294fd014187e85e6d1f089c694b57d63080c2e5eaa505fcf38ea - Sigstore transparency entry: 2519255302
- Sigstore integration time:
-
Permalink:
JeremyGracey-AI/governance-drift-researcher@66d4d2d91e00a68f3cb7facc49c172c787190b0d -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/JeremyGracey-AI
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python.yml@66d4d2d91e00a68f3cb7facc49c172c787190b0d -
Trigger Event:
push
-
Statement type: