|
3 | 3 | // This is the HARDENED version of TRG's DevContainer - provides enhanced security |
4 | 4 | // with capability dropping, security options, and resource limits while maintaining |
5 | 5 | // network connectivity for development. |
6 | | - "name": "Isolated TRG's DevContainer", |
| 6 | + "name": "Hardened TRG's DevContainer", |
7 | 7 |
|
8 | 8 | // Build configuration - uses the local Dockerfile in this directory |
9 | 9 | "build": { |
|
23 | 23 | // Container environment variables |
24 | 24 | "containerEnv": { |
25 | 25 | "SHELL": "/bin/zsh", // Use zsh as the default shell |
26 | | - "DEVCONTAINER_ID_LABEL": "isolated-web3-devcontainer" // Label for container identification |
| 26 | + "DEVCONTAINER_ID_LABEL": "hardened-web3-devcontainer" // Label for container identification |
27 | 27 | }, |
28 | 28 |
|
29 | 29 | // Configure tool-specific properties for VS Code |
|
65 | 65 | "postStartCommand": "echo '🚀 Dev container is ready for Web3 development!'", |
66 | 66 |
|
67 | 67 |
|
68 | | - // Mount isolation configuration for security and development workflow |
| 68 | + // Mount hardening configuration for security and development workflow |
69 | 69 | // If you need to extract something from within the container, you can use docker cp, but use it at your own risk. |
70 | 70 | // If you want to develop your devcontainer, you should comment this things, otherwise your changes inside the live container won't persist. |
71 | | - // Disables mounting the host workspace into the container for isolation. |
| 71 | + // Disables mounting the host workspace into the container for hardening. |
72 | 72 | "workspaceMount": "type=tmpfs,destination=/workspace,tmpfs-mode=1777", |
73 | | - // Sets a workspace path entirely isolated within the container |
74 | 73 | "workspaceFolder": "/workspace", |
75 | 74 |
|
76 | 75 | // Docker run arguments for security hardening and resource management |
77 | 76 | "runArgs": [ |
78 | 77 |
|
79 | 78 | // Temporary filesystem mounts with security restrictions |
80 | | - // These provide isolated, size-limited temporary storage |
| 79 | + // These provide hardened, size-limited temporary storage |
81 | 80 | "--tmpfs=/tmp:rw,noexec,nosuid,size=512m", // Main temporary directory |
82 | 81 | "--tmpfs=/var/tmp:rw,noexec,nosuid,size=512m", // System temporary directory |
83 | 82 | "--tmpfs=/dev/shm:rw,noexec,nosuid,size=64m", // Shared memory directory |
|
86 | 85 | // This reduces the attack surface by removing unnecessary privileges |
87 | 86 | "--cap-drop=ALL", |
88 | 87 |
|
89 | | - // Security options for container isolation |
| 88 | + // Security options for container hardening |
90 | 89 | // A few security additions (AppArmor & no new privileges) |
91 | 90 | "--security-opt", "no-new-privileges", // Prevent privilege escalation |
92 | 91 | "--security-opt", "apparmor:docker-default", // Use Docker's default AppArmor profile |
|
0 commit comments