Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

cwe-sdk

Package Overview
Dependencies
Maintainers
0
Versions
26
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cwe-sdk

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

  • 1.1.16
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
83
decreased by-56.54%
Maintainers
0
Weekly downloads
 
Created
Source

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.

Keywords

FAQs

Package last updated on 22 Jun 2024

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc