Repository navigation
fix(security): close 3 more red-team HIGH false-greens (shell-evasion, air-gap beacon, redaction leak) - #232
Merged
Conversation
…, 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
|
✅ Docker image built successfully
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Closes three more CONFIRMED HIGH findings from the red-team, all false-greens/leaks.
Changes
src/install-gate.ts) — strip a leading run of shell keywords/grouping tokens (if/then/else/do/done/fi/{/(/!/eval/xargs), recurse intoeval/xargsquoted args, and split segments on single&and|&. Closesif true; then npm i evil; fi,{ npm i evil; },eval 'npm i evil',echo hi & npm i evil,true |& npm i evil.src/update-check.ts) —checkForUpdateis now posture-aware: it honors.kit.toml [air_gap] enabledviaresolveAirGap, not only theKIT_AIRGAPenv var. A config-declared enclave (kit setup --mode airgap) no longer punches the update beacon out to registry.npmjs.org.src/utils/redactSecrets.ts) — thekv-secretmatcher'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 (+ theKIT_flag namespace), soGITHUB_TOKEN,VERCEL_TOKEN,FLY_API_TOKEN,CI_JOB_TOKENare redacted while public metadata (GITHUB_SHA,RUNNER_OS, …) stays intact.Testing
npm test— 2222+ pass, 0 fail;eslint0 errors;prettierclean;publish.ymlunaffected.Remaining red-team HIGH (next batch, tracked)
🤖 Generated with Claude Code
https://claude.ai/code/session_01DbF4MFePXWNCd4dxBQvqH2
Generated by Claude Code