mirror of
https://github.com/All-Hands-AI/OpenHands.git
synced 2026-01-07 22:14:03 -05:00
refactor: Update expected cygnal output format (#12060)
This commit is contained in:
@@ -134,9 +134,7 @@ class GraySwanAnalyzer(SecurityAnalyzer):
|
|||||||
async with response as resp:
|
async with response as resp:
|
||||||
if resp.status == 200:
|
if resp.status == 200:
|
||||||
result = await resp.json()
|
result = await resp.json()
|
||||||
violation_score = (
|
violation_score = result.get('violation', 0.0)
|
||||||
result.get('output', {}).get('data', {}).get('violation', 0.0)
|
|
||||||
)
|
|
||||||
risk_level = self._map_violation_to_risk(violation_score)
|
risk_level = self._map_violation_to_risk(violation_score)
|
||||||
if 'ipi' in result and result['ipi']:
|
if 'ipi' in result and result['ipi']:
|
||||||
risk_level = (
|
risk_level = (
|
||||||
|
|||||||
Reference in New Issue
Block a user