Research
Security News
Threat Actor Exposes Playbook for Exploiting npm to Build Blockchain-Powered Botnets
A threat actor's playbook for exploiting the npm ecosystem was exposed on the dark web, detailing how to build a blockchain-powered botnet.
sri-toolbox
Advanced tools
Subresource Integrity tools.
npm install sri-toolbox
var sriToolbox = require("sri-toolbox");
sriToolbox({ options }, data); //=> result
Note: this module supports currying.
var sriToolboxer = sriToolbox({ option });
sriToolboxer(data); //=> result
Key: type name = default
element1.integrity = sri.generate.string(jquerySourceCode);
element2.integrity = sri.generate.string(
jquerySourceCode,
{
algorithms: [
"sha-256",
"sha-512"
],
authority: "code.jquery.com",
delimiter: " \n",
parameters: {
"ct": "text/javascript"
}
},
" \n"
);
generate
Functions responsible for Subresource Integrity ni-URI generation
generate.array (
required data,
optional options)
Returns ["string"...]
.
Generate an array of ni-URI strings.
generate.string (
required data,
optional options)
Returns "string..."
.
Generate a delimited string of ni-URI's.
data:
String to be hashed
options:
algorithms:
["name"...]
Default: ["sha-256"]
Array of RFC6920 Digest Algorithms
Digest Algorithm: The name of the digest algorithm, as specified in the IANA registry defined in Section 9.4. For example,
[ "sha-256", "sha-512" ]
authority:
"hostname"
Default: ""
RFC6920 Authority value
Authority: The optional authority component may assist applications in accessing the object named by an ni-URI. There is no default value for the authority field. (See Section 3.2.2 of [RFC3986] for details.) While ni names with and without an authority differ syntactically from ni names with different authorities, all three refer to the same object if and only if the digest algorithm, length, and value are the same.
delimiter:
"delimiter"
Default: " "
generate.string
ni-URI delimiter.
parameters:
{ "name": "value" }
Default: { }
Deserialized list of RFC6920 Query Parameters
For example, a content-type specifier: { "ct": "text/plain" }
FAQs
Subresource Integrity tools
The npm package sri-toolbox receives a total of 87,473 weekly downloads. As such, sri-toolbox popularity was classified as popular.
We found that sri-toolbox 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.
Research
Security News
A threat actor's playbook for exploiting the npm ecosystem was exposed on the dark web, detailing how to build a blockchain-powered botnet.
Security News
NVD’s backlog surpasses 20,000 CVEs as analysis slows and NIST announces new system updates to address ongoing delays.
Security News
Research
A malicious npm package disguised as a WhatsApp client is exploiting authentication flows with a remote kill switch to exfiltrate data and destroy files.