Skip to content

Package for conversion from scorecard ratings to risk and fixing some quirks

License

Notifications You must be signed in to change notification settings

morphysm/securityriskcard

Repository files navigation

SecurityRiskCard

This package provides an simple shared way of converting security scorecard data from "wellness" into risk. Available in:

Python

Installing

To install from PyPi:

pip install securityriskcard

If you want to install directly from source, you can do that by adding the following into your requirements.txt:

git+https://github.com/morphysm/securityriskcard.git@main

Usage example:

from securityriskcard import convert_to_risk

# Your scorecard result goes here.
data = convert_to_risk(scorecard_data)
print(json.dumps(data, indent=4))

Or if you want to test if the package is installed and you have scorecard result as json file:

python -m securityriskcard <path/to/scorecard.json>

Typescript

Installing

To install from NPM:

npm i --save securityriskcard

Usage example

import { convertToRisk } from 'securityriskcard'

// Your scorecard result goes here.
const data = convertToRisk(scorecardData)
console.log(data);

Testing

Currently packages contain some regression tests, which you can run during development or refactor to ensure data is output the same. The directory with test data also includes a script to generate output to 'freeze' current state. Do not run it until you are confident that change behaves as expected.

About

Package for conversion from scorecard ratings to risk and fixing some quirks

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published