
Research
/Security News
OpenAPI React Query Codegen Compromised in Mini Shai-Hulud npm Supply Chain Attack
Ten malicious OpenAPI React Query Codegen versions were published to npm in the Mini Shai-Hulud attack, all with valid provenance.
A filter middleware to filter http requests, and block some unwanted requests type.
$ npm install httpfilter
There are two major ways to use the filter API.
var filter = require('httpfilter');
filter(serverOptions)
Returns an Object that would be ready to filter on a call to .start(). It would recieved the request, response and next args and run filter. E.g filter.start(request, response, next); IT integrates into expressjs to call next for the next middleware
var filter = require('filter');
Does not return any object, it passes the serverOptions directly to the middleware call and off they go into processing
This is a plain object containing strictly the following
This contains an array of strings containing http versions allowed on this server e.g
versions: ["1.0", "1.1"] // this server does not support http2
This contains an array of strings containing http methods allowed on this server e.g
allow: ["GET", "POST"] // this server does allows only GET and POST methods
This identifies a proxying requests and allows or denies them depending on the value of proxy property. The value options are: allow, less-strict, deny
proxy: "deny" // this server does not support http2
This does not put any restriction. But allows any form of proxying take place, e.g proxying to another machine, or host number.
This restricts proxying to an external machine, but not proxying to the same machine, but on different ports.
This restricts every form of proxying both to an external machince, and even internal proxying
This is a string contains the virtual hostname. To parse against the hostname, when running a number on virtual hosts on the same machine.
hostname: "localhost" // this server supports requests from localhost only.
This is a string containing hostname aliases seperated by " ". Used for detailed checking of the hostname field
alias: "home filter" // alias used to add more options for hostname test above
This is used to check for proxying requests. ip is a string in numeric form.
ip: "127.0.0.1" // this server restricts requests not sent to localhost, when proxy is set to deny
Using expressjs
var filter = require('filter');
var express = require('express');
var app = express();
filter = filter(serverOptions)
app.use(filter);
var filter = require('filter');
var express = require('express');
var app = express();
var serverOptions = {};
app.use(function(req, res, next) {
filter(req, res, serverOptions, next);
})
There are no tests ... coming soon.
FAQs
To filter http requests before trying to process it at all
The npm package httpfilter receives a total of 2 weekly downloads. As such, httpfilter popularity was classified as not popular.
We found that httpfilter 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.

Research
/Security News
Ten malicious OpenAPI React Query Codegen versions were published to npm in the Mini Shai-Hulud attack, all with valid provenance.

Security News
Socket joins more than 100 technology, cybersecurity, and financial organizations calling for a global surge in cyber defense.

Product
Enterprise security teams can now detect malware, credential theft, suspicious network activity, and risky updates across Microsoft Edge extensions.