Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
@indigocore/cs-validator
Advanced tools
Library for validating chainscript objects
<!-- Polyfill for browser compatibility -->
<script src="https://libs.stratumn.com/babel-polyfill.min.js"></script>
<!-- Actual Library -->
<script src="https://libs.stratumn.com/cs-validator.js"></script>
If you want a specific version, include https://libs.stratumn.com/cs-validator{version}.js
instead (for instance https://libs.stratumn.com/cs-validator-0.1.0.js
).
$ npm install @indigocore/cs-validator
var StratumnCsValidator = require('@indigocore/cs-validator');
// or using es6
import { MapValidator, SegmentValidator } from '@indigocore/cs-validator';
new StratumnCsValidator.MapValidator(JSON.parse(chainscript)).validate()
Returns a Promise that resolves to an error object such as:
{
linkHash: [Promise, ...],
stateHash: [Promise, ...],
merklePath: [Promise, ...],
fossil: [Promise, ...]
}
Each promise, in each array of each category resolves to an error string if an inconsistency has been detected. It resolves to null otherwise.
Errors can be retrieved with (for instance):
Promise.all(errors.linkHash).
then(err => err.filter(Boolean));
Install dependencies:
$ npm install
Build:
$ npm run build
Test:
$ npm test
The integration tests use a build version of the library. Make sure you've run npm run build
if you want your changes to be taken into account.
FAQs
Core library for building Map Explorer components
The npm package @indigocore/cs-validator receives a total of 0 weekly downloads. As such, @indigocore/cs-validator popularity was classified as not popular.
We found that @indigocore/cs-validator demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 9 open source maintainers 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
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.