Skip to content

Commit b2e7f28

Browse files
valentijnscholtenMaffooch
authored andcommitted
docs(finding): note the primary cwe field can be removed in the future
Mirror the existing cve/vulnerability_ids deprecation note: the single primary cwe field is merged into the cwes set for backward compatibility and can be removed once no longer needed.
1 parent 8702d69 commit b2e7f28

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

dojo/finding/models.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1388,6 +1388,9 @@ def vulnerability_ids(self):
13881388
def cwes(self):
13891389
# All CWEs for this finding in canonical CWE-<n> form: the additional Finding_CWE rows
13901390
# (already stored as CWE-<n> strings) with the primary self.cwe first, deduplicated.
1391+
# The single primary `cwe` field is merged in for backward compatibility, exactly as the
1392+
# `cve` field is merged into `vulnerability_ids`. We keep both fields to stay flexible
1393+
# until the single `cwe` field is not needed anymore and can be removed.
13911394
labels = [row.cwe for row in self.finding_cwe_set.all()]
13921395
primary = cwe_label(self.cwe)
13931396
if primary is not None:

0 commit comments

Comments
 (0)