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.
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.
$ 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.
$ 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"
}
]
The code is licensed under the MIT license. You can view the full contents in the LICENSE file.