Add missing modern regulations to regulation.json fixture#14519
Add missing modern regulations to regulation.json fixture#14519tejas0077 wants to merge 4 commits intoDefectDojo:devfrom
Conversation
Not sure where this quote comes from, but please stick to 1 feature per PR and raise it against dev or bugfix. Thanks anyway :-) |
163ab11 to
f7b6264
Compare
|
Hi @valentijnscholten, I have rebased against the |
|
Can you split he PR please? |
|
Thanks for the clarification. I’ll split this into two separate PRs — one for the regulation fixture additions and another for the import history cleanup feature. I’ll update shortly. |
f7b6264 to
f97e936
Compare
|
Thanks for the guidance. I’ve updated this PR so it now only includes the regulation fixture additions. I’ll open a separate PR for the import history cleanup feature. |
|
Can you look at the failures? did you test these fixtures? |
|
Hi @valentijnscholten, I found and fixed two issues:
The fixture now has 31 entries with all valid category values. Sorry for the oversight! |
| "pk": 4, | ||
| "fields": { | ||
| "name": "Sarbanes–Oxley Act", | ||
| "name": "Sarbanes\u2013Oxley Act", |
There was a problem hiding this comment.
This does not feel necessary
|
Hi @Maffooch, I've removed the duplicate unicode name entry for Sarbanes–Oxley — only one name field remains now. Could you please re-review when you get a chance? Thanks! |
| finding.verified = True | ||
| # manage endpoint/location | ||
| host = issue_row["fqdn"] or issue_row["ip_address"] | ||
| port = temp.get("port_status") | ||
| if settings.V3_FEATURE_LOCATIONS: | ||
| location = LocationData.url(host=issue_row["fqdn"]) if issue_row["fqdn"] else LocationData.url(host=issue_row["ip_address"]) | ||
| location = LocationData.url(host=host, port=int(port) if port else None) | ||
| finding.unsaved_locations = [location] | ||
| else: | ||
| # TODO: Delete this after the move to Locations | ||
| location = Endpoint(host=issue_row["fqdn"]) if issue_row["fqdn"] else Endpoint(host=issue_row["ip_address"]) | ||
| location = Endpoint(host=host, port=int(port) if port else None) | ||
| finding.unsaved_endpoints = [location] | ||
| finding.unsaved_vulnerability_ids = temp.get("cve_list", []) | ||
| ret_rows.append(finding) |
There was a problem hiding this comment.
Seems like your PR branches/commits are getting mixed up
|
Hi @valentijnscholten and @Maffooch, sorry for the confusion! I've reverted the accidentally included Qualys parser commit the PR now only contains the regulation fixture additions as intended. Could you please re-review when you get a chance? Thanks! |
Closes #14508
Added the following missing regulations to the regulation.json fixture: