
Security News
/Research
Wallet-Draining npm Package Impersonates Nodemailer to Hijack Crypto Transactions
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
cache-busted
Advanced tools
A simplistic cache buster that appends the current version for production environments and the current time otherwise (great for development)
Use cache busting in express. Adds a version query string to ressources.
var express = require('express');
var cacheBust = require('cache-busted');
var app = express();
cacheBust.handler(app);
This exposes the function cacheBust in your app locals. Enabling you to do the following (example using jade):
head
title Hello World
!= cacheBust('/public/js/app.js')
!= cacheBust('/public/css/style.css')
!= cacheBust('/public/css/style', 'css')
Output:
<head>
<title>Hello World</title>
<script type="text/js" src="/public/js/app.js?v=1.0.0" />
<link rel="stylesheet" href="/public/css/style.css?v=1.0.0" />
<link rel="stylesheet" href="/public/css/style.css?v=1.0.0" />
</head>
Add the options to the handler
call: cacheBust.handler(app, options)
version
: Use this exact version. Default: null which will make this module look for a package.json in the folder below
packageLocation
: Path to the package.json
. Defaults to ../../package.json
.
The above example is the output if the NODE_ENV environment variable is set to production
or integration
. Otherwise it also appends the current timestamp so that each request will load all new dependencies. Example:
<link rel="stylesheet" href="/public/css/style.css?v=1.0.0-1432576223502" />
FAQs
A simplistic cache buster that appends the current version for production environments and the current time otherwise (great for development)
The npm package cache-busted receives a total of 114 weekly downloads. As such, cache-busted popularity was classified as not popular.
We found that cache-busted 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.
Security News
/Research
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
Security News
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.
Security News
/Research
Malicious Nx npm versions stole secrets and wallet info using AI CLI tools; Socket’s AI scanner detected the supply chain attack and flagged the malware.