Skip to content

Commit eaf697a

Browse files
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 e366fbc commit eaf697a

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
@@ -1377,6 +1377,9 @@ def vulnerability_ids(self):
13771377
def cwes(self):
13781378
# All CWEs for this finding in canonical CWE-<n> form: the additional Finding_CWE rows
13791379
# (already stored as CWE-<n> strings) with the primary self.cwe first, deduplicated.
1380+
# The single primary `cwe` field is merged in for backward compatibility, exactly as the
1381+
# `cve` field is merged into `vulnerability_ids`. We keep both fields to stay flexible
1382+
# until the single `cwe` field is not needed anymore and can be removed.
13801383
labels = [row.cwe for row in self.finding_cwe_set.all()]
13811384
primary = cwe_label(self.cwe)
13821385
if primary is not None:

0 commit comments

Comments
 (0)