Skip to content

Run applications as non-root user in "bolt run"#18

Merged
astolcenburg merged 1 commit intordkcentral:mainfrom
astolcenburg:main
Dec 11, 2025
Merged

Run applications as non-root user in "bolt run"#18
astolcenburg merged 1 commit intordkcentral:mainfrom
astolcenburg:main

Conversation

@astolcenburg
Copy link
Contributor

Use the --develop option to restore the previous behavior.

Ref: #RDKEAPPRT-485

Copilot AI review requested due to automatic review settings December 11, 2025 12:10
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR changes the default behavior of "bolt run" to execute applications as a non-root user (UID/GID 34567) instead of root (UID/GID 0), with the --develop option available to restore previous root-based behavior for debugging purposes.

Key Changes:

  • Introduced non-root default user credentials (UID/GID 34567) for improved security
  • Modified runtime configuration template generation to support dynamic user namespace mappings based on options
  • Enhanced device node permission handling to ensure non-root users can access required devices

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 7 comments.

File Description
bolt/src/config.cjs Adds DEFAULT_UID and DEFAULT_GID constants (34567) for non-root user execution
bolt/src/runtime-config.cjs Updates template to use configurable UID/GID, removes hardcoded mappings, adds dynamic user namespace configuration, enhances device permission checking
bolt/src/run.cjs Passes options through function chain, adds runOptions handlers for CLI options (develop, uid, gid, userns, clear-storage), sets permissive directory permissions for overlay filesystem
bolt/src/bolt.cjs Integrates runOptions with run command, adds --develop flag documentation

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Use the --develop option to restore the previous behavior.

Ref: #RDKEAPPRT-485
@astolcenburg astolcenburg merged commit 906ffe7 into rdkcentral:main Dec 11, 2025
3 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Dec 11, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants