macOS quarantine utilities for Node.js and Electron.
const quarantine = require("gatemaker")
const filePath = "~/Downloads/example.xyz"
const agentName = "Example App"
await quarantine(filePath, agentName)
// or…
quarantine.sync(filePath, agentName)
Load gatemaker/electron-setup
in your main process to quarantine all downloads automatically.
require("gatemaker/electron-setup")
const { app } = require("electron")
// …
- Homebrew/brew#4656
- Homebrew/homebrew-cask#22388
- https://github.com/reitermarkus/quarantine
- https://github.com/signalapp/Signal-Desktop/commit/1bf9ca7233b7df26afeae9ad921835fcff69b3fe
- https://stackoverflow.com/questions/21591485/using-xattr-to-set-the-mac-osx-quarantine-property
- https://developer.apple.com/documentation/coreservices/klsquarantinetypewebdownload
- https://ilostmynotes.blogspot.com/2012/06/gatekeeper-xprotect-and-quarantine.html
- https://eclecticlight.co/2017/12/11/xattr-com-apple-quarantine-the-quarantine-flag
- https://source.chromium.org/search?q=quarantine
- https://hackerone.com/reports/430463
- https://hackerone.com/reports/470637