Skip to content

fix(security): close 3 more red-team HIGH false-greens (shell-evasion, air-gap beacon, redaction leak) - #232

Merged
sandstream merged 1 commit into
mainfrom
claude/web-kit-status-sync-p6fg9a
Jul 4, 2026
Merged

sandstream merged 1 commit into
mainfrom
claude/web-kit-status-sync-p6fg9a

Conversation

@sandstream

Copy link
Copy Markdown
Owner

Description

Closes three more CONFIRMED HIGH findings from the red-team, all false-greens/leaks.

Changes

  • Install-gate shell-evasion (src/install-gate.ts) — strip a leading run of shell keywords/grouping tokens (if/then/else/do/done/fi/{/(/!/eval/xargs), recurse into eval/xargs quoted args, and split segments on single & and |&. Closes if true; then npm i evil; fi, { npm i evil; }, eval 'npm i evil', echo hi & npm i evil, true |& npm i evil.
  • Air-gap npm beacon (src/update-check.ts) — checkForUpdate is now posture-aware: it honors .kit.toml [air_gap] enabled via resolveAirGap, not only the KIT_AIRGAP env var. A config-declared enclave (kit setup --mode airgap) no longer punches the update beacon out to registry.npmjs.org.
  • Redaction provider-token leak (src/utils/redactSecrets.ts) — the kv-secret matcher's blanket prefix allowlist (GITHUB_/VERCEL_/RAILWAY_/FLY_/CI_) also skipped the real tokens under those prefixes. Replaced with an EXACT non-credential metadata name list (+ the KIT_ flag namespace), so GITHUB_TOKEN, VERCEL_TOKEN, FLY_API_TOKEN, CI_JOB_TOKEN are redacted while public metadata (GITHUB_SHA, RUNNER_OS, …) stays intact.

Testing

  • Regression tests for each (shell/bg/eval evasion; config air-gap suppression; provider-token redaction + metadata-not-flagged).
  • npm test — 2222+ pass, 0 fail; eslint 0 errors; prettier clean; publish.yml unaffected.

Remaining red-team HIGH (next batch, tracked)

  • Memory quarantine evasion (newline-normalize phrase rules; expand hidden-char/ASCII-smuggling coverage; quarantine exfil/pipe-to-shell imperatives).
  • Audit auto-advance laundering (don't absorb an unsigned tail into a fresh seal).
  • Identity cross-signer revocation authority model.

🤖 Generated with Claude Code

https://claude.ai/code/session_01DbF4MFePXWNCd4dxBQvqH2


Generated by Claude Code

…, air-gap beacon, redaction leak)

- install-gate: strip leading shell keywords/grouping (if/then/{/(/eval)
  + recurse into eval/xargs quoted args + split on single & and |& — so
  'if true; then npm i evil; fi', '{ npm i evil; }', 'eval "npm i evil"'
  and 'echo hi & npm i evil' are no longer hidden from the matcher.
- update-check: make air-gap suppression posture-aware — honor
  .kit.toml [air_gap] enabled (resolveAirGap), not just the KIT_AIRGAP
  env var, so a config-declared enclave no longer leaks the npm beacon.
- redactSecrets: replace blanket prefix allowlist (GITHUB_/VERCEL_/
  RAILWAY_/FLY_/CI_) with EXACT non-credential metadata names, so
  provider tokens (GITHUB_TOKEN, VERCEL_TOKEN, FLY_API_TOKEN,
  CI_JOB_TOKEN) are redacted instead of leaked.

Regression tests added for each. 2222+ tests pass; lint clean.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DbF4MFePXWNCd4dxBQvqH2
@github-actions

github-actions Bot commented Jul 4, 2026

Copy link
Copy Markdown

✅ Docker image built successfully

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

@sandstream
sandstream merged commit e49ee33 into main Jul 4, 2026
17 checks passed
@sandstream
sandstream deleted the claude/web-kit-status-sync-p6fg9a branch July 4, 2026 22:43
sandstream added a commit that referenced this pull request Jul 6, 2026
…ingestion (#248)

Cuts [Unreleased] (PRs #232–#246 + red-team/holistic-review sweeps) to 4.2.0.
No breaking changes — the exec-broker gates are opt-in passthrough by default.

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
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