Skip to content

Conversation

toolb0x
Copy link

@toolb0x toolb0x commented Jul 31, 2025

Description

This PR adds support for using the pluginID field from Tenable .nessus scan files as the unique_id_from_tool value in DefectDojo findings.

This enables proper deduplication between scans and reimports when using Tenable Scan, which currently does not populate a unique ID and thus prevents deduplication.

A single line was added to the Tenable parser (dojo/tools/tenable/xml_format.py) to extract the pluginID attribute and pass it into the Finding() constructor as unique_id_from_tool.

Test results

Manual testing done using the following steps:

Uploaded a .nessus scan via the UI and API (import-scan)
Verified that unique_id_from_tool is set correctly for each finding

curl -X GET "https://<dojo>/api/v2/findings/?test=<test_id>" -H "Authorization: Token <TOKEN>" | jq '.results[] | {title, unique_id_from_tool, duplicate}'

All findings show the correct unique_id_from_tool values based on Tenable's pluginID.

Documentation

No additional documentation needed. The change aligns with existing parser logic and improves deduplication without changing behavior for other tools.

Suggested labels: bugfix, Import Scans.

Copy link

DryRun Security

No security concerns detected in this pull request.


All finding details can be found in the DryRun Security Dashboard.

@valentijnscholten
Copy link
Member

I don't know nessus well enough to determine if the plugin field is a good candidate for unique_id_from_tool. It lookslike it could be. It has to be unique and constant across scans. But to benefit from it more changes would be necessary:

  • set dedupe algorithm in settings.dist.py
  • adjust unit tests
  • determine a migration strategy for existing tests/findings that are missing this field.
  • apply the same dedupe logic to the csv parser?
  • adjust get_dedupe_fields

Copy link
Contributor

@Maffooch Maffooch left a comment

Choose a reason for hiding this comment

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

The plugin_output can be very large and have timestamps in the data. It is more of a description field (where it is today and also in the deduplication config) rather than a unique identifier. This makes me think the plugin_output is not really a good candidate for unique_id_from_tool

@valentijnscholten
Copy link
Member

@Maffooch The field pluginID which is numerical. It also looke like the parsers use this as a dedupe key already.

@Maffooch Maffooch dismissed their stale review August 1, 2025 16:25

Misread Plugin ID for Plugin Output and relived some trauma from this field

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants