Merge pull request #369 from chisholm/malware_os_refs
Change software SCO: os_execution_envs -> operating_system_refsmaster
commit
e782d095ea
|
@ -193,3 +193,22 @@ def test_malware_non_family_no_name():
|
||||||
"is_family": False,
|
"is_family": False,
|
||||||
"malware_types": ["something"],
|
"malware_types": ["something"],
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
|
def test_malware_with_os_refs():
|
||||||
|
software = stix2.parse({
|
||||||
|
"type": "software",
|
||||||
|
"name": "SuperOS",
|
||||||
|
"spec_version": "2.1",
|
||||||
|
})
|
||||||
|
|
||||||
|
malware = stix2.parse({
|
||||||
|
"type": "malware",
|
||||||
|
"id": MALWARE_ID,
|
||||||
|
"spec_version": "2.1",
|
||||||
|
"is_family": False,
|
||||||
|
"malware_types": ["something"],
|
||||||
|
"operating_system_refs": [software],
|
||||||
|
})
|
||||||
|
|
||||||
|
assert malware["operating_system_refs"][0] == software["id"]
|
||||||
|
|
|
@ -460,7 +460,7 @@ class Malware(STIXDomainObject):
|
||||||
('kill_chain_phases', ListProperty(KillChainPhase)),
|
('kill_chain_phases', ListProperty(KillChainPhase)),
|
||||||
('first_seen', TimestampProperty()),
|
('first_seen', TimestampProperty()),
|
||||||
('last_seen', TimestampProperty()),
|
('last_seen', TimestampProperty()),
|
||||||
('os_execution_envs', ListProperty(StringProperty)),
|
('operating_system_refs', ListProperty(ReferenceProperty(valid_types='software', spec_version='2.1'))),
|
||||||
('architecture_execution_envs', ListProperty(StringProperty)),
|
('architecture_execution_envs', ListProperty(StringProperty)),
|
||||||
('implementation_languages', ListProperty(StringProperty)),
|
('implementation_languages', ListProperty(StringProperty)),
|
||||||
('capabilities', ListProperty(StringProperty)),
|
('capabilities', ListProperty(StringProperty)),
|
||||||
|
|
Loading…
Reference in New Issue