-
Notifications
You must be signed in to change notification settings - Fork 0
feat(devcontainers): add initial dev containers configs #61
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've got 3 comments for you to consider
Reviewed with 🤟 by Zenable
| "DEV_MODE": "true", | ||
| "PYTHONPATH": "/workspace/src" | ||
| }, | ||
| "remoteUser": "root" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Running as root user in development containers poses security risks. Consider creating and using a non-privileged user instead.
| "remoteUser": "root" | |
| "remoteUser": "vscode" |
| network_mode: host | ||
| # Add capabilities needed for debugging | ||
| cap_add: | ||
| - SYS_PTRACE | ||
| security_opt: | ||
| - seccomp:unconfined |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Critical Security Risk: The combination of network_mode: host, SYS_PTRACE capability, and seccomp:unconfined creates significant security vulnerabilities by:
- Bypassing Docker's network isolation
- Allowing process tracing of host processes
- Disabling syscall filtering
For development containers, consider using port mapping instead of host networking and removing these privileged settings unless absolutely necessary for specific debugging scenarios.
| --cap-add SYS_PTRACE \ | ||
| --security-opt seccomp=unconfined \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The combination of --cap-add SYS_PTRACE and --security-opt seccomp=unconfined significantly reduces container security by disabling security restrictions and allowing process tracing capabilities. Consider using more specific capabilities or security profiles if debugging features are needed, or document why these broad permissions are required for development.
Contributor Comments
This adds initial dev containers support, based on a talk from DevOps Days DC 2025 🚀
Pull Request Checklist
Thank you for submitting a contribution!
Please address the following items: