Skip to content

fix(docker): hide credentials at direct home mount in chroot mode#700

Merged
Mossaka merged 8 commits intomainfrom
claude/diagnose-firewall-vulnerability-again
Feb 12, 2026
Merged

fix(docker): hide credentials at direct home mount in chroot mode#700
Mossaka merged 8 commits intomainfrom
claude/diagnose-firewall-vulnerability-again

Conversation

@Claude
Copy link
Contributor

@Claude Claude AI commented Feb 11, 2026

Summary

Fixes a credential-exfiltration bypass in chroot mode where the home directory is mounted at two locations ($HOME and /host$HOME), but credential-hiding /dev/null overlays were only applied to /host$HOME paths.

  • Root cause: The else if (!config.enableChroot) condition in generateDockerCompose() skipped the effectiveHome-path credential hiding when chroot was enabled, leaving the direct $HOME mount unprotected
  • Fix: Changed to else so credential hiding applies in both normal and chroot modes, covering both mount paths
  • Tests: Added two integration tests (Tests 8-9) verifying credentials are hidden at the direct home path in chroot mode
  • Docs: Updated selective-mounting docs to document dual-mount protection

Test plan

  • pr-title CI check passes with new semantic title
  • Existing integration tests still pass (Tests 1-7, 10-14)
  • New Tests 8-9 pass: chroot mode hides credentials at direct $HOME path
  • npm run build succeeds
  • npm run lint passes

🤖 Generated with Claude Code

Claude AI and others added 3 commits February 11, 2026 15:33
Co-authored-by: lpcox <15877973+lpcox@users.noreply.github.com>
Co-authored-by: lpcox <15877973+lpcox@users.noreply.github.com>
Co-authored-by: lpcox <15877973+lpcox@users.noreply.github.com>
@Claude Claude AI changed the title [WIP] Analyze firewall's selective mounting vulnerability and propose fix fix(security): hide credentials at both mount paths in chroot mode Feb 11, 2026
@Claude Claude AI requested a review from lpcox February 11, 2026 15:39
@Mossaka Mossaka marked this pull request as ready for review February 12, 2026 04:33
Copilot AI review requested due to automatic review settings February 12, 2026 04:33
@github-actions
Copy link
Contributor

github-actions bot commented Feb 12, 2026

Chroot tests passed! Smoke Chroot - All security and functionality tests succeeded.

@github-actions
Copy link
Contributor

github-actions bot commented Feb 12, 2026

📰 VERDICT: Smoke Copilot has concluded. All systems operational. This is a developing story. 🎤

@github-actions
Copy link
Contributor

github-actions bot commented Feb 12, 2026

🎬 THE ENDSmoke Claude MISSION: ACCOMPLISHED! The hero saves the day! ✨

@github-actions
Copy link
Contributor

⚠️ Coverage Regression Detected

This PR decreases test coverage. Please add tests to maintain coverage levels.

Overall Coverage

Metric Base PR Delta
Lines 82.34% 82.33% 📉 -0.01%
Statements 82.38% 82.38% ➡️ +0.00%
Functions 82.14% 82.14% ➡️ +0.00%
Branches 74.70% 74.64% 📉 -0.06%
📁 Per-file Coverage Changes (1 files)
File Lines (Before → After) Statements (Before → After)
src/docker-manager.ts 83.9% → 83.8% (-0.04%) 83.3% → 83.3% (-0.04%)

Coverage comparison generated by scripts/ci/compare-coverage.ts

@github-actions github-actions bot mentioned this pull request Feb 12, 2026
@github-actions
Copy link
Contributor

Smoke Test Results

Last 2 Merged PRs:

Test Results:

  • ✅ GitHub MCP: Retrieved PR data
  • ✅ Playwright: Page title contains "GitHub"
  • ✅ File Writing: Created test file
  • ✅ Bash Tool: Verified file content

Status: PASS

AI generated by Smoke Claude

@github-actions
Copy link
Contributor

Go Build Test Results

Project Download Tests Status
color 1/1 PASS
env 1/1 PASS
uuid 1/1 PASS

Overall: PASS

All Go projects built and tested successfully.

AI generated by Build Test Go

@github-actions
Copy link
Contributor

