
Security News
npm Tooling Bug Incorrectly Marks One-Character Packages as Security Holders
npm confirmed a tooling bug incorrectly marked several one-character packages as security holders and said it was working on a rollback.
hash-all-files
Advanced tools
Hash all files with Node.js
3 ways:
clone this repo, and require ./index.js
npm install --save-dev hash-all-files
yarn add --dev hash-all-files
hashAllFile({
projectPath: "./",
folderPath: "./test/",
hashLength: 8,
filter(file) {
return /\.png$/.test(file)
}
})
projectPath:
Mandatory. Path relative to project root.
folderPath:
Mandatory. Relative folder path will be hashed.
filter:
Optional.
Function filter receive a file path relative to param folderPath. File will be hashed which pass the test implemented by the provided function.
hashLength:
Optional.
Default value is 8.
git clone && yarn && yarn test
console:
{ 'test/a.png': 'test/a.d41d8cd9.png',
'test/folder1/666.txt': 'test/folder1/666.fae0b27c.txt',
'test/folder1/b.png': 'test/folder1/b.d41d8cd9.png',
'test/folder1/c.jpg': 'test/folder1/c.d41d8cd9.jpg',
'test/index.js': 'test/index.254a638c.js' }
{ 'test/a.png': 'test/a.d41d.png',
'test/folder1/b.png': 'test/folder1/b.d41d.png' }
{}
MIT
FAQs
get all file hash. 获取所有文件的 hash.
We found that hash-all-files 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
npm confirmed a tooling bug incorrectly marked several one-character packages as security holders and said it was working on a rollback.

Research
/Security News
Newer packages in this compromise use native extensions and .pth loaders to execute JavaScript stealers in developer environments.

Research
Socket found 37 malicious PyPI wheels that abuse Python startup hooks to launch a Bun-powered credential stealer tied to Mini Shai-Hulud/Miasma.