Skip to content

alilleybrinker/cwe-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

cwe-api

License: MIT

This is a crate for convenient use of the Common Weakness Enumeration (CWE) API. This is not an official crate produced by the CWE program.

The code in this crate is generated using Progenitor, based on the published CWE OpenAPI specification.

Packages

This repository includes two Rust crates:

  • cwe-api: a library crate for accessing the CWE API.
  • cwe-api-cli: a binary crate that provides a CLI for accessing the CWE API.

Installing the CLI

$ git clone https://github.com/alilleybrinker/cwe-api.git
$ cd cwe-api
$ cargo install --path cwe-api-cli

This requires git and a Rust toolchain installation.

CLI Example

$ cwe-api cwe info 230
[
  {
    "ID": "230",
    "Type": "variant_weakness"
  }
]
$ cwe-api cwe parents 230
[
  {
    "ID": "229",
    "Primary_Parent": true,
    "Type": "base_weakness",
    "ViewID": "1000"
  },
  {
    "ID": "1407",
    "Type": "category",
    "ViewID": "1400"
  },
  {
    "ID": "851",
    "Type": "category",
    "ViewID": "844"
  },
  {
    "ID": "993",
    "Type": "category",
    "ViewID": "888"
  }
]

License

The code is licensed under the MIT license. You can view the full contents in the LICENSE file.

About

Rust implementation of a CWE API consumer.

Topics

Resources

License

Stars

Watchers

Forks