
Security News
The Hidden Blast Radius of the Axios Compromise
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.
koa-static-security
Advanced tools
拦截静态文件恶意路径
更好的静态文件中间件
$ npm install koa-static-security
var koa = require('koa');
var app = koa();
app.use(require('koa-static-security')(root, opts));
opts options object.maxage Browser cache max-age in milliseconds. defaults to 0hidden Allow transfer of hidden files. defaults to falseindex Default file name, defaults to noneifModifiedSinceSupport by sending a 304 (not modified) response. Defaults to trueformat Allow trailing slashes for directories (e.g. /directory and /directory. Defaults to truevar serve = require('koa-static-security');
var koa = require('koa');
var app = koa();
// $ GET /package.json
app.use(serve('.'));
// $ GET /hello.txt
app.use(serve('test/fixtures'));
// or use absolute paths
app.use(serve(__dirname + '/test/fixtures'));
app.listen(3000);
console.log('listening on port 3000');
MIT
FAQs
koa static security
We found that koa-static-security 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
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.

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.