This directory contains security-hardened devcontainer configurations for the GitHub Docs project. These configurations follow security best practices to minimize potential attack vectors while maintaining development functionality.
- Security Level: Moderate
- Use Case: Standard development with basic security hardening
- Key Security Features:
- Removed SSH daemon access
- Pinned GitHub CLI version
- Disabled automatic git fetching
- Removed external repository permissions
- Disabled automatic server startup
- Commented out automatic port visibility
- Security Level: High
- Use Case: Security-focused development with minimal features
- Key Security Features:
- Minimal extension set
- No automatic command execution
- Manual dependency installation required
- Reduced resource allocation
- Explicit security-focused naming
- Security Level: High
- Use Case: Team-specific secure configuration
- Key Security Features:
- Team-specific extension subset
- Manual setup required
- Reduced resource requirements
- Security Level: Maximum
- Use Case: Ultra-secure development environment
- Key Security Features:
- Minimal extension set (only essential linting)
- No automatic commands whatsoever
- Workspace trust required
- Git sync confirmation required
- Minimal resource allocation
- SSH Daemon: Removed
"sshd": "latest"feature that provided remote access - External Repository Access: Removed automatic permissions for
github/docs-early-access - Automatic Command Execution: Minimized or removed automatic lifecycle commands
- Unpinned Versions: Changed
"latest"to specific pinned versions - Auto-fetching: Disabled automatic git fetch operations
- Version Pinning: All features use specific versions instead of "latest"
- Minimal Extensions: Reduced extension sets to only essential tools
- Manual Operations: Require manual approval for sensitive operations
- Resource Limits: Reduced resource allocation where appropriate
- Non-root User: Maintained non-root user execution
When creating a codespace, you can choose from the available configurations:
- Default project configuration (moderately hardened)
- Team A codespace config (highly secure)
- Team B codespace config (maximum security)
For security-hardened configurations:
- Install dependencies:
npm ci - Start the development server:
npm start - Configure port visibility manually if needed:
gh cs ports visibility 4000:public
- Review Configuration: Always review devcontainer configurations before use
- Minimal Permissions: Only grant necessary permissions and features
- Manual Operations: Prefer manual over automatic operations for sensitive tasks
- Version Pinning: Use specific versions instead of "latest" tags
- Regular Updates: Keep pinned versions updated but test changes thoroughly
- Switch to
devcontainer.hardened.jsonor team-specific configuration - Install dependencies manually:
npm ci - Start development server manually:
npm start - Configure port visibility if needed:
gh cs ports visibility 4000:public
To create a custom secure configuration:
- Copy an existing team configuration
- Customize extensions and settings for your team's needs
- Follow the minimal permissions principle
- Test the configuration thoroughly
- These configurations prioritize security over convenience
- Some automatic features have been disabled and require manual intervention
- External repository access must be granted explicitly when needed
- Review and approve all configuration changes through your security review process