Skip to content

fix(reimport): do not update finding tags on reimport for matched findings#14627

Open
valentijnscholten wants to merge 1 commit intoDefectDojo:bugfixfrom
valentijnscholten:fix/reimport-tags-not-updated
Open

fix(reimport): do not update finding tags on reimport for matched findings#14627
valentijnscholten wants to merge 1 commit intoDefectDojo:bugfixfrom
valentijnscholten:fix/reimport-tags-not-updated

Conversation

@valentijnscholten
Copy link
Copy Markdown
Member

@valentijnscholten valentijnscholten commented Apr 1, 2026

Summary

The behaviour of the Finding Tags in the reimport has been going through a bit of rough patch. At some point it was broken and it was fixed via #14459 . But that PR resulted in tags being added to existing tags, possibly leading to "too many" tags or "obsolete" tags. To avoid any confusion we have now decided to make the tags field behave like all other fields. It's set during import and not updated afterwards.

We are considering flags on the reimport request to trigger (certain) fields to be updated during reimport, but for now this PR is the desired behaviour.

  • On reimport, tags from the report were being appended to matched/existing findings via tags.add(), causing tags to accumulate across reimports instead of being left unchanged. This was a regression introduced in use tags.add() instead of tags.set() on reimport #14459 which changed tags.set() to tags.add().
  • This fix skips tag updates for matched findings during reimport, consistent with how other finding fields (title, severity, description, etc.) are handled — only new findings get tags from the report.
  • Updated test_import_report_with_tags to reflect the corrected behavior.

…dings

Tags from the report were being appended to matched findings via tags.add(),
causing tags to accumulate across reimports instead of being left unchanged.
This aligns tag handling with how other finding fields are treated on reimport.

Closes DefectDojo#14606
Copy link
Copy Markdown
Contributor

@mtesauro mtesauro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants