Skip to content

fix(guest): safely write gateway private state - #891

Merged
kvinwang merged 1 commit into
masterfrom
codex/fix-guest-gateway-private-state
Aug 5, 2026
Merged

fix(guest): safely write gateway private state#891
kvinwang merged 1 commit into
masterfrom
codex/fix-guest-gateway-private-state

Conversation

@kvinwang

@kvinwang kvinwang commented Jul 31, 2026

Copy link
Copy Markdown
Collaborator

Summary

Protect gateway private state with the repository's existing safe-write dependency.

Changes

  • Write the gateway cache with safe_write_with_mode(..., 0o600).
  • Write the WireGuard configuration with the same atomic, owner-only operation.
  • Remove the local private-write helper and the separate post-write chmod.
  • Preserve atomic replacement while ensuring sensitive content is never created with broader permissions.

Verification

  • cargo check --manifest-path dstack/Cargo.toml -p dstack-util
  • cargo fmt --manifest-path dstack/Cargo.toml --all
  • git diff --check

Copilot AI review requested due to automatic review settings July 31, 2026 03:01

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.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@kvinwang
kvinwang force-pushed the codex/fix-guest-gateway-private-state branch from 8715ee1 to 73a7ff8 Compare August 4, 2026 08:49
@kvinwang kvinwang changed the title fix(guest): protect gateway private state fix(guest): safely write gateway private state Aug 4, 2026
@kvinwang
kvinwang merged commit 8395919 into master Aug 5, 2026
15 checks passed
@kvinwang
kvinwang deleted the codex/fix-guest-gateway-private-state branch August 7, 2026 13:46
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