Skip to content

fix(s6): fix world-writable temp dir — proper tests#217

Merged
elazarcoh merged 4 commits intomainfrom
fix/s6-world-writable-dir
Mar 11, 2026
Merged

fix(s6): fix world-writable temp dir — proper tests#217
elazarcoh merged 4 commits intomainfrom
fix/s6-world-writable-dir

Conversation

@elazarcoh
Copy link
Owner

Rebased on ci/vitest-framework. Replaced hand-rolled JS test with vitest dir-permissions.test.ts that performs real OS permission checks. Verifies 0o700 mode.

@elazarcoh elazarcoh force-pushed the fix/s6-world-writable-dir branch from aa86c61 to ee5a327 Compare March 7, 2026 21:14
An error occurred while trying to automatically change base from ci/vitest-framework to main March 7, 2026 21:32
@elazarcoh elazarcoh force-pushed the fix/s6-world-writable-dir branch from ee5a327 to 35a801a Compare March 7, 2026 22:47
@elazarcoh elazarcoh changed the base branch from ci/vitest-framework to main March 7, 2026 22:51
@elazarcoh elazarcoh force-pushed the fix/s6-world-writable-dir branch from 35a801a to 0623d20 Compare March 7, 2026 22:52
@github-actions
Copy link

github-actions bot commented Mar 7, 2026

✅ CI Results

🧪 Tests

Suite ✅ Passed ❌ Failed ⏭️ Skipped 📊 Total
E2E (UI) 16 0 2 18
Python Unit 110 0 0 110
TS Unit 100 0 0 100

📦 Artifacts

screenshots-ubuntu-latest  ·  test-results  ·  extension-vsix  ·  ts-unit-test-results  ·  python-unit-test-results

→ Full run details

@elazarcoh elazarcoh force-pushed the fix/s6-world-writable-dir branch from 0623d20 to 717838f Compare March 8, 2026 19:10
elazarcoh and others added 3 commits March 11, 2026 00:01
The temp directory for saved images was created with 0o777 (world-writable),
allowing any user on the system to read, modify, or delete debug images.

Changed to 0o700 (owner-only rwx) which is sufficient since only the
current user's VS Code instance needs access.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…r; real OS permission check

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@elazarcoh elazarcoh force-pushed the fix/s6-world-writable-dir branch from 78d2042 to 0ff135e Compare March 10, 2026 22:01
… fallback

- Add getUserSpecificTempDir() to use XDG_RUNTIME_DIR on Linux (kernel-isolated per-user)
- Fallback to /tmp/svifpd-<uid>/images on other systems
- Each user gets isolated directory with 0o700 permissions (owner-only)
- Fixes multi-user safety issue where User A's 0o700 dir blocked User B access
- Add comprehensive dir-permissions tests verifying isolation and safe permissions

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@elazarcoh elazarcoh merged commit 19ee35b into main Mar 11, 2026
10 checks passed
@elazarcoh elazarcoh deleted the fix/s6-world-writable-dir branch March 11, 2026 06:13
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.

1 participant