Skip to content

Fix sshd runtime directory permissions#30

Merged
PabloZaiden merged 1 commit into
mainfrom
fix-sshd-runtime-dir-permissions
Jun 30, 2026
Merged

Fix sshd runtime directory permissions#30
PabloZaiden merged 1 commit into
mainfrom
fix-sshd-runtime-dir-permissions

Conversation

@PabloZaiden

Copy link
Copy Markdown
Owner

Summary

  • normalize /var/run/sshd ownership and mode after creation in the bundled runner
  • add a regression test so permissive container umasks do not break sshd startup

Testing

  • bun test tests/runtime.test.ts --test-name-pattern 'bundled runner script|buildStartRunnerScript'
  • rebuilt the CLI and recreated the affected TypeScript-template devbox successfully

Ensure the bundled runner normalizes /var/run/sshd ownership and mode after creation so sshd can start even when the container umask is permissive.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings June 30, 2026 13:59

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 hardens the bundled SSH runner’s startup by ensuring /var/run/sshd is created with safe ownership and permissions even when the container’s umask would otherwise produce permissive modes that can prevent sshd from starting.

Changes:

  • Normalize /var/run/sshd to root:root with mode 0755 in src/runner/ssh-server.sh.
  • Add a regression test that asserts the bundled runner script includes the directory creation + normalization steps.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
tests/runtime.test.ts Adds a regression test asserting the bundled runner script enforces correct /var/run/sshd ownership and mode.
src/runner/ssh-server.sh Applies chown root:root and chmod 0755 after creating /var/run/sshd to prevent umask-dependent failures.

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

@PabloZaiden
PabloZaiden enabled auto-merge (squash) June 30, 2026 14:04
@PabloZaiden
PabloZaiden merged commit 7500a13 into main Jun 30, 2026
2 checks passed
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