
Research
Supply Chain Attack on Axios Pulls Malicious Dependency from npm
A supply chain attack on Axios introduced a malicious dependency, plain-crypto-js@4.2.1, published minutes earlier and absent from the project’s GitHub releases.
source-file is a project to automatically recompile sourcefiles used during development. It exposes each file as an eventemitter that tells you when the file itself is loaded for the first time or if it is changed.
npm install sourcefile
First, require sourcefile:
var Sourcefile = require('sourcefile');
Next, attach it to a sourcefile. First we show a jade-template:
// libs needed for the example
var fs = require('fs'),
jade = require('jade');
// vars used
var Template = new Sourcefile('./index.jade'),
template = '';
Template.on('loaded', function(path) {
fs.readFile(path, 'utf8', function(err, contents) {
template = jade.compile(contents, {filename: path});
});
});
Template.on('modified', function(path) {
fs.readFile(path, 'utf8', function(err, contents) {
template = jade.compile(contents, {filename: path});
});
});
// Template.on('error', function(error) {});
There are subclasses defined that will emit an compiled event. This will be called
after these subclasses have done their job.
var template = '';
// This will identifiy the file as a jade file and use the callback accordingly
jadeTemplate = new Sourcefile.Jade('./index.jade');
jadeTemplate.on('compiled', function(data) {
template = data;
});
Available are:
jade - Sourcefile.jade
compiled jade template function
stylus - Sourcefile.stylus
compiled stylus css as string
coffee-script - Sourcefile.coffee
compiled coffee-script javascript code as string
var template = '';
// This will identifiy the file as a jade file and use the callback accordingly
Sourcefile.source('./index.jade', function(data) {
template = data;
});
And for even more convenience or because its just stupid to sort everything again later
we can tell the source-function what to use
// This will identifiy the file as a jade file and use the callback accordingly
// Here we will write the private `style.styl` to the public `style.css`
Sourcefile.source('./private/style.styl', ['coffee', 'stylus'], function(data, path, name) {
fs.writeFile(name.replace('/private/', '/public/'), data, 'utf8');
});
FAQs
automatic sourcefile compiler for jade, stylus and coffeescript
We found that sourcefile 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
A supply chain attack on Axios introduced a malicious dependency, plain-crypto-js@4.2.1, published minutes earlier and absent from the project’s GitHub releases.

Research
Malicious versions of the Telnyx Python SDK on PyPI delivered credential-stealing malware via a multi-stage supply chain attack.

Security News
TeamPCP is partnering with ransomware group Vect to turn open source supply chain attacks on tools like Trivy and LiteLLM into large-scale ransomware operations.