forked from DefectDojo/django-DefectDojo
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
cd18539
commit d724080
Showing
6 changed files
with
32 additions
and
8 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# Generated by Django 5.0.8 on 2024-09-12 18:22 | ||
|
||
from django.db import migrations | ||
|
||
|
||
def aws_sechub_update_endpoints(apps, schema_editor): | ||
endpoint_model = apps.get_model('dojo', 'Endpoint') | ||
endpoints = endpoint_model.objects.filter(finding__test__test_type__name__in=["AWS Security Hub Scan", "AWS Inspector2 Scan"]) | ||
for endpoint in endpoints: | ||
endpoint.host = endpoint.host.replace(':', '_').replace("/", "_").replace(" ", "_") | ||
endpoint.save() | ||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('dojo', '0221_system_settings_disclaimer_notif'), | ||
] | ||
|
||
operations = [ | ||
migrations.RunPython(aws_sechub_update_endpoints, reverse_code=migrations.RunPython.noop), | ||
] |
This file contains 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
This file contains 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
This file contains 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
This file contains 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