Skip to main content

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

governance_drift-0.1.1.tar.gz (35.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

governance_drift-0.1.1-py3-none-any.whl (24.4 kB view details)

Uploaded Python 3

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

Hashes for governance_drift-0.1.1.tar.gz
Algorithm Hash digest
SHA256 e0907daeedbc149aba1be77156ce7bd97437c434bafeba990e9c5eff7e2d4111
MD5 8ed75a9b07dff9dfe030b6c5003a180e
BLAKE2b-256 14d8ff5f71a01b5443a0da19edd94aaac3b2cab0df958884af91e5017453d7e1

See more details on using hashes here.

Provenance

The following attestation bundles were made for governance_drift-0.1.1.tar.gz:

Publisher: python.yml on JeremyGracey-AI/governance-drift-researcher

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file governance_drift-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for governance_drift-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 cbf05ef1f74a294fd014187e85e6d1f089c694b57d63080c2e5eaa505fcf38ea
MD5 7c5acaf8a81adc4866d351354833a6b9
BLAKE2b-256 38cdea9ce0b6393837d3d0766cc73a1597048a51ab16bdbb8f2dda171bcd5ad2

See more details on using hashes here.

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

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 files

0.1.0

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page