cwe-sdk

1.1.19 • Public • Published

cwe-sdk

A Common Weakness Enumeration (CWE) Node.js SDK compliant with MITRE / CAPEC

npm version license downloads build codecov Known Vulnerabilities Responsible Disclosure Policy OWASP CWE Toolkit

Install

yarn add cwe-sdk

Usage

Require the CweManager class and use its methods

const { CweManager } = require('cwe-sdk')

Example

const { CweManager } = require('cwe-sdk')

const cweManager = new CweManager()
const result = cweManager.isChildOf({ weaknessId: '117', parentId: '116' })

console.log(result) // true

Build

This CWE SDK has a build process that prepares the JSON data by downloading the latest version of the CWE archive (e.g. https://cwe.mitre.org/data/xml/cwec_v4.1.xml.zip) and then crunches it to create the following data snapshots:

  1. A mirror JSON object, available at ./raw/cwe-archive.json
  2. A JSON dictionary to easily access CWEs by their ID, available at ./raw/cwe-dictionary.json
  3. A JSON array for the relationship hierarchy between CWEs, available at ./raw/cwe-hierarchy.json

This work is made possible thanks to scripts in ./build/

To run it, execute yarn run build

Contributing

Please consult CONTRIBUTING for guidelines on contributing to this project.

Author

cwe-sdk © Liran Tal, Released under the Apache-2.0 License.

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
1.1.19436latest

Version History

VersionDownloads (Last 7 Days)Published
1.1.19436
1.1.180
1.1.170
1.1.160
1.1.150
1.1.141
1.1.130
1.1.120
1.1.110
1.1.101
1.1.91
1.1.80
1.1.60
1.1.51
1.1.41
1.1.30
1.1.20
1.1.11
1.1.01
1.0.62
1.0.50
1.0.40
1.0.31
1.0.20
1.0.10
1.0.01

Package Sidebar

Install

npm i cwe-sdk

Weekly Downloads

447

Version

1.1.19

License

Apache-2.0

Unpacked Size

32.9 MB

Total Files

10

Last publish

Collaborators

  • lirantal_bot