
Product
Socket Now Protects the Chrome Extension Ecosystem
Socket is launching experimental protection for Chrome extensions, scanning for malware and risky permissions to prevent silent supply chain attacks.
There are three ways you can run the monitor.
This form watches one path, and enters the run loop automatically. The first parameter is the path to watch, and the second parameter is an optional glob pattern or array of glob patterns that a file must match in order to trigger a callback. The default glob, if ommitted, is '**/*'
.
FSSM.monitor('/some/directory/', '**/*') do
update {|base, relative|}
delete {|base, relative|}
create {|base, relative|}
end
This form watches one or more paths, and enters the run loop automatically. The glob configuration call can be ommitted, and defaults to '**/*'
.
FSSM.monitor do
path '/some/directory/' do
glob '**/*.yml'
update {|base, relative|}
delete {|base, relative|}
create {|base, relative|}
end
path '/some/other/directory/' do
update {|base, relative|}
delete {|base, relative|}
create {|base, relative|}
end
end
This form doesn't enter the run loop automatically.
monitor = FSSM::Monitor.new
monitor.path '/some/directory/' do
update {|base, relative|}
delete {|base, relative|}
create {|base, relative|}
end
monitor.run
By default, FSSM monitors changes in files only. To enable monitoring of files and directories, pass option directories => true
in a hash to the monitor. Please note that this may not work as expected in all backends. For example:
FSSM::Monitor.new(:directories => true)
FSSM.monitor(dir, file_glob, :directories => true)
When directories are monitored, there's an additional third argument to the callbacks. Instead of
FSSM.monitor('/some/directory/', '**/*') do
update {|base, relative|}
delete {|base, relative|}
create {|base, relative|}
end
you get this:
FSSM.monitor('/some/directory/', '**/*', :directories => true) do
update {|base, relative, type|}
delete {|base, relative, type|}
create {|base, relative, type|}
end
The value of type
argument is either :file
or :directory
.
FAQs
Unknown package
We found that fssm demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 5 open source maintainers 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.
Product
Socket is launching experimental protection for Chrome extensions, scanning for malware and risky permissions to prevent silent supply chain attacks.
Product
Add secure dependency scanning to Claude Desktop with Socket MCP, a one-click extension that keeps your coding conversations safe from malicious packages.
Product
Socket now supports Scala and Kotlin, bringing AI-powered threat detection to JVM projects with easy manifest generation and fast, accurate scans.