Security Enhancements and Best Practices Improvements#1
Draft
dmisiuk wants to merge 1 commit into
Draft
Conversation
- Added comprehensive security logging and audit capabilities - Implemented container resource limits and capability management - Enhanced environment variable validation and file permissions - Added Docker socket security monitoring - Implemented read-only filesystem with tmpfs mounts - Added security command for detailed security information - Created comprehensive SECURITY.md documentation - Improved error handling with set -euo pipefail - Enhanced container cleanup procedures - Added security recommendations and monitoring guidance Co-authored-by: openhands <openhands@all-hands.dev>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Security Enhancements and Best Practices Improvements
This PR implements comprehensive security improvements to the OpenHands Apple Silicon setup, addressing multiple security concerns and following Docker security best practices.
🔒 Security Improvements
Container Security
/tmpand/runno-new-privilegessecurity option to prevent privilege escalationDocker Security
docker container prunewith targeted cleanupEnvironment Security
🛠️ Technical Improvements
Enhanced Script Features
./openhands-gui.sh securityfor detailed security informationset -euo pipefailfor strict error handlingConfiguration Options
OPENHANDS_CONTAINER_NAME: Custom container nameOPENHANDS_MEMORY_LIMIT: Memory limit (default: 4g)OPENHANDS_CPU_LIMIT: CPU limit (default: 2.0)LOG_ALL_EVENTS: Verbose logging control📋 New Files
🔍 Security Monitoring
The enhanced script now provides:
🚀 Breaking Changes
None - all changes are backward compatible and enhance security without affecting functionality.
🧪 Testing
All improvements have been tested for:
📚 Documentation
Added comprehensive security documentation including:
This PR significantly improves the security posture of the OpenHands Apple Silicon setup while maintaining full functionality and ease of use.