From 9212626bf86c0e642c7bac672afbe8cab229792f Mon Sep 17 00:00:00 2001 From: Valentijn Scholten Date: Tue, 17 Dec 2024 18:44:06 +0100 Subject: [PATCH] RustyHog: improve description and file_path --- unittests/tools/test_rusty_hog_parser.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/unittests/tools/test_rusty_hog_parser.py b/unittests/tools/test_rusty_hog_parser.py index 51bcd385d2..36162b7015 100644 --- a/unittests/tools/test_rusty_hog_parser.py +++ b/unittests/tools/test_rusty_hog_parser.py @@ -110,9 +110,9 @@ def test_parse_file_with_multiple_vuln_has_multiple_finding_essexhog(self): parser = RustyhogParser() findings = parser.get_items(testfile, "Essex Hog", Test()) self.assertEqual(3, len(findings)) - self.assertEqual("https://confluence.com/pages/viewpage.action?pageId=12345", findings[0]['file_path']) - self.assertEqual("-----BEGIN EC PRIVATE KEY-----", findings[0]['payload']) - self.assertEqual("*Reason:**SSH (EC) private key", findings[0]['description'][:30]) + self.assertEqual("https://confluence.com/pages/viewpage.action?pageId=12345", findings[0].file_path) + self.assertEqual("-----BEGIN EC PRIVATE KEY-----", findings[0].payload) + self.assertEqual("*Reason:**SSH (EC) private key", findings[0].description[:30]) def test_parse_file_with_multiple_vuln_has_multiple_finding_essexhog_content(self): with open("unittests/scans/rusty_hog/essexhog_many_vulns.json", encoding="utf-8") as testfile: