Home
Docs
GitHub
Pricing
Blog
Log In

Run Sandworm Audit for your App

Get started
Hold on, we're currently generating a fresh version of this report
Generated on Apr 1, 2024 via pnpm

ssri 4.1.6

Standard Subresource Integrity library -- parses, serializes, generates, and verifies integrity metadata according to the SRI spec.
Package summary
Share
3
issues
2
moderate severity
vulnerability
2
1
low severity
license
1
2
licenses
1
MIT
1
CC0-1.0
Package created
23 Mar 2017
Version published
7 Jun 2017
Maintainers
5
Total deps
2
Direct deps
1
License
CC0-1.0

Issues

3

2 moderate severity issues

moderate
Recommendation: Upgrade to version 5.2.2 or later
via: ssri@4.1.6
Recommendation: Upgrade to version 5.2.2 or later
via: ssri@4.1.6
Collapse
Expand

1 low severity issue

low
Recommendation: Read and validate the license terms
via: ssri@4.1.6
Collapse
Expand

Licenses

MIT License

Permissive
OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
commercial-use
modify
distribute
sublicense
private-use
Cannot
hold-liable
Must
include-copyright
include-license
1 Packages, Including:
safe-buffer@5.2.1

Creative Commons Zero v1.0 Universal

Public Domain
Not OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
Cannot
Must
1 Packages, Including:
ssri@4.1.6
Disclaimer

This deed highlights only some of the key features and terms of the actual license. It is not a license and has no legal value. You should carefully review all of the terms and conditions of the actual license before using the licensed material.

Sandworm is not a law firm and does not provide legal services. Distributing, displaying, or linking to this deed or the license that it summarizes does not create a lawyer-client or any other relationship.

Direct Dependencies

1
All Dependencies CSV
ⓘ This is a list of ssri 's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.
NameVersionSizeLicenseTypeVulnerabilities
safe-buffer5.2.19.74 kBMIT
prod

Visualizations

Frequently Asked Questions

What does ssri do?

SSRI, short for Standard Subresource Integrity, is a Node.js utility primarily used for managing Subresource Integrity hashes. The library is responsible for parsing, manipulating, serializing, generating, and verifying SRI hashes in compliance with the SRI specification. SRI hashes are essential in ensuring the integrity of resources loaded by web applications, making this library pivotal in the web security domain.

How do you use ssri?

To utilize the SSRI library in your Javascript project, follow these steps:

  1. Install SSRI: You can add the package to your project by running the command npm install --save ssri in your terminal.

  2. Require SSRI: In your JavaScript file, include const ssri = require('ssri') at the beginning.

  3. Use SSRI's functionalities: Here are a few examples of how to use its different methods:

    Parsing and Serializing

    const integrity = 'sha512-SAMPLEHASH';
    const parsed = ssri.parse(integrity); // interpret SRI hash
    console.log(parsed);
    console.log(ssri.stringify(parsed)); // === integrity (works on non-Integrity objects)
    console.log(parsed.toString()); // === integrity
    

    Integrity Generation

    const data = fs.readFileSync('./my-file');
    console.log(ssri.fromData(data)); // generate Hash from data
    

    Integrity Verification

    const data = fs.readFileSync('./my-file');
    const integrityCheck = ssri.checkData(data, integrity);
    console.log(integrityCheck); // verify integrity of data
    

Where are the ssri docs?

SSRI’s detailed documentation can be found on the GitHub page of the library. The documentation entails an extensive guide on the API methods, providing examples and context for each one. Besides this, the document also covers other aspects like installation, features, and how to contribute to the open-source project.