Add OpenCRE mapping script with safe fallback handling#1382
Add OpenCRE mapping script with safe fallback handling#1382Nik-ui wants to merge 3 commits intoOWASP:masterfrom
Conversation
|
Hi @kingthorin This PR introduces OpenCRE mapping enrichment with fallback handling for missing mappings. |
|
Could you remove the unrelated commits? If you're not comfortable with that it's okay, I can tiddy it up. Just let me know. |
@kingthorin Okay, i will work on this. |
13d3476 to
77f59f7
Compare
|
Thanks @kingthorin, I have cleaned up the branch and removed the unrelated commits. Let me know if anything else should be adjusted. |
|
Need to ensure the two workflows that work with the checklist are using the same indenting rule(s). So that it isn't always the entire file that's updated. Also this should probably be a step in the other workflow, so that the CRE IDs are updated whenever the checklist(s) are. |
77f59f7 to
5702ea9
Compare
Thanks @kingthorin , that makes sense. I’ll update the script to follow the same indentation rules to avoid rewriting the entire file, and look into integrating it as part of the existing workflow so CRE IDs stay in sync with checklist updates. |
10c6597 to
ab8d27b
Compare
|
Re-duplicates see these issues and the associated PR on 640: |
|
@Nik-ui It seems like you still have some changes that were already merged. You might need to reset the branch to a clean up-to-date state and re-implement your changes. Then force push to the PR. 🤷♂️ |
8c5ed80 to
0e81e55
Compare
Thanks @kingthorin , I have now rebased the branch onto the latest upstream master and removed previously merged or unrelated changes. The PR now only contains the OpenCRE mapping script and workflow integration. I also verified that it does not introduce any direct checklist modifications; the existing WSTG-INPV-13 duplication is already present in upstream and is not added by this branch. Please let me know if anything else should be adjusted. |
0e81e55 to
b49af20
Compare
|
Thanks, I'll review/test tomorrow. |
b5eb8e7 to
2b7489a
Compare
|
Thanks @kingthorin for the guidance, this was really helpful. I have updated the implementation to use the This aligns better with the intended API usage and avoids regex-style lookups. I have tested the endpoint across multiple WSTG IDs and confirmed that it returns consistent CRE mappings. Please let me know if this approach looks correct or if there is anything else you would like adjusted. |
|
Thanks for collaborating with the OpenCRE team, that should help ensure this is more stable and reliable going forward. Have you tested locally or on a VM? (It's okay if you haven't, I just want to set my own expectations 😉). |
|
Yes, I tested this locally. I verified the mapping logic by calling the endpoint directly for multiple WSTG IDs (e.g. WSTG-INPV-04, WSTG-CONF-02) and confirmed that the expected CRE IDs are returned. I also ran the full checklist generation script to ensure it integrates correctly and only updates the file when mappings change. |
Okay. |
|
After a bunch of debate and testing I decided to move away from the shell handling to python since that was already in use for the Excel and Google Drive handling. Do you want:
|
Hi @kingthorin, I will definitely give this a try and get back to you once I am done. |
|
Do you plan to clean this up and finish it? |
93bb741 to
95f6fa3
Compare
This comment has been minimized.
This comment has been minimized.
currently on it. |
This comment has been minimized.
This comment has been minimized.
dc3c166 to
95f6fa3
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
159a2be to
46653bf
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
a696d90 to
0187adc
Compare
This comment has been minimized.
This comment has been minimized.
1ea467a to
2d43dae
Compare
|
If you need help I can probably get it back on track and provide instructions to update your local branch. Just let me know. |
Quick update: I have now fixed the markdown and link-check issues, and all checks are passing. The PR is currently down to 3 commits and appears ready for review on my side. I’d still appreciate your guidance on the best next step for getting this fully aligned with the intended Python-based approach, if that’s still the preferred direction. |
This comment has been minimized.
This comment has been minimized.
|
The files currently in the PR are completely irrelevant to the OpenCRE work. They seem to be something that you added during a merge or rebase. The shell script was removed from the repo during the period in which you've been working with this PR. (So that was probably either from a merge or conflict.) I'll go through the history tomorrow and try to find the python you had submitted at one point. Then I'll try to put some instructions together to get you back on track. Edit: Oh maybe you never did do a python implementation, maybe the python I saw was just artifacts from you trying to update this branch. |
Thanks for the clarification, that helped a lot. I reviewed the commit history and traced this back to my earlier Python-based OpenCRE/checklist work. The earlier PR had picked up unrelated changes, so I restored the relevant Python script from that commit and removed the shell script and other unrelated changes to keep the PR focused. Please let me know if this now aligns with what you expected. |
|
Thanks, I see what you were pointing out in that screenshot. At that stage the PR was still showing the shell script, so it didn’t reflect the intended work. I will redeploy the Python version tomorrow and test, so it reflects it properly. |
|
Superseded by #1404 |


This PR covers issue #623.
What did this PR accomplish?