fix: security hardening (path traversal, file permissions, shell quoting)#97
Merged
fix: security hardening (path traversal, file permissions, shell quoting)#97
Conversation
Replace basic character denylist in filename() with allowlist-based sanitizeSlug(). Only alphanumeric characters, hyphens, and underscores are kept. Falls back to "meeting" if no allowed characters remain. Inspired by security audit from @danowallegro.
Audio recordings may contain sensitive meeting content. Set POSIX permissions to 0600 on all audio output files: AudioMixer.saveWAV(), AudioCaptureSession temp file, and MicCaptureHandler WAV output. Inspired by security audit from @danowallegro.
Use Bash array for AUTH args to prevent word splitting on credential values containing spaces or special characters. Inspired by security audit from @danowallegro.
dd8a8a6 to
4b6ddf2
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Applies 3 security fixes originally identified by @danowallegro in their fork's security audit, adapted to the current codebase:
ProtocolGenerator.filename()with a propersanitizeSlug()allowlist (alphanumeric, hyphens, underscores only). Titles like../../etc/passwdare now safely sanitized. Includes 4 new tests.0600(owner-only) permissions, since they may contain sensitive meeting content. Applied toAudioMixer.saveWAV(),AudioCaptureSession, andMicCaptureHandler.$AUTHvariable expansion innotarize_status.sh— credentials are now properly double-quoted inline to prevent word splitting.Test plan
0600permissions during a recordingnotarize_status.shworks with credentials containing spaces