Skip to content

Add missing modern regulations to regulation.json fixture#14519

Open
tejas0077 wants to merge 4 commits intoDefectDojo:devfrom
tejas0077:feature/add-missing-regulations
Open

Add missing modern regulations to regulation.json fixture#14519
tejas0077 wants to merge 4 commits intoDefectDojo:devfrom
tejas0077:feature/add-missing-regulations

Conversation

@tejas0077
Copy link
Contributor

Closes #14508

Added the following missing regulations to the regulation.json fixture:

  • ISO/IEC 42001:2023 (AI Management Systems)
  • EU AI Act (2024)
  • NIS2 Directive (EU) 2022/2555
  • DORA (Digital Operational Resilience Act)
  • ISO/IEC 27701:2019 (Privacy Information Management)

@github-actions github-actions bot added New Migration Adding a new migration file. Take care when merging. settings_changes Needs changes to settings.py based on changes in settings.dist.py included in this PR labels Mar 14, 2026
@tejas0077
Copy link
Contributor Author

"Hi @mtesauro, I noticed this PR contains 2 separate changes — the regulation fixture additions (related to #14508) and the import history cleanup feature (related to #13776). Should I split these into separate PRs? Happy to do so if preferred."

@valentijnscholten
Copy link
Member

valentijnscholten commented Mar 14, 2026

"Hi @mtesauro, I noticed this PR contains 2 separate changes — the regulation fixture additions (related to #14508) and the import history cleanup feature (related to #13776). Should I split these into separate PRs? Happy to do so if preferred."

Not sure where this quote comes from, but please stick to 1 feature per PR and raise it against dev or bugfix. Thanks anyway :-)

@tejas0077 tejas0077 force-pushed the feature/add-missing-regulations branch from 163ab11 to f7b6264 Compare March 14, 2026 14:13
@tejas0077 tejas0077 changed the base branch from master to dev March 14, 2026 14:17
@tejas0077
Copy link
Contributor Author

Hi @valentijnscholten, I have rebased against the dev branch as requested. Please let me know if any other changes are needed!

@valentijnscholten
Copy link
Member

Can you split he PR please?

@tejas0077
Copy link
Contributor Author

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.

@tejas0077 tejas0077 force-pushed the feature/add-missing-regulations branch from f7b6264 to f97e936 Compare March 14, 2026 15:03
@github-actions github-actions bot removed docker New Migration Adding a new migration file. Take care when merging. settings_changes Needs changes to settings.py based on changes in settings.dist.py included in this PR apiv2 docs unittests ui parser helm labels Mar 14, 2026
@tejas0077
Copy link
Contributor Author

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.

@valentijnscholten
Copy link
Member

Can you look at the failures? did you test these fixtures?

@tejas0077
Copy link
Contributor Author

Hi @valentijnscholten, I found and fixed two issues:

  1. The JSON file was malformed (two arrays concatenated) — now fixed with valid JSON
  2. Invalid category values were used (technology, cybersecurity) — replaced with valid ones (other, security) from the model's CATEGORY_CHOICES

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",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This does not feel necessary

@tejas0077
Copy link
Contributor Author

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!

Comment on lines 355 to 367
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)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems like your PR branches/commits are getting mixed up

@github-actions github-actions bot removed the parser label Mar 18, 2026
@tejas0077
Copy link
Contributor Author

tejas0077 commented Mar 18, 2026

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Enhancement: Add missing regulations to regulation.json fixture

3 participants