Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/javan/gatemaker
macOS quarantine utilities for Node.js and Electron
https://github.com/javan/gatemaker
electron macos nodejs quarantine xattr
Last synced: 2 months ago
JSON representation
macOS quarantine utilities for Node.js and Electron
- Host: GitHub
- URL: https://github.com/javan/gatemaker
- Owner: javan
- License: mit
- Created: 2020-11-06T14:29:14.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2023-09-27T21:44:59.000Z (about 1 year ago)
- Last Synced: 2024-09-17T13:56:39.305Z (3 months ago)
- Topics: electron, macos, nodejs, quarantine, xattr
- Language: JavaScript
- Homepage: https://npm.im/gatemaker
- Size: 41 KB
- Stars: 8
- Watchers: 3
- Forks: 2
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Gatemaker
macOS [quarantine](https://developer.apple.com/library/archive/releasenotes/Carbon/RN-LaunchServices/index.html#//apple_ref/doc/uid/TP40001369-CH1-DontLinkElementID_2) utilities for Node.js and Electron.
## Usage
```js
const quarantine = require("gatemaker")const filePath = "~/Downloads/example.xyz"
const agentName = "Example App"await quarantine(filePath, agentName)
// or…
quarantine.sync(filePath, agentName)
```### Electron Support
Load `gatemaker/electron-setup` in your main process to quarantine all [downloads](https://www.electronjs.org/docs/api/download-item) automatically.
```js
require("gatemaker/electron-setup")
const { app } = require("electron")
// …
```## References
- https://github.com/Homebrew/brew/pull/4656
- https://github.com/Homebrew/homebrew-cask/issues/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