
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.
dummy-http-basic-auth
Advanced tools
A simple object to implement a dummy http basic authentication.
import {Basic} from 'dummy-http-basic-auth';
const basic = new Basic({
file: '/path/to/user-password-pairs'
});
const app = express();
app.use(basic.middleware);
app.get('/secured', (req, res) => {
res.send('if you see this, you are authenticated');
});
If we need more control,
app.use((req, res, next) => {
// no-need-authentication-routes
if (['/public-route', '/public-script.js'].includes(req.url)) {
next();
}
// else check for authentication
// basic.loadUsers(); // use this if you need to integrate changes made from the user list file without restarting the server.
// returns 401 Unauthorized if check doesn't pass (the callback is not called, no next).
basic.check(req, res, (err: Error) => {
if (err) {
next(err);
}
else {
next();
}
});
});
You can check the test for more details
This is just a bit of code that I wrote for testing and for implementing in a private architecture. Use with caution. If you really want to secure your application you should also make use of https to encrypt the headers because http authorization is sending plain passwords in the request. If you wish to contribute you can propose a PR on the related github, I'd be glad to improve this tiny api.
FAQs
A simple object to implement a dummy http basic authentication.
We found that dummy-http-basic-auth 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.