Top weaknesses
The most common weaknesses in the corpus.
GET/api/v1/stats/cwes
The weaknesses that map to the most CVEs across the corpus, ranked by CVE count — a quick read on the dominant weakness classes.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
limit | query | integer | Number of weaknesses to return, 1–50. Default: 10. |
Example request
curl "https://radicalnotion.ai/api/v1/stats/cwes?limit=5" \
-H "Authorization: Bearer $RN_TOKEN"Example response
{
"count": 5,
"cwes": [
{
"cwe_id": "CWE-79",
"name": "Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')",
"count": 26055
},
{
"cwe_id": "CWE-89",
"name": "Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')",
"count": 11123
},
{
"cwe_id": "CWE-862",
"name": "Missing Authorization",
"count": 6844
},
{
"cwe_id": "CWE-352",
"name": "Cross-Site Request Forgery (CSRF)",
"count": 5599
},
{
"cwe_id": "CWE-22",
"name": "Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')",
"count": 4749
}
]
}Response schema
| Field | Type | Description |
|---|---|---|
count | integer | Number of weaknesses returned. |
cwes[].cwe_id / name | string | The weakness. |
cwes[].count | integer | CVEs mapped to the weakness. |
Responses
| Status | Meaning |
|---|---|
200 | Success. |
400 | A path or query parameter failed validation. |
401 | Missing or invalid access token. |
429 | Rate limit exceeded. |