
Research
2025 Report: Destructive Malware in Open Source Packages
Destructive malware is rising across open source registries, using delays and kill switches to wipe code, break builds, and disrupt CI/CD.
This is a lib that allows you to sync a directory to you github gist.
This makes and updates one file gists. Add a file to your synced directory and it makes a gist. Edit a file in that directory and it updates that gist.
npm install gist-sync
import GistSync from 'gist-sync'
GistsSync.of('/Users/foo/example-path', {
applicationToken: 'foobarqux', // a personal access token from github
isWatching: true, // auto start watch
setCache: (name, content) => Promise.resolve(), // set cache
clearCache: () => Promise.resolve(), // set cache
getCache: (name) => Promise.resolve('my-cache') // set cache
})
or the alternative new syntax
new GistSync(dir, options)
You need to pass setCache, clearCache, and getCache to the options. This allows the program to have some persistence of data. You can use just about anything for storage. Event just memory :D. The functions allow for async operations. All you need to do is return a Promise. This is the case for all three methods. Eg.
...
getCache (key) {
return new Promise((resolve, reject) => {
db.lookup(key, (err, resp) => {
if (err) return reject(err)
resolve(resp)
})
})
}
...
pauseWatcher will stop the watcher from watching the directory for file changes. This will then stop syncing the files
gistSync.pauseWatcher()
resumeWatcher will resume the watcher to watch the directory for file changes. This will then start syncing the files.
If you dont pass
trueto isWatching you will not sync files till callingresumeWatcher
gistSync.resumeWatcher()
Just one run npm test before making a PR.
FAQs
a lib to help sync a directory to your gist
The npm package gist-sync receives a total of 0 weekly downloads. As such, gist-sync popularity was classified as not popular.
We found that gist-sync demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Research
Destructive malware is rising across open source registries, using delays and kill switches to wipe code, break builds, and disrupt CI/CD.

Security News
Socket CTO Ahmad Nassri shares practical AI coding techniques, tools, and team workflows, plus what still feels noisy and why shipping remains human-led.

Research
/Security News
A five-month operation turned 27 npm packages into durable hosting for browser-run lures that mimic document-sharing portals and Microsoft sign-in, targeting 25 organizations across manufacturing, industrial automation, plastics, and healthcare for credential theft.