Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
broccoli-dep-filter
Advanced tools
var filter = require("broccoli-dep-filter");
var tree = filter(config);
Input trees options:
trees
: array or object, one or more indexed or named trees,iterated
: iterated trees, indexes or names from the trees
option (optional, defaults to all indexes or keys from trees
)Filtering options:
extensions
: list of extensions of input files (optional)target
: extension of produced output files (optional, only applies to extensions
)filter
: extra filtering, either a function or a regular expression (optional)Various options:
dest_dir
: move output files to a subdirectory of the output treeread
: by default process
receives file contents, set read
to false if you want just the file pathbinary
: read and save file as binary buffer instead of a UTF-8 stringname
: label the tree (used for reporting performance metrics by broccoli)Processing options:
process(src : String) : String
init(trees : Array || Object) : process
You pass only one of init
or process
.
The process
function is invoked for every input file, as argument it
gets file contents (if read: false
) as a string or a buffer (when
binary: true
). process
can return file's content either directly
or as a promise (it has to be the same type as input: buffer or
string).
The init
function is invoked once all input trees are resolved. As
an argument it gets an array or object (depending on the type of the
trees
option) mapping the tree names or indexes to trees' root
directories. init
has to return a process
function.
Example:
var filter = require("broccoli-dep-filter");
function setup (input_tree, less_config) {
return filter({
trees: [input_tree],
extensions: ["less"],
target: "css",
process: compile_less
});
function compile_less (src) {
//…
}
}
Planned to work as a drop-in replacement for broccoli-filter.
Files that are read during a build of a target (an output file) are observed (with the fs-history fs-history module) and remembered. Before the rebuild all dependencies are checked if they have changed.
MIT licence, see COPYING.
FAQs
Broccoli filtered processing with dependency tracking
The npm package broccoli-dep-filter receives a total of 1 weekly downloads. As such, broccoli-dep-filter popularity was classified as not popular.
We found that broccoli-dep-filter 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
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.