Skip to content

feat(triage): configurable registry endpoints for air-gapped / mirror use - #73

Merged
sandstream merged 2 commits into
mainfrom
feat/air-gap-internal-mirrors
Jun 24, 2026
Merged

sandstream merged 2 commits into
mainfrom
feat/air-gap-internal-mirrors

Conversation

@sandstream

Copy link
Copy Markdown
Owner

First step toward a no-egress / air-gapped deployment (link internally, run tools locally).

The triage gate is the one part of kit that reaches the public internet. In a no-egress enclave those hosts are unreachable, so triage fails closed and blocks every install. This adds operator-set overrides so triage queries internal mirrors:

KIT_NPM_REGISTRY / KIT_PYPI_INDEX / KIT_GITHUB_API / KIT_DOCKER_REGISTRY

Defaults are the public registries (unchanged). Only the package/repo name is interpolated into the URL path; the host comes from these trusted env vars — SSRF reasoning unchanged. kit already passes its env through to the script.

Adds docs/AIR_GAP.md (mirror vars, running trivy/grype/osv-scanner/semgrep offline, bumblebee offline, provenance limitation).


Generated by Claude Code

… use

The triage gate is the one part of kit that reaches the public internet (it
queries package registries to evaluate a target pre-install). In a no-egress
enclave those hosts are unreachable, so triage fails closed and blocks every
install. This adds operator-set overrides so triage can point at INTERNAL
MIRRORS instead:

  KIT_NPM_REGISTRY / KIT_PYPI_INDEX / KIT_GITHUB_API / KIT_DOCKER_REGISTRY

Defaults are the public registries (unchanged behavior). Only the package/repo
name is ever interpolated into the URL path; the host comes from these trusted
env vars, never the target — so SSRF reasoning is unchanged. kit already passes
its environment through to the script, so setting these in the environment kit
runs under is enough.

Adds docs/AIR_GAP.md covering the mirror env vars, running the external scanners
offline (trivy/grype/osv-scanner/semgrep against local DBs), bumblebee offline
(KIT_BUMBLEBEE_BIN/_CATALOG), and the provenance-verification limitation.

First step toward a no-egress-capable build: link internally, run tools locally.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015ERHw6bVUz39sAuoQZ1iyg
@github-actions

Copy link
Copy Markdown

✅ Docker image built successfully

  • CLI image: docker.io/sandstream/kit:test

Second step of the no-egress roadmap (#80), building on the configurable triage
mirrors. With `KIT_AIRGAP=1`, `kit scan` runs entirely against pre-synced local
databases:

- `airGapScanners()` (pure, tested) drops cloud-only scanners (snyk, semgrep)
  and folds each remaining scanner's offline flags/env in: trivy gains
  `--offline-scan --skip-db-update`, osv-scanner gains `--offline`, grype gets
  `GRYPE_DB_AUTO_UPDATE=false`.
- `isAirGap()` reads the toggle; `cmdScan` applies the plan, injects the offline
  env into each scanner run, and prints which cloud-only scanners were skipped.
- `docs/AIR_GAP.md` §2 documents the toggle + per-scanner behavior and how to
  pre-sync each DB on a connected host.

Local-ruleset support for semgrep offline is a tracked follow-up. No behavior
change when KIT_AIRGAP is unset (transform is a no-op).


Claude-Session: https://claude.ai/code/session_015ERHw6bVUz39sAuoQZ1iyg

Co-authored-by: Claude <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown

✅ Docker image built successfully

  • CLI image: docker.io/sandstream/kit:test

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants