项目作者: OWASP

项目描述 :
A Common Weakness Enumeration (CWE) Node.js SDK compliant with MITRE / CAPEC
高级语言: JavaScript
项目地址: git://github.com/OWASP/cwe-sdk-javascript.git
创建时间: 2020-08-10T16:03:56Z
项目社区:https://github.com/OWASP/cwe-sdk-javascript

开源协议:Apache License 2.0

下载



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

  1. yarn add cwe-sdk

Usage

Require the CweManager class and use its methods

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

Example

  1. const { CweManager } = require('cwe-sdk')
  2. const cweManager = new CweManager()
  3. const result = cweManager.isChildOf({ weaknessId: '117', parentId: '116' })
  4. 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.