π Description
To improve both security and stability, we need to manipulate how the host filesystem is projected into the container. Currently, the bind mount exposes everything, which causes two critical issues:
- Security Risk: Sensitive files (e.g.,
.env, .pem certificates, local configs) are readable by the LLM/Container.
- Context Pollution: The host and container share build directories (e.g.,
bin/, obj/, node_modules/). This causes file locking issues, OS-binary mismatches, and allows the container to overwrite the user's local build artifacts.
We need a configuration capability to "Mask" or "Split" specific paths.
π― The Two Modes
1. Security Masking (Hide)
- Goal: Prevent the container from reading a specific file or folder.
- Behavior: The path appears to exist but is empty (0 bytes) or points to
/dev/null.
- Use Case: Hiding
.env files, .git folders, or local credentials.
2. Workspace Isolation (Split)
- Goal: Provide the container with a "scratchpad" for specific directories that is separate from the host.
- Behavior: The container sees an empty directory at the path (masking the host's files) but can write new files to it. These writes stay in the container and do not affect the host.
- Use Case:
bin/, obj/, dist/, temp/.
β
Acceptance Criteria
βοΈ Implementation Notes
- This will likely utilize Docker's ability to mount volumes over specific sub-paths of a bind mount.
- Masking: Mount
/dev/null (or platform equivalent) over files.
- Isolation: Mount anonymous volumes over directories.
π Description
To improve both security and stability, we need to manipulate how the host filesystem is projected into the container. Currently, the bind mount exposes everything, which causes two critical issues:
.env,.pemcertificates, local configs) are readable by the LLM/Container.bin/,obj/,node_modules/). This causes file locking issues, OS-binary mismatches, and allows the container to overwrite the user's local build artifacts.We need a configuration capability to "Mask" or "Split" specific paths.
π― The Two Modes
1. Security Masking (Hide)
/dev/null..envfiles,.gitfolders, or local credentials.2. Workspace Isolation (Split)
bin/,obj/,dist/,temp/.β Acceptance Criteria
.copilotignoreorcopilot.json) with support for specifying the mode (Mask vs. Split)..env) appears empty or non-existent inside the container.bin/) starts empty inside the container, regardless of files present on the host.βοΈ Implementation Notes
/dev/null(or platform equivalent) over files.