Bun Build Test Results

Project Install Tests Status
elysia 1/1 PASS
hono 1/1 PASS

Overall: PASS

All Bun projects built and tested successfully.

AI generated by Build Test Bun

@github-actions
Copy link
Contributor

Smoke Test Results

Last 2 merged PRs:

✅ GitHub MCP - PASS
✅ Playwright - PASS (title: "GitHub · Change is constant...")
✅ File Creation - PASS
✅ Bash Tools - PASS

Overall: PASS 🎉

AI generated by Smoke Copilot

@github-actions
Copy link
Contributor

Node.js Build Test Results ✅

All Node.js projects built and tested successfully!

Project Install Tests Status
clsx PASS ✅ PASS
execa PASS ✅ PASS
p-limit PASS ✅ PASS

Overall: ✅ PASS

All dependencies installed without vulnerabilities and all test suites passed.

AI generated by Build Test Node.js

@github-actions
Copy link
Contributor

.NET Build Test Results

Project Restore Build Run Status
hello-world PASS
json-parse PASS

Overall: PASS

All .NET projects successfully restored dependencies, built, and ran without errors.

AI generated by Build Test .NET

@github-actions
Copy link
Contributor

Deno Build Test Results

Project Tests Status
oak 1/1 ✅ PASS
std 1/1 ✅ PASS

Overall: ✅ PASS

All Deno tests completed successfully.

AI generated by Build Test Deno

@github-actions
Copy link
Contributor

.NET Build Test Results

Project Restore Build Run Status
hello-world PASS
json-parse PASS

Overall: PASS

All .NET projects successfully restored, built, and ran with expected output.

AI generated by Build Test .NET

@github-actions
Copy link
Contributor

Rust Build Test Results

Project Build Tests Status
fd 1/1 PASS
zoxide 1/1 PASS

Overall: PASS

All Rust projects built and tested successfully.

AI generated by Build Test Rust

@github-actions
Copy link
Contributor

Build Test: Java - Results

All Java projects compiled and tested successfully through AWF firewall with Maven proxy configuration.

Project Compile Tests Status
gson 1/1 PASS
caffeine 1/1 PASS

Overall: PASS

All Maven dependencies were successfully downloaded through the Squid proxy at 172.30.0.10:3128, and all tests passed.

AI generated by Build Test Java

@github-actions
Copy link
Contributor

🔍 Chroot Version Comparison Test Results

Runtime Host Version Chroot Version Match?
Python 3.12.12 3.12.3 ❌ NO
Node.js v24.13.0 v20.20.0 ❌ NO
Go go1.22.12 go1.22.12 ✅ YES

Overall Result:FAILED - Not all runtime versions match between host and chroot environment.

The chroot mode is intended to transparently access host binaries, but version mismatches indicate the container is using its own runtime installations instead of the host's.

AI generated by Smoke Chroot

@github-actions
Copy link
Contributor

PR titles:
fix: replace unanchored regex with string assertions in tests
fix: use secure temp directory in volume-mounts test
test: add comprehensive coverage for TOCTOU fix error paths
fix: eliminate TOCTOU race conditions in ssl-bump.ts
Tests: GitHub MCP ✅ | safeinputs-gh ✅ | Playwright ✅ | Tavily ❌ | file write ✅ | bash cat ✅ | build ✅ | discussion comment ✅
Overall: FAIL

AI generated by Smoke Codex

Chroot mode is now always enabled, so the enableChroot option was
removed from AwfOptions. Update Tests 8-9 to drop the obsolete flag.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@github-actions
Copy link
Contributor

github-actions bot commented Feb 12, 2026

Chroot tests passed! Smoke Chroot - All security and functionality tests succeeded.

@github-actions
Copy link
Contributor

github-actions bot commented Feb 12, 2026

🎬 THE ENDSmoke Claude MISSION: ACCOMPLISHED! The hero saves the day! ✨

@github-actions
Copy link
Contributor

github-actions bot commented Feb 12, 2026

📰 VERDICT: Smoke Copilot has concluded. All systems operational. This is a developing story. 🎤

@github-actions
Copy link
Contributor

github-actions bot commented Feb 12, 2026

