You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* dedupe-help Move logic to set Finding hash code to its own method
* dedupe-help rework set_hash_code method to accept dedupe_option
* Update versions in application files
* Revert "Update versions in application files"
This reverts commit 7ee4bfa.
* dedupe-help reorder method to make linter happy
* dedupe-help Rework finding hash set/dedupe to attempt to load methods based on settings and fall back to existing implementations as defaults
* dedupe-help add helper method to load custom methods and use it
* dedupe-help bug in load custom helper method
* dedupe-help Linter fix (import ordering)
* dedupe-help Update default_importer to handle .values() call on findings set within close old findings method
* dedupe-help extract get_(re)importer methods from engagement/test (re)import views into a separate method
* dedupe-help extract reimport dedupe alg determination into its own method
* dedupe-help refactor where custom methods for hashing/dedupe are called to minimize changes to existing calls
* dedupe-help linter fixes
---------
Co-authored-by: DefectDojo release bot <dojo-release-bot@users.noreply.github.com>
logger.error("Can't compute cvssv3 score for finding id %i. Invalid cvssv3 vector found: '%s'. Exception: %s", self.id, self.cvssv3, ex)
2642
2642
2643
-
# Finding.save is called once from serializers.py with dedupe_option=False because the finding is not ready yet, for example the endpoints are not built
2644
-
# It is then called a second time with dedupe_option defaulted to true; now we can compute the hash_code and run the deduplication
2645
-
ifdedupe_option:
2646
-
if (self.hash_codeisnotNone):
2647
-
deduplicationLogger.debug("Hash_code already computed for finding")
2648
-
else:
2649
-
self.hash_code=self.compute_hash_code()
2650
-
deduplicationLogger.debug("Hash_code computed for finding: %s", self.hash_code)
2643
+
self.set_hash_code(dedupe_option)
2651
2644
2652
2645
ifself.pkisNone:
2653
2646
# We enter here during the first call from serializers.py
# Finding.save is called once from serializers.py with dedupe_option=False because the finding is not ready yet, for example the endpoints are not built
3348
+
# It is then called a second time with dedupe_option defaulted to true; now we can compute the hash_code and run the deduplication
3349
+
ifdedupe_option:
3350
+
ifself.hash_codeisnotNone:
3351
+
deduplicationLogger.debug("Hash_code already computed for finding")
3352
+
else:
3353
+
self.hash_code=self.compute_hash_code()
3354
+
deduplicationLogger.debug("Hash_code computed for finding: %s", self.hash_code)
3355
+
3349
3356
3350
3357
classFindingAdmin(admin.ModelAdmin):
3351
3358
# For efficiency with large databases, display many-to-many fields with raw
0 commit comments