MCPcopy Create free account
hub / github.com/SourceCode-AI/aura / get_severity

Function get_severity

aura/analyzers/detections.py:155–167  ·  view source on GitHub ↗
(detection: Detection)

Source from the content-addressed store, hash-verified

153
154
155def get_severity(detection: Detection) -> str:
156 if detection._severity is not None:
157 return detection._severity
158
159 for category, catdef in config.CFG["severities"].items():
160 if "score" in catdef and detection.score >= catdef["score"]:
161 return category
162 if detection.name in catdef.get("detections", []):
163 return category
164 if set(catdef.get("tags", [])).intersection(detection.tags):
165 return category
166
167 return "unknown"

Callers 3

_asdictMethod · 0.85
outputMethod · 0.85
post_analysisMethod · 0.85

Calls 1

getMethod · 0.80

Tested by

no test coverage detected