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.
hashdirectory
Advanced tools
Create an sha1 hash sum from a directory of files using the git algorithm
Create an sha1 hash sum from a directory of files using the git algorithm.
Creating a hash for an entire directory, instead of for a single file, can be useful for cache busting. Using git's method of creating the hash just builds upon something consistent that is known to work.
This package does not requires git to be installed on the production server, however. It only reproduces the git algorithm for hashing files and folders (but not commits or tags).
npm install --save hashdirectory
var hashdirectory = require('hashdirectory');
// Synchronous, for before your webserver starts up.
var hashed = hashdirectory.sync('./public');
// Asynchronous, for everything else.
hashdirectory('./public', function(err, hashed) {
});
// Or, if promises are more your thing.
var hashedPromise = hashdirectory('./public');
FAQs
Create an sha1 hash sum from a directory of files using the git algorithm
The npm package hashdirectory receives a total of 340 weekly downloads. As such, hashdirectory popularity was classified as not popular.
We found that hashdirectory 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.