Skip to main content

🛡️ Airgap

Tests

Local-first data governance & PII lineage auditor for DataHub. Finds where sensitive data leaks downstream — without a single byte of your metadata ever leaving your machine.

Built for the DataHub Agent Hackathon (Wildcard / Regulatory Automation).


The problem

PII gets classified correctly at the source (users.email → PII). But as that data flows through dozens of transforms, dashboards, and ML features, the classification doesn't travel with it. The result:

  • PII lands in untagged downstream tables and dashboards → GDPR/KVKK exposure.
  • Those derived assets often have no owner → nobody is accountable.
  • Auditing it means walking the lineage graph by hand → doesn't scale.
  • Automating it usually means shipping your schema/metadata to a cloud LLM — so the tool meant to protect sensitive data becomes a new way to leak it.

The idea

Airgap reads DataHub's metadata (tags, glossary terms, column-level classification, lineage, ownership), walks the lineage graph, and flags governance leaks with deterministic rules. It then uses a local Ollama model to explain each finding in plain language.

Detection is plain, testable code. The LLM only explains — it never decides. That makes results reproducible and hallucination-free, and it means the whole audit runs offline.

The one-liner: an air-gapped auditor for the data you can't afford to leak.


Demo & media

Airgap lineage leak map

Airgap's leak map — red paths are where PII escapes, ranked by blast radius. Generated from a real, local DataHub Lite run (no Docker, no cloud).

Airgap 5 governance leaks found How Airgap works

All docs live in docs/ and media assets in docs/media/.


Install

pip install airgap-datahub

The PyPI distribution is named airgap-datahub; the command and the import name are both airgap. The default config and the synthetic demo catalog ship inside the package, so this works from any directory, with no setup:

airgap audit --no-llm      # writes ./outputs/ in the current directory

Configuration lookup

airgap audit picks its config in this order:

  1. --config path/to/config.yaml, if given;
  2. config.yaml in the current directory, if present;
  3. the default config bundled with the package (same content as config.yaml in this repo), which audits the bundled demo catalog.

A relative fixture_path is resolved against the directory of the config file that sets it; an empty fixture_path means the bundled demo catalog. Outputs go to ./outputs/ in the current directory; change that with --out DIR.

Quickstart (from source, with the bundled demo catalog)

git clone https://github.com/zelihaguven/airgap.git && cd airgap
python3 -m venv .venv && ./.venv/bin/pip install -e .

# Audit the bundled synthetic catalog (zero setup, fully offline)
./.venv/bin/airgap audit

Outputs land in ./outputs/ (relative to the current directory):

  • findings.json — machine-readable findings
  • report.md — human-readable governance report

Skip the LLM (deterministic only) with --no-llm. See examples/ for sample output.

Requirements

  • Python 3.10+
  • (optional) Ollama running locally for prose explanations — ollama pull qwen2.5:7b. Without it, Airgap still produces the full deterministic report.

Run against a REAL DataHub — no Docker, no cloud

Airgap ships with a one-command setup that stands up a local, Docker-free DataHub (DataHub Lite — a DuckDB-backed instance), seeds it with the Acme catalog as genuine DataHub metadata aspects, and imports it:

bash scripts/setup_datahub_lite.sh
./.venv/bin/airgap audit --source datahub-lite

Airgap then reads real DataHub metadata back — schemaMetadata with field-level tags & glossary terms, ownership, upstreamLineage with column-level fineGrainedLineages, and dashboardInfo — through the datahub lite CLI, and runs the exact same detection it runs on the fixture. This is Airgap's thesis in one line: a local-first governance auditor reading from a local-first DataHub.

Auditing a live DataHub (GMS)

The same detection also runs against any hosted DataHub via GraphQL:

./.venv/bin/airgap audit --source datahub \
  --url https://your-company.acryl.io \
  --token $DATAHUB_TOKEN

Only read-only queries are issued. LLM calls always go only to localhost.

The three sources, one model

fixture (zero setup) · datahub-lite (real DataHub, local, no Docker) · datahub (live GMS). All normalize into the same MetadataGraph, so detection is identical regardless of source.


How detection works

Rule Detects
R1 — Untagged PII propagation A field classified as PII/sensitive flows, through column-level lineage, into a downstream field/dataset carrying no equivalent classification.
R2 — Ownerless sensitive asset A dataset that holds sensitive data (directly or by lineage) has no owner — nobody is accountable.

Severity is driven by blast radius: the transitive downstream consumers of the leaking asset. Human-facing consumers (dashboards, charts) escalate a leak to CRITICAL, because that's PII reaching real eyes.

Every finding ships with the lineage evidence path (users.email → stg_users.email → dim_customer.email → marketing_enriched.email) so it's auditable, not a black box.


Architecture

DataHub (GraphQL, read-only)  ─┐
                               ├─► normalize ─► detect (R1/R2 + blast radius)
bundled fixture (JSON)        ─┘                     │
                                                     ▼
                              local Ollama ◄──── explain findings
                              (localhost only)       │
                                                     ▼
                                    outputs/ findings.json + report.md
  • airgap/model.py — normalized metadata model (the source-agnostic contract)
  • airgap/sources/ — datahub (live GraphQL) + fixture (synthetic)
  • airgap/detect/ — deterministic rules + severity
  • airgap/llm/ — local Ollama explanation layer
  • airgap/report/ — Markdown / JSON output

License

Apache-2.0. See LICENSE.

Metadata

Release files for airgap-datahub 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for airgap-datahub 0.1.0
File Size Uploaded Provenance Actions
airgap_datahub-0.1.0.tar.gz 33.9 kB With provenance Details for airgap_datahub-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for airgap-datahub 0.1.0
File Interpreter ABI Platform Actions
airgap_datahub-0.1.0-py3-none-any.whl Python 3 none any Details for airgap_datahub-0.1.0-py3-none-any.whl

Total release size: 68.9 kB

Release files / airgap_datahub-0.1.0.tar.gz

Download URL airgap_datahub-0.1.0.tar.gz
Size 33.9 kB
Tags Source
SHA-256 checksum
How to use checksums
ad1fff2eb017cef7e0a81f94b1806b99a82e16950f0a5a89ef82975e74d98314
BLAKE2b-256 checksum
How to use checksums
47cb08317d4de531b985c403b256027ad1116dbf82b95c66d9674ad32ea44967
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 Oct 25, 2026.

Transparency log

Release files / airgap_datahub-0.1.0-py3-none-any.whl

Download URL airgap_datahub-0.1.0-py3-none-any.whl
Size 34.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5968f9c9e6bf1343a51661fe55e0ff92e383bea5257a29b1e243e08cbc4e1281
BLAKE2b-256 checksum
How to use checksums
76ae9fac9231d69dc4e1b055c739a9a09de516478650805b7e8730b97e122906
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 Oct 25, 2026.

Transparency log

Security for airgap-datahub 0.1.0

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.

Select from 2 files

Attestation for airgap_datahub-0.1.0.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 Oct 25, 2026.

Transparency log

A 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.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page