Security News
Opengrep Emerges as Open Source Alternative Amid Semgrep Licensing Controversy
Opengrep forks Semgrep to preserve open source SAST in response to controversial licensing changes.
@ch1/browser-dna-express
Advanced tools
Browser DNA Express is a tool for fingerprinting browsers with express
This is not well maintained
yarn add @ch1/browser-dna-express
Fingerprinting middleware for express. This middleware grabs information
about a connection and puts it on the req
object of each request.
Consumers will need to use some other middleware to store this.
(The library still supports the legacy res.locals.fingerprint
interface)
The middleware also consumes request body's that have a fingerprint object that comes from @ch1/browser-dna
Fingerprinting can be a hot button topic and for good reason. Privacy on the internet is an illusion. We should expect some modicum of privacy but we should also be aware of the limitations of the tools we use. This library and other - more robust - libraries like Panopticlick show just how much trivial seeming data we give away that actually "marks" us.
Ultimately your fingerprint from a library like this, in combination with an IP address is not really enough to uniquely identify most people but it really shrinks the pool, especially in certain areas.
While we want and should have privacy there is a strong use case for having our connections be semi-identifiable.
Consider the following:
This is where at least fingerprinting headers and connection detail server side helps.
Another case would be implementing an app that uses semi-anonymous sharing having a JS + server side fingerprint would allow the app to somewhat distinguish anonymous connections for the purpose of say short term chat.
Use at the top level of an express app
import { fingerprint } from '@ch1/browser-dna-express';
// where app is your express app
app.use(fingerprint());
// then on the next middleware
app.use((req: FingerprintedRequest, res: Response, next: Function) => {
console.log(JSON.stringify(req.fingerprint, null, 2));
next();
});
The req.fingerprint
object is populated as follows:
export interface Fingerprint {
connection: ConnectionFingerprint;
client?: ClientFingerprint;
server: ServerFingerprint;
}
The client fingerprint is optional and will only be present if the client
has forwarded the information. The client can easily harvest the information
with @ch1/browser-dna
the consumer would need to create a ClientFingerprint
on the client and
send it to the server in the body using the property fingerprint:
interface RequestBody {
[key: string]: any;
fingerprint: ClientFingerprint;
}
With the fingerprint data the next step would be to use another middleware after this middleware to store the fingerprint information somewhere
0.2.0
Fingerprint object is now on the request object and res.locals
FAQs
Browser DNA Express is a tool for fingerprinting browsers with express
The npm package @ch1/browser-dna-express receives a total of 3 weekly downloads. As such, @ch1/browser-dna-express popularity was classified as not popular.
We found that @ch1/browser-dna-express 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
Opengrep forks Semgrep to preserve open source SAST in response to controversial licensing changes.
Security News
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
Security News
cURL and Go security teams are publicly rejecting CVSS as flawed for assessing vulnerabilities and are calling for more accurate, context-aware approaches.