Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
@body/stream
Advanced tools
Gives a stream of an incoming http request, optionally with content decoded in respect to the `Content-Encoding` header.
Gives a stream of an incoming http request, optionally with content decoded in respect to the Content-Encoding
header.
npm install --save @body/stream
const getBodyStream = require('@body/stream')
// ...
app.post('/v1/users', (req, res, next) => {
const body = getBodyStream(req)
body.pipe(/* ... */)
})
// ...
getBodyStream(req: Request, options?: Options): ReadableStream
Read the body of the incoming request req
. Returns a readable stream of the data.
If the body isn't encoded, the incoming request req
will be returned as is.
inflate
(boolean)When set to true
, then bodies with a deflate
or gzip
content-encoding will be inflated.
Defaults to false
.
FAQs
Gives a stream of an incoming http request, optionally with content decoded in respect to the `Content-Encoding` header.
The npm package @body/stream receives a total of 12 weekly downloads. As such, @body/stream popularity was classified as not popular.
We found that @body/stream 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
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.