Add shared output volume and symlinks for cross-container data#75
Merged
Add shared output volume and symlinks for cross-container data#75
Conversation
Reports and evidence written inside the Claude Code container were not appearing on the host because of two issues: 1. Path mismatch: Skill templates reference "output/reports/" which resolves to /root/output/reports/ (WORKDIR is /root), but the bind mount target is /root/reports/. Added symlinks in the entrypoint so /root/output/reports -> /root/reports, /root/output/sessions -> /root/results, and /root/output/screenshots -> /tmp/screenshots. 2. No cross-container data sharing: Kali MCP writes recon artifacts to /root/output/ inside its container, which was inaccessible to Claude Code and the host. Added a shared-output Docker named volume mounted in both kali-mcp (/root/output) and claude-code (/root/kali-data:ro). https://claude.ai/code/session_01TmNSmHJNnGJoE6hBJRQnwM
- Makefile: add shared-output volume to nuke target for complete cleanup - Entrypoint: show output/reports/ (the path AI should use) instead of internal /root/reports/ paths; clarify kali-data is read-only incoming - README: update output paths table to use relative path convention, document shared-output volume and symlink behavior https://claude.ai/code/session_01TmNSmHJNnGJoE6hBJRQnwM
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.
Summary
This PR enables data sharing between the Kali MCP container and Claude Code container by introducing a shared Docker volume and creating symlinks to support multiple path conventions for accessing output files.
Key Changes
shared-output) todocker-compose.ymlfor cross-container data exchange/root/outputto write recon files and tool artifacts/root/kali-data(read-only) to access Kali outputs/root/output/reports→/root/reports(pentest reports)/root/output/sessions→/root/results(session JSONs)/root/output/screenshots→/tmp/screenshots(PoC evidence)Implementation Details
The symlink creation in the entrypoint script allows skill templates that reference
output/reports/,output/sessions/, etc. to resolve correctly within the container's/rootWORKDIR, while also supporting direct access to the bind-mounted directories. This provides flexibility for different code paths to access the same underlying data.The shared volume enables the Kali MCP container to persist reconnaissance data and tool artifacts that Claude Code can then access and utilize in subsequent operations.
https://claude.ai/code/session_01TmNSmHJNnGJoE6hBJRQnwM