Skip to content

Conversation

@JonZeolla
Copy link
Member

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:

  • If you are adding a dependency, please explain how it was chosen.
  • If manual testing is needed in order to validate the changes, provide a testing plan and the expected results.
  • Validate that documentation is accurate and aligned to any project updates or additions.

Copy link

@ai-coding-guardrails ai-coding-guardrails bot left a 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"

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.

Suggested change
"remoteUser": "root"
"remoteUser": "vscode"

Comment on lines +26 to +31
network_mode: host
# Add capabilities needed for debugging
cap_add:
- SYS_PTRACE
security_opt:
- seccomp:unconfined

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:

  1. Bypassing Docker's network isolation
  2. Allowing process tracing of host processes
  3. 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.

Comment on lines +222 to +223
--cap-add SYS_PTRACE \
--security-opt seccomp=unconfined \

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants