
Security News
vlt Launches "reproduce": A New Tool Challenging the Limits of Package Provenance
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
cache-hash
Advanced tools
npm install cache-hash -D
Or global install
npm install cache-hash -g
cache-hash --target source --output public
Or
cache-hash -t source -o public
See help cache-hash --help
for more configuration
$ cache-hash --help
Usage: cache-hash [options]
Options:
-v, --version output the version number
-t, --target <target> Target resource directory (default: "./")
-o, --output <output> Output directory, If not set, he will overwrite the "target" content
--size <size> Generate hash length (default: 10)
--key <key> Version key (default: "v")
--lazy <lazy> Image lazy loading (default: "src")
--relative <relative> Whether to handle references to relative paths (unstable) (default: false)
--html <html> Generate hash for html referenced resources (default: true)
--queryJS <queryJS> String lookup and replacement of js file content (default: true)
--queryCSS <queryCSS> String lookup and replacement of css file content (default: true)
--queryStyle <queryStyle> String query replacement for inline "style" tags in html file content (default: true)
--queryScript <queryScript> String query replacement for inline "script" tags in html file content (default: true)
-h, --help display help for command
const cacheHash = require('cache-hash')
cacheHash({
target: 'source',
output: 'public'
})
// Please see the cli help parameter description above
// defualtOptions: {
// target: process.cwd(), // Current command line path
// output: process.cwd(), // Current command line path
// size: 10,
// versionKey: 'v',
// lazy: 'src',
// relative: false,
// html: true,
// queryString: {
// js: true,
// css: true,
// html: {
// style: true,
// script: true
// }
// }
// }
FAQs
Create hash for static resources to break http cache
We found that cache-hash 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
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
Research
Security News
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
Research
The Socket Research Team discovered a malicious npm package, '@ton-wallet/create', stealing cryptocurrency wallet keys from developers and users in the TON ecosystem.