LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

airgap-check

Audit AI repositories for offline crashes, telemetry, and secret routing

TLDR

Static scan a repository
$ airgap-check [path/to/repo]
copy
Static scan plus a Dockerfile snippet
$ airgap-check --fix [path/to/repo]
copy
Run the app in a container with no network
$ airgap-check --run [path/to/repo]
copy
Build the repo Dockerfile, then run a smoke command offline
$ airgap-check --run --build --run-cmd "python3 -m pytest tests/smoke_test.py" [path/to/repo]
copy
Use a custom image and fail DNS immediately
$ airgap-check --run --dns-action nxdomain --image [my-app:latest] --run-cmd "node server.js" [path/to/repo]
copy
Apply a custom rules file
$ airgap-check --rules [./airgap.custom.json] [path/to/repo]
copy
JSON output
$ airgap-check [path/to/repo] --json
copy

SYNOPSIS

airgap-check [options] path

DESCRIPTION

airgap-check (Humanet) is a Go CLI that looks for what an AI application downloads or tries to reach when the network is gone. It scans lockfiles and source for runtime fetches (tokenizers, ONNX weights, `from_pretrained`, telemetry hosts, installer subprocesses) and can run the app in a container with no network.The static pass reads requirements files, `pyproject.toml`, `package.json`, `Cargo.toml`, `go.mod`, and matching lockfiles with a small built-in TOML/YAML reader. It classifies `.env` key names (not values) and git-tracked status.--run starts an ephemeral container, injects a loopback DNS/TLS/HTTP sinkhole, and hooks Python and Node sockets. After the main process exits it waits briefly so detached atexit senders can finish. A command that exits 0 after attempted egress is reported as silent egress.

PARAMETERS

path

Repository to scan. Flags may appear before or after the path.
--fix
Print Dockerfile ENV flags and pre-warm commands for known download and telemetry sites.
--run
Run a probe in `docker run --rm --network none`. Needs Docker.
--build
With --run, build the repo Dockerfile first.
--run-cmd command
Command to run inside the isolated container.
--image name
Existing image to run instead of a built one.
--dns-action sinkhole|nxdomain
DNS mode for --run. Default sinkhole answers A queries with 127.0.0.1 so TLS SNI and HTTP Host still show. nxdomain fails at DNS.
--rules file
Extra rules (or use `.airgap-check.json` in the repo).
--json
Machine-readable output.
-h, --help
Show help and exit.

CAVEATS

Go standard library only; --run needs Docker. Static parsing can miss unusual formatting. Only code paths you exercise are tested. Traffic to literal IP addresses may show as ENETUNREACH instead of SNI. Compiled binaries that ignore HTTP PROXY and cannot bind ports 53/80/443 as a non-root user will not hit the loopback listeners. Findings that a library can fetch offline do not prove the application reaches that call in production.

SEE ALSO

docker(1), curl(1), strace(1)

RESOURCES

Copied to clipboard
Kai