Security News
Supply Chain Attack Detected in Solana's web3.js Library
A supply chain attack has been detected in versions 1.95.6 and 1.95.7 of the popular @solana/web3.js library.
Add rev to filename based on file content hashsum. Produce summary file.
Add rev to filename based on file content hashsum.
This plugin requires Grunt ~0.4.1
If you haven't used Grunt before, be sure to check out the Getting Started guide, as it explains how to create a Gruntfile as well as install and use Grunt plugins. Once you're familiar with that process, you may install this plugin with this command:
npm install hash-data --save-dev
Once the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:
grunt.loadNpmTasks('hash-data');
This task will revision your files based on its contents. You should then set the file and hash options.
grunt.initConfig({
hash_data: {
files_list: {
src: ['Project/index.html', 'Project/js/script.js']
dest: 'Project/build'
},
options: {
affix: 'prefix',
separator: '-',
length: 6,
algorithm: 'sha1',
summary: 'summary.json',
after: function(summary, options) {
// Callback
}
}
}
})
Type: String
Default value: 'md5'
algorithm
is dependent on the available algorithms supported by the version of OpenSSL on the platform. Examples are 'sha1'
, 'md5'
, 'sha256'
, 'sha512'
, etc. On recent releases, openssl list-message-digest-algorithms
will display the available digest algorithms.
Type: Number
Default value: '8'
The number of characters of the file content hash to affix the file name with.
Type: String
Default value: 'utf8'
The encoding of the file contents.
Type: String
Default value: '.'
A string value that is used to do something with whatever.
Type: String
Default value: 'prefix'
A string value that is used to do something else with whatever else.
Type: String
Default value: 'prefix'
Summary file path. The content look like that:
{
"index.html": {
"hash": "b275f5",
"absPath": "/home/user/Project/b275f5.index.html",
"relPath": "b275f5.index.html"
},
"js/script.js": {
"hash": "cad805",
"absPath": "/home/user/Project/js/cad805.script.js",
"relPath": "js/cad805.script.js"
}
}
FAQs
Add rev to filename based on file content hashsum. Produce summary file.
The npm package hash-data receives a total of 0 weekly downloads. As such, hash-data popularity was classified as not popular.
We found that hash-data 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
A supply chain attack has been detected in versions 1.95.6 and 1.95.7 of the popular @solana/web3.js library.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.