Skip to content

fix(security): comprehensive security audit hardening (13 fixes) - #42

Merged
labtgbot merged 1 commit into
mainfrom
fix/issue-28-extension-enforcement
Jun 15, 2026
Merged

fix(security): comprehensive security audit hardening (13 fixes)#42
labtgbot merged 1 commit into
mainfrom
fix/issue-28-extension-enforcement

Conversation

@xdevrobot

@xdevrobot xdevrobot commented Jun 15, 2026

Copy link
Copy Markdown
Collaborator

Summary

Security audit hardening: 13 fixes across workspace, wallet, secrets, exec, media, WebUI.

Critical: TOCTOU fix, mandatory wallet encryption, secrets encryption, exec sanitization.
High: media hardening, perms, symlink safety.
Medium: SVG CSP, read whitelist, URL normalization.

All 2928 tests pass. Lint clean.

Critical fixes:
- C-4: Fix TOCTOU race in workspace validator (single atomic lstatSync)
- C-1: Make wallet encryption mandatory (reject plaintext mnemonic save)
- C-2: Encrypt plugin secrets at rest with AES-256-GCM
- C-3: Fix exec tool allowlist bypass via shell metacharacter injection

High fixes:
- H-1/H-2/H-3/M-4: Harden media download (sanitize filenames, 50MB limit, 0o600 perms)
- H-4: Add symlink re-checks in WebUI routes before write/delete/rename
- H-6/H-7/H-8/H-9: Harden file/directory permissions (0o700 dirs, 0o600 files, COPYFILE_EXCL, skip symlinks)
- H-10: Fix sandbox directory permissions (0o755 -> 0o700)

Medium fixes:
- M-1: Re-normalize path after recursive URL decode
- M-2: Strengthen SVG CSP header
- M-3: Restrict /read endpoint to safe file extensions
- M-5: Document exec env whitelist priority

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@labtgbot
labtgbot merged commit 4a09518 into main Jun 15, 2026
17 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