Skip to content

Commit db172e0

Browse files
committed
Fix more tests.
1 parent 9ac5ada commit db172e0

1 file changed

Lines changed: 10 additions & 10 deletions

File tree

tests/test_applets/test_applet_findings.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -194,16 +194,16 @@ async def after_scan_2(self):
194194

195195
# --- risk field tests ---
196196

197-
# after scan 2, www2 and api have CRITICAL findings → CVSS 10.0
197+
# after scan 2, www2 and api have CRITICAL findings → CVSS 9.0
198198
www2_asset = await self.bbot_server.get_asset(host="www2.evilcorp.com")
199-
assert www2_asset.risk == 10.0
199+
assert www2_asset.risk == 9.0
200200
assert www2_asset.risk_override == False
201201
api_asset = await self.bbot_server.get_asset(host="api.evilcorp.com")
202-
assert api_asset.risk == 10.0
202+
assert api_asset.risk == 9.0
203203
assert api_asset.risk_override == False
204-
# www only had HIGH findings from scan 1 → CVSS 8.9
204+
# www only had HIGH findings from scan 1 → CVSS 7.0
205205
www_asset = await self.bbot_server.get_asset(host="www.evilcorp.com")
206-
assert www_asset.risk == 8.9
206+
assert www_asset.risk == 7.0
207207
assert www_asset.risk_override == False
208208

209209
# manually set risk on www2 (float 0.0-10.0)
@@ -235,18 +235,18 @@ async def after_scan_2(self):
235235
assert www2_asset.risk is None
236236
assert www2_asset.risk_override == True
237237

238-
# clear override — should revert to CVSS-derived value (CRITICAL → 10.0)
238+
# clear override — should revert to CVSS-derived value (CRITICAL → 9.0)
239239
result = await self.bbot_server.set_risk(host="www2.evilcorp.com")
240-
assert result["risk"] == 10.0
240+
assert result["risk"] == 9.0
241241
assert result["risk_override"] == False
242242
www2_asset = await self.bbot_server.get_asset(host="www2.evilcorp.com")
243-
assert www2_asset.risk == 10.0
243+
assert www2_asset.risk == 9.0
244244
assert www2_asset.risk_override == False
245245

246246
# verify RISK_UPDATED activities were emitted
247-
# expected: 2 from scan 1 auto-sync (www + www2: None->8.9),
247+
# expected: 2 from scan 1 auto-sync (www + www2: None->7.0),
248248
# 4 from after_scan_1 manual set_risk (api: set 5.0, clear, set None, clear),
249-
# 2 from scan 2 auto-sync (www2: 8.9->10.0, api: None->10.0),
249+
# 2 from scan 2 auto-sync (www2: 7.0->9.0, api: None->9.0),
250250
# 6 from after_scan_2 manual set_risk (7.5, 3.1, 0.0, 10.0, None, clear)
251251
await asyncio.sleep(1.0)
252252
activities = [a async for a in self.bbot_server.list_activities() if a.type == "RISK_UPDATED"]

0 commit comments

Comments
 (0)