Add curated CWE fallback mappings and coverage for issue #472#823
Add curated CWE fallback mappings and coverage for issue #472#823Bornunique911 wants to merge 12 commits into
Conversation
Bornunique911
left a comment
There was a problem hiding this comment.
Requesting kind reviews and feedback for this feature from : @northdpole , @Pa04rth , @robvanderveer
dd48a0f to
87b5355
Compare
Fix 1 :In this release, I have mapped all the CWE's from the official MITRE's CWE website (https://cwe.mitre.org/data/downloads.html).
Fix 2 :If we now search for the term Before :
After :
Necessary scripts useful for updating the latest CWE's and getting an idea of how much data is being utilized by the database locally :I have also added necessary scripts :
|
|
Requesting kind reviews and feedback for this feature from : @northdpole , @Pa04rth , @robvanderveer . |
92d5a3d to
c044c57
Compare
b907815 to
3f77eec
Compare
a887f74 to
4e453f1
Compare
4e453f1 to
8acda5f
Compare
Signed-off-by: Bornunique911 <69379200+Bornunique911@users.noreply.github.com>
|
Hi @robvanderveer , @northdpole and @Pa04rth , can you guys please review it and provide a suitable feedback for it so that if there is any changes to make I will make it? |





Problem
Issue #472 asks how OpenCRE can map more of CWE in a way that is practical and maintainable.
The current gap is twofold:
Solution
This branch narrows the implementation to CWE-only behavior and introduces a deterministic mapping strategy with two parts.
1. Related-CWE inheritance
The importer now:
This allows a newly imported CWE to inherit mappings from another newly imported related CWE in the same run.
2. Curated fallback mappings
This branch adds a curated fallback mapping file:
application/utils/external_project_parsers/data/cwe_fallback_mappings.jsonThe importer loads this file and applies fallback CRE mappings only when a CWE still has no CRE link after normal and inherited linking.
This keeps the behavior:
3. Local refresh support
This branch also adds:
scripts/update-cwe.shThis is a local helper for refreshing CWE data from the latest MITRE feed into an existing OpenCRE SQLite cache.
Scope
In scope
Files Changed
application/utils/external_project_parsers/parsers/cwe.pyapplication/utils/external_project_parsers/data/cwe_fallback_mappings.jsonapplication/tests/cwe_parser_test.pyscripts/update-cwe.shTesting
Executed: