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.
github.com/mwat56/jffs
Often you don't want remote users to access your filesystem's static files outside the URLs you provide with your web-application. Especially if there are file(s) in your (sub-)directories which shouldn't be served to others. Therefore it's imperative to hamper the Go fileserver insofar as to not produce directory listings showing all available files. That's were this small package comes in.
Credits go to Brad Fitzpatrick and Alex Edwards.
You can use Go
to install this package for you:
go get -u github.com/mwat56/jffs
This package exports a single function FileServer()
.
So, while you're used to call
myStaticDirectory :="/tmp"
myStaticHandler := http.FileServer(http.Dir(myStaticDirectory)))
to use this implementation you'd now just use:
myStaticHandler := jffs.FileServer(myStaticDirectory)
That's all.
Copyright © 2019, 2022 M.Watermann, 10247 Berlin, Germany
All rights reserved
EMail : <support@mwat.de>
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version.
This software is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
You should have received a copy of the GNU General Public License along with this program. If not, see the GNU General Public License for details.
FAQs
Unknown package
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.