Skip to content

Commit 035e8cc

Browse files
close_old_findings: update docs and help texts
1 parent 286d5d1 commit 035e8cc

3 files changed

Lines changed: 19 additions & 19 deletions

File tree

docs/content/en/open_source/archived_docs/usage/features.md

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -386,15 +386,12 @@ details about the deduplication process : switch
386386

387387
### Deduplication - APIv2 parameters
388388

389-
- `close_old_findings` : if true, findings that are not
390-
duplicates and that were in the previous scan of the same type
391-
(example ZAP) for the same engagement (or product in case of
392-
\"close_old_findings_product_scope\") and that are not present in the new
393-
scan are closed (Inactive, Verified, Mitigated).
394-
- `close_old_findings_product_scope` : if true, close_old_findings applies
395-
to all findings of the same type in the product. Note that
396-
\"Deduplication on engagement\" is no longer used to determine the
397-
scope of close_old_findings.
389+
| Parameter | Import behaviour | Reimport Behaviour |
390+
|-----------|------------------|-------------------|
391+
| `close_old_findings` | if `true`, findings that are not duplicates and that were in the previous scan of the same type (example ZAP) for the same **engagement** (or product in case of `close_old_findings_product_scope`) and that are not present in the new scan are closed (`Inactive`, `Verified`, `Mitigated`). | if `true`, findings that that are in the same **test** and that are not present in the new scan are closed (`Inactive`, `Verified`, `Mitigated`) |
392+
| `close_old_findings_product_scope` | if true, `close_old_findings` applies to all findings of the same type in the whole **product**. Note that "Deduplication on engagement" is no longer used to determine the scope of `close_old_findings` | has no effect |
393+
394+
The `close_old_findings` feature will respect the value of the `service` field to only close findings with an identical `service` value.
398395

399396
### Deduplication / Similar findings
400397

dojo/api_v2/serializers.py

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2302,14 +2302,17 @@ class ImportScanSerializer(CommonImportScanSerializer):
23022302
close_old_findings = serializers.BooleanField(
23032303
required=False,
23042304
default=False,
2305-
help_text="Select if old findings no longer present in the report get closed as mitigated when importing. "
2306-
"If service has been set, only the findings for this service will be closed.",
2305+
help_text="Old findings no longer present in the new report get closed as mitigated when importing. "
2306+
"If service has been set, only the findings for this service will be closed. "
2307+
"This only affects findings within the same engagement.",
23072308
)
23082309
close_old_findings_product_scope = serializers.BooleanField(
23092310
required=False,
23102311
default=False,
2311-
help_text="Select if close_old_findings applies to all findings of the same type in the product. "
2312-
"By default, it is false meaning that only old findings of the same type in the engagement are in scope.",
2312+
help_text="Old findings no longer present in the new report get closed as mitigated when importing. "
2313+
"If service has been set, only the findings for this service will be closed. "
2314+
"This only affects findings within the same product."
2315+
"By default, it is false meaning that only old findings of the same type in the engagement are in scope.",
23132316
)
23142317
version = serializers.CharField(
23152318
required=False, help_text="Version that was scanned.",
@@ -2380,15 +2383,15 @@ class ReImportScanSerializer(CommonImportScanSerializer):
23802383
# also for ReImport.
23812384
close_old_findings = serializers.BooleanField(
23822385
required=False,
2383-
default=True,
2384-
help_text="Select if old findings no longer present in the report get closed as mitigated when importing.",
2386+
default=False,
2387+
help_text="Old findings no longer present in the new report get closed as mitigated when importing. "
2388+
"If service has been set, only the findings for this service will be closed. "
2389+
"This only affects findings within the same test.",
23852390
)
23862391
close_old_findings_product_scope = serializers.BooleanField(
23872392
required=False,
23882393
default=False,
2389-
help_text="Select if close_old_findings applies to all findings of the same type in the product. "
2390-
"By default, it is false meaning that only old findings of the same type in the engagement are in scope. "
2391-
"Note that this only applies on the first call to reimport-scan.",
2394+
help_text="This has no effect on reimport",
23922395
)
23932396
version = serializers.CharField(
23942397
required=False,

dojo/forms.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -651,7 +651,7 @@ class ReImportScanForm(forms.Form):
651651
label="Choose report file",
652652
allow_empty_file=True,
653653
required=False)
654-
close_old_findings = forms.BooleanField(help_text="Select if old findings no longer present in the report get closed as mitigated when importing.",
654+
close_old_findings = forms.BooleanField(help_text="Select if old findings in the same test that areno longer present in the report get closed as mitigated when importing.",
655655
required=False, initial=True)
656656
version = forms.CharField(max_length=100, required=False, help_text="Version that will be set on existing Test object. Leave empty to leave existing value in place.")
657657
branch_tag = forms.CharField(max_length=100, required=False, help_text="Branch or Tag that was scanned.")

0 commit comments

Comments
 (0)