Add OpenCRE as a map analysis resource#825
Open
Bornunique911 wants to merge 5 commits intoOWASP:mainfrom
Open
Conversation
e1b626a to
545f2fe
Compare
Author
Collaborator
|
It sort of looks okay, but I am afraid that CWE 1004 links to only one CRE, and not 8. So something's wrong. |
77b407e to
eb8a5df
Compare
074733f to
c93ea2f
Compare
d03b5dc to
a302369
Compare
2a51270 to
876f801
Compare
Author
|
Hi @robvanderveer, thanks for calling out for the issue. The issue was in the fetch logic where were also including the indirect links, now I have fixed it to only match direct links. So in the screenshot now we have only 1 mapping for CWE 1004 in CRE. I also noticed an issue in hover logic, for now I have handled it at backend side.
|
b30d13c to
f62149a
Compare
Collaborator
|
For me it looks Okay , will request @northdpole and @robvanderveer to review it too before merging. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.




Summary
Closes #469.
Issue #469 asks to add OpenCRE itself as an option in Map Analysis so users can get views such as
OpenCRE <-> SAMM.This PR implements that by adding
OpenCREas a selectable map-analysis resource and handlingOpenCREcomparisons through a dedicated direct-link backend path.What this PR adds
When one of the selected standards is
OpenCRE, the backend now:OpenCREin/rest/v1/standardsThis makes views such as:
OpenCRE -> SAMMSAMM -> OpenCRECWE -> OpenCREavailable directly from Map Analysis.
Implementation choice
For
OpenCREcomparisons, this PR uses only directLinked Torelationships from OpenCRE CREs to the selected standard nodes.That means:
This keeps the
OpenCREview focused on explicit mappings rather than broader inferred overlap.Resulting behavior
Standard <-> OpenCREnow behaves like a direct mapping view:Standard -> OpenCREgroups by the selected standard entries and shows their directly linked CREsOpenCRE -> Standardgroups by CREs and shows their directly linked standard entriesFor example, a case like
CWE-1004returns the directly linked OpenCRE mapping rather than a broader automatically related set.Hover compatibility
The current Map Analysis popup infers direction from the one-step path payload.
To keep this PR backend-only, the direct
OpenCREfast path includes a small compatibility adjustment in the returned one-step path shape so the existing hover renders correctly forStandard -> OpenCREwithout changing generic gap-analysis behavior.This compatibility shaping is limited to the
OpenCREdirect-link path only.Validation
Focused regression:
./venv/bin/python -m pytest application/tests/web_main_test.py -k 'supports_opencre_as_standard or returns_only_direct_opencre_mappings' -q