✨ The prophecy is fulfilled... Smoke Codex has completed its mystical journey. The stars align. 🌟

@github-actions
Copy link
Contributor

Deno Build Test Results

Project Tests Status
oak 1/1 ✅ PASS
std 1/1 ✅ PASS

Overall: ✅ PASS

All Deno tests passed successfully.

AI generated by Build Test Deno

@github-actions
Copy link
Contributor

Smoke Test Results - Claude Engine

✅ GitHub MCP: #767, #765
✅ Playwright: github.com page title verified
✅ File Write: /tmp/gh-aw/agent/smoke-test-claude-21967863708.txt
✅ Bash: File read successful

Status: PASS

AI generated by Smoke Claude

@github-actions
Copy link
Contributor

Smoke Test Results

Last 2 Merged PRs:

Test Results:

  • ✅ GitHub MCP: Retrieved last 2 merged PRs
  • ✅ Playwright: Navigated to github.com (title: "GitHub · Change is constant. GitHub keeps you ahead. · GitHub")
  • ✅ File Write: Created /tmp/gh-aw/agent/smoke-test-copilot-21967863735.txt
  • ✅ Bash: Verified file content

Overall Status: PASS

cc @Mossaka

AI generated by Smoke Copilot

@github-actions
Copy link
Contributor

Build Test: Go - Results

Project Download Tests Status
color 1/1 PASS
env 1/1 PASS
uuid 1/1 PASS

Overall: PASS

All Go projects successfully downloaded dependencies and passed tests.

AI generated by Build Test Go

@github-actions
Copy link
Contributor

Rust Build Test Results

Project Build Tests Status
fd 1/1 PASS
zoxide 1/1 PASS

Overall: PASS

All Rust projects built and tested successfully.

AI generated by Build Test Rust

@github-actions
Copy link
Contributor

Bun Build Test Results

Project Install Tests Status
elysia 1/1 PASS
hono 1/1 PASS

Overall: PASS

All Bun projects installed and tested successfully.

AI generated by Build Test Bun

@github-actions
Copy link
Contributor

.NET Build Test Results

All .NET projects built and ran successfully!

Project Restore Build Run Status
hello-world PASS
json-parse PASS

Overall: PASS

Project Outputs

hello-world: Successfully printed "Hello, World!"

json-parse: Successfully parsed JSON and displayed structured data

AI generated by Build Test .NET

@github-actions
Copy link
Contributor

Build Test: Node.js - Results

Project Install Tests Status
clsx PASS PASS
execa PASS PASS
p-limit PASS PASS

Overall: PASS ✅

All Node.js projects successfully installed dependencies and passed their test suites.

AI generated by Build Test Node.js

@github-actions
Copy link
Contributor

Java Build Test Results ✅

All Java projects successfully compiled and tested through the firewall.

Project Compile Tests Status
gson 1/1 PASS
caffeine 1/1 PASS

Overall: PASS

Maven successfully downloaded dependencies and ran tests using the AWF proxy configuration at 172.30.0.10:3128.

AI generated by Build Test Java

@github-actions
Copy link
Contributor

Chroot Mode Runtime Version Comparison

Runtime Host Version Chroot Version Match?
Python 3.12.12 3.12.3 ❌ NO
Node.js v24.13.0 v20.20.0 ❌ NO
Go go1.22.12 go1.22.12 ✅ YES

Overall Result: ❌ Tests did not pass (1/3 runtimes matched)

The chroot mode is using different versions for Python and Node.js compared to the host system. Only Go versions match.

AI generated by Smoke Chroot

@github-actions
Copy link
Contributor

fix: replace unanchored regex with string assertions in tests
fix: use secure temp directory in volume-mounts test
Tests (1-4): ✅ GitHub MCP, ✅ safeinputs-gh, ✅ Playwright, ❌ Tavily
Tests (5-8): ✅ file write, ✅ bash cat, ✅ discussion comment, ✅ build
Overall: FAIL

AI generated by Smoke Codex

@Mossaka Mossaka merged commit 062b833 into main Feb 12, 2026
90 checks passed
@Mossaka Mossaka deleted the claude/diagnose-firewall-vulnerability-again branch February 12, 2026 23:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants