Skip to content

Instantly share code, notes, and snippets.

@cielavenir
Last active April 16, 2025 18:27
Show Gist options
  • Save cielavenir/02f322e322a2a3555dbf2b38f2fedd59 to your computer and use it in GitHub Desktop.
Save cielavenir/02f322e322a2a3555dbf2b38f2fedd59 to your computer and use it in GitHub Desktop.
zoom sandbox-exec for macOS
  1. Download Zoom.pkg from https://zoom.us/download
  2. Extract it using https://www.timdoug.com/unpkg/
  3. Now you have Zoom/zoom.us.app
  4. Launch Zoom by zoom.sh Zoom/zoom.us.app/Contents/MacOS/zoom.us

caveats:

  • Zoom will fail to start meeting for the first time. Just launch again.
  • Zoom will tell that crash happened, but you should ignore it.
#!/bin/sh
# Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted.
# DISCLAIMER: THE WORKS ARE WITHOUT WARRANTY.
sandbox-exec -p "
(version 1)
(allow default)
(deny file-write*)
(allow file-write*
(subpath \"${HOME}/Library/Application Support/zoom.us\")
(subpath \"${HOME}/Library/Logs/zoom.us\")
(subpath \"${HOME}/Library/WebKit/us.zoom.xos\")
(subpath \"${HOME}/Library/Caches/us.zoom.xos\")
(subpath \"${HOME}/Library/Saved Application State/us.zoom.xos.savedState\")
(subpath \"/private/var/tmp\")
(subpath \"/private/tmp\")
(subpath \"/tmp\")
(subpath \"/private/var/folders\")
(subpath \"/var/folders\")
)
(deny file* (regex #\"/id_rsa$\"))
(deny file* (regex #\"/id_dsa$\"))
(deny file* (regex #\"/id_ecdsa$\"))
(deny file* (regex #\"/id_ed25519$\"))
(deny file* (regex #\"\\.pem$\"))
" "$@"
@aniqueta
Copy link

aniqueta commented Jun 9, 2024

Thanks @msanders for the excellent script, and @cielavenir for the original.

To make this more like a macOS app, one can use Automator per these instructions:

Open Automator, choose Application, add a Run Shell Script action and put in your Shell command between quotes (if you have a file, you can just drag and drop it).

Other than playing it, now you can save it (as an app anywhere) and even set the icon.

Source: https://superuser.com/a/612072

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment