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.
Cache-busts URLs in HTML files by appending a query string with a hash of the referenced resources. Similar to grunt-cache-bust, but runs on its own.
Because parsing and re-marshaling HTML documents is brittle, URLs are replaced through regular expressions. As a way to mitigate against unwanted substitutions, URLs that are to be busted can be marked with a special suffix.
var bust = require('html-bust');
Rewrites the HTML file inPath
to outPath
, cache-busting URLs by appending a query string with a hash of the referenced resource. Relative URLs are resolved against the location of the HTML file; absolute URLs are ignored.
Available options:
tagTypes (default: [ 'img', 'script', 'link' ]
)
An array of HTML tag types to cache-bust. Currently, img
, script
and link
are supported. Tags of other types are ignored.
urlHint (default: '?bust'
)
If set to a string, only URLs ending with that string are busted. The string is removed from the processed HTML file. If null
, URLs are busted inconditionally.
mode (default: hash
)
One of hash
or string
. In hash
mode, references are busted with a hash of the respective file contents, according to the hashAlgorithm
and hashString
options. In string
mode, references are busted with the fixed string given by the fixedString
option.
hashAlgorithm (default: 'sha1'
)
The hash algorithm to use in hash
mode. Check the documentation for crypto.createHash
.
hashLength (default: 8
)
The number of hash characters to use in hash
mode as the cache-busting string.
fixedString (default: ''
)
The fixed string to use in string
mode.
FAQs
Cache-busts URLs in HTML files
The npm package html-bust receives a total of 0 weekly downloads. As such, html-bust popularity was classified as not popular.
We found that html-bust 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.