
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.
Util to fingerprint asset filenames.
$ npm install busta
or install CLI util globally
$ npm install -g busta
Arguments
String
File to fingerprint/bust.Object
optional
String
: Directory to create new file in. Default is same as the original file.String
: String to prepend filename with. Default is base of original file.Boolean
: If true filename will not be prepended with prefix. Default is false
.String
: Used with hasher. Default is "utf8"
.String|Function
: Used with hasher. Default is "md5"
. If value is a function,
the function will be passed the file contents and it must return a string.Function
Where newfile
has the following properties:
name
Fingerprinted filename.absolute
Absolute path.dir
Directory of file.fingerprint
var busta = require('busta');
busta('assets/js/example.js', function(err, fileinfo) {
if (err) throw err;
console.log('File %j created', fileinfo.name);
});
// => File "assets/js/example-6c7473255395b5d9f020065b3915cc86.js" created
busta('assets/js/example.js', {noprefix: true}, function(err, fileinfo) {
if (err) throw err;
console.log('File %j created', fileinfo.name);
});
// => File "assets/js/6c7473255395b5d9f020065b3915cc86.js" created
$ busta --file <file-to-bust> [options]
Options:
-h, --help output usage information
-V, --version output the version number
-f, --file <file> file to bust - required
-o, --outdir <outdir> directory to write new file to
-p, --prefix <prefix> filename prefix - default is base name of file
-n, --noprefix do not use a file prefix
-e, --encoding <encoding> encoding used by hasher - default is utf8
-H, --hash <hash> hash algorithm - default is md5
$ busta --file assets/js/example.js
# => Creates assets/js/example-6c7473255395b5d9f020065b3915cc86.js
$ busta --file assets/js/example.js --noprefix
# => Creates assets/js/6c7473255395b5d9f020065b3915cc86.js
$ busta --file assets/js/example.js --prefix super-duper
# => Creates assets/js/super-duper-6c7473255395b5d9f020065b3915cc86.js
$ busta --file assets/js/example.js --outdir deploy/app
# => Creates deploy/app/example-6c7473255395b5d9f020065b3915cc86.js
FAQs
Util to fingerprint asset filenames.
The npm package busta receives a total of 0 weekly downloads. As such, busta popularity was classified as not popular.
We found that busta 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.