diff --git a/synapse/models/risk.py b/synapse/models/risk.py index 726d397df4..53c59bd2e9 100644 --- a/synapse/models/risk.py +++ b/synapse/models/risk.py @@ -141,7 +141,6 @@ def getModelDefs(self): (('risk:threat', 'targets', 'ou:industry'), { 'doc': 'The threat cluster targets the industry.'}), - (('risk:threat', 'targets', None), { 'doc': 'The threat cluster targeted the target node.'}), (('risk:threat', 'uses', None), { @@ -312,6 +311,12 @@ def getModelDefs(self): 'disp': {'hint': 'text'}, 'doc': 'A description of the vulnerability.'}), + ('severity', ('meta:severity', {}), { + 'doc': 'The severity of the vulnerability.'}), + + ('priority', ('meta:priority', {}), { + 'doc': 'The priority of the vulnerability.'}), + ('reporter', ('ou:org', {}), { 'doc': 'The organization reporting on the vulnerability.'}), diff --git a/synapse/tests/test_model_risk.py b/synapse/tests/test_model_risk.py index 35f5cffc32..3c84544baf 100644 --- a/synapse/tests/test_model_risk.py +++ b/synapse/tests/test_model_risk.py @@ -109,10 +109,14 @@ async def addNode(text): risk:vuln={vuln} :cvss:v2 ?= "newp2" :cvss:v3 ?= "newp3.1" + :priority=high + :severity=high ]''') self.none(node.get('cvss:v2')) self.none(node.get('cvss:v3')) + self.eq(40, node.get('severity')) + self.eq(40, node.get('priority')) with self.raises(s_exc.BadTypeValu): node = await addNode(f'''[