Skip to content

Commit 19fa2c2

Browse files
🎉 Add fix_available to RedHatSatellite (#13059)
* 🎉 Add fix_available to RedHatSatellite * review
1 parent 33aff52 commit 19fa2c2

File tree

3 files changed

+9
-0
lines changed

3 files changed

+9
-0
lines changed

docs/content/en/connecting_your_tools/parsers/file/redhatsatellite.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,6 @@ By default, DefectDojo identifies duplicate Findings using these [hashcode field
1212

1313
- description
1414
- severity
15+
16+
### Field fix_availabe
17+
The field 'fix_available' is set to true if the fix is installable.

dojo/tools/redhatsatellite/parser.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,13 +69,17 @@ def get_findings(self, filename, test):
6969
if module_streams != []:
7070
description += "**module_streams:** " + str(module_streams) + "\n"
7171
description += "**packages:** " + ", ".join(packages)
72+
fix_available = True
73+
if installable is not True:
74+
fix_available = False
7275
find = Finding(
7376
title=title,
7477
test=test,
7578
description=description,
7679
severity=self.severity_mapping(severity_input=severity),
7780
mitigation=solution,
7881
dynamic_finding=True,
82+
fix_available=fix_available,
7983
)
8084
if errata_id is not None:
8185
find.unsaved_vulnerability_ids = []

unittests/tools/test_redhatsatellite_parser.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,3 +32,5 @@ def test_parse_file_with_many_packages(self):
3232
findings = parser.get_findings(testfile, Test())
3333
self.assertEqual(1, len(findings))
3434
self.assertEqual("RHBA-1999:5678", findings[0].unsaved_vulnerability_ids[0])
35+
self.assertEqual("glibc bug fix update", findings[0].title)
36+
self.assertEqual(True, findings[0].fix_available)

0 commit comments

Comments
 (0)