Skip to content

Commit ed4b3f1

Browse files
committed
Revert "Added info injection from guideline into finding"
This reverts commit 08f68d9.
1 parent b2540e2 commit ed4b3f1

1 file changed

Lines changed: 2 additions & 16 deletions

File tree

dojo/tools/checkov/parser.py

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -120,22 +120,6 @@ def get_item(vuln, test, check_type):
120120
if "check_name" in vuln:
121121
description += f"{vuln['check_name']}\n"
122122

123-
mitigation = ""
124-
if "guideline" in vuln:
125-
plain_url = f"{vuln['guideline']}.plain.html".replace("docs.prismacloud.io", "docs.prismacloud.io/docs")
126-
plain_req = requests.get(plain_url)
127-
plain_html = plain_req.text
128-
129-
soup = BeautifulSoup(plain_html, 'html.parser')
130-
131-
# More detailed description
132-
d_txt = soup.find(id='description').parent
133-
description += str(d_txt)
134-
135-
# More detailed mitigation
136-
m_txt = soup.findAll(id=lambda x: x and x.startswith('fix'))[0].parent
137-
mitigation += str(m_txt) + "\n"
138-
139123
if "benchmarks" in vuln:
140124
bms = vuln['benchmarks'].keys()
141125
if len(bms) > 0:
@@ -158,6 +142,8 @@ def get_item(vuln, test, check_type):
158142
if "severity" in vuln and vuln["severity"] is not None:
159143
severity = vuln["severity"].capitalize()
160144

145+
mitigation = ""
146+
161147
references = vuln.get("guideline", "")
162148
return Finding(
163149
title=title,

0 commit comments

Comments
 (0)