
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.
stripcomment-loader
Advanced tools
stripcomments-loader - A tiny loader to blanken your code.While using UglifyJS over WebPack, I realized that the comments weren't stripped, actually. So I decided to write this loader that processes files and cleans them from comments - EXCEPT when debugging is enabled.
It's recommended to use this as a preLoaders entry to process multiple files that use either // or /* ... */ as comment indicators. Examples include JavaScript and CSS.
module.exports = {
entry: "./test.js",
output: {
path: __dirname,
filename: "bundle.js"
},
module: {
preLoaders: [
{
test: /\.(js|css)$/,
loader: "stripcomments?-lines"
}
]
}
}
Now just require any JS or CSS file, and you should see comments getting stripped.
To retain comments, set debug: true. In this case, comments are kept in-place.
You can control which and what is stripped:
stripcomments?-block
This will only strip block comments. Adding -line will only strip line comments. Supplying both or none, then all will be stripped. Passing +safe will have extra effects on which comments are to be removed.
FAQs
WebPack plugin to effectively strip comments
We found that stripcomment-loader 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.