Skip to content

Commit

Permalink
🎉 add tenable plugin to reference (#11151)
Browse files Browse the repository at this point in the history
  • Loading branch information
manuel-sommer authored Nov 1, 2024
1 parent 6d811e0 commit 2bbed9f
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
3 changes: 3 additions & 0 deletions dojo/tools/tenable/csv_format.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,9 @@ def get_findings(self, filename: str, test: Test):
mitigation = str(row.get("Solution", row.get("definition.solution", row.get("Steps to Remediate", "N/A"))))
impact = row.get("Description", row.get("definition.description", "N/A"))
references = row.get("See Also", row.get("definition.see_also", "N/A"))
references += "\nTenable Plugin ID: " + row.get("Plugin", "N/A")
references += "\nPlugin Publication Date: " + row.get("Plugin Publication Date", "N/A")
references += "\nPlugin Modification Date: " + row.get("Plugin Modification Date", "N/A")
# Determine if the current row has already been processed
dupe_key = (
severity
Expand Down
14 changes: 14 additions & 0 deletions unittests/tools/test_tenable_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -309,3 +309,17 @@ def test_parse_issue_11102(self):
endpoint.clean()
self.assertEqual(2, len(findings))
self.assertEqual("Reconfigure the affected application if possible to avoid use of medium strength ciphers.", findings[0].mitigation)

def test_parse_issue_11127(self):
with open("unittests/scans/tenable/issue_11102.csv", encoding="utf-8") as testfile:
parser = TenableParser()
findings = parser.get_findings(testfile, self.create_test())
for finding in findings:
for endpoint in finding.unsaved_endpoints:
endpoint.clean()
reference = """https://www.openssl.org/blog/blog/2016/08/24/sweet32/
https://sweet32.info
Tenable Plugin ID: 42873
Plugin Publication Date: Nov 23, 2009 12:00:00 UTC
Plugin Modification Date: Feb 3, 2021 12:00:00 UTC"""
self.assertEqual(reference, findings[0].references)

0 comments on commit 2bbed9f

Please sign in to comment.