stix_schema_spy 1.1 → 1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +8 -8
- data/config/1.0/uber_schema.xsd +131 -0
- data/config/1.0.1/uber_schema.xsd +135 -0
- data/lib/stix_schema_spy/models/complex_type.rb +1 -1
- data/lib/stix_schema_spy/models/has_children.rb +1 -1
- data/lib/stix_schema_spy/models/node.rb +5 -1
- data/lib/stix_schema_spy/models/schema.rb +38 -26
- data/lib/stix_schema_spy/models/type.rb +8 -5
- data/lib/stix_schema_spy/version.rb +1 -1
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
ZmI1MjQxMGE0M2YxYjVjMDljZjM4OGEwODBjMTNiZmNjNjc5ODZkYg==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
YTVhMzc4NmY1ZTRkMDY0MGU3ODMxZWI3OTcwZGI5N2FiYjEyMmYzMA==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
ZDg4YzhhY2E3YTI0MzIxMjkwN2U0MjI5MTQ0OTNjZmQ5N2ZlNTU5ZTc3YTlk
|
10
|
+
NTQ0Zjg2Y2UzYzEyNDQ5YzU5N2I3NjY1OGM2OTQ4OGI2NWQ3Y2FmMWEzYzFi
|
11
|
+
OWI2ZDYyZDhkN2M3ZjczYmFhZTcwMzVlNjA0NmMzNDIxYjE1NzY=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
YjQ3ZTg0NmNlZmQyNWMyZmQyYzQ1YzUzMDgxMDZmMzMwZDhiNWFiZDFjNDc1
|
14
|
+
OThiZDgzOTVhNzE5MjM5NmJkZjk5OTRmZTI1Zjg4ZDNkNTExNTVmNWU0OWQz
|
15
|
+
MGQ0YTM4NjU4ZWU4NGY5Y2VjZDI0ZTAzMzcxMDg1NTUzMmU2YTI=
|
@@ -0,0 +1,131 @@
|
|
1
|
+
<?xml version="1.0"?>
|
2
|
+
<schema xmlns="http://www.w3.org/2001/XMLSchema">
|
3
|
+
<import namespace="http://stix.mitre.org/Campaign-1" schemaLocation="stix/campaign.xsd"/>
|
4
|
+
<import namespace="http://stix.mitre.org/CourseOfAction-1" schemaLocation="stix/course_of_action.xsd"/>
|
5
|
+
<import namespace="http://cybox.mitre.org/common-2" schemaLocation="stix/cybox/cybox_common.xsd"/>
|
6
|
+
<import namespace="http://cybox.mitre.org/cybox-2" schemaLocation="stix/cybox/cybox_core.xsd"/>
|
7
|
+
<import namespace="http://cybox.mitre.org/default_vocabularies-2" schemaLocation="stix/cybox/cybox_default_vocabularies.xsd"/>
|
8
|
+
<import namespace="http://cybox.mitre.org/extensions/platform#CPE2.3-1" schemaLocation="stix/cybox/extensions/platform/cpe2.3.xsd"/>
|
9
|
+
<import namespace="http://cybox.mitre.org/objects#AccountObject-2" schemaLocation="stix/cybox/objects/Account_Object.xsd"/>
|
10
|
+
<import namespace="http://cybox.mitre.org/objects#AddressObject-2" schemaLocation="stix/cybox/objects/Address_Object.xsd"/>
|
11
|
+
<import namespace="http://cybox.mitre.org/objects#APIObject-2" schemaLocation="stix/cybox/objects/API_Object.xsd"/>
|
12
|
+
<import namespace="http://cybox.mitre.org/objects#ArtifactObject-2" schemaLocation="stix/cybox/objects/Artifact_Object.xsd"/>
|
13
|
+
<import namespace="http://cybox.mitre.org/objects#CodeObject-2" schemaLocation="stix/cybox/objects/Code_Object.xsd"/>
|
14
|
+
<import namespace="http://cybox.mitre.org/objects#CustomObject-1" schemaLocation="stix/cybox/objects/Custom_Object.xsd"/>
|
15
|
+
<import namespace="http://cybox.mitre.org/objects#DeviceObject-2" schemaLocation="stix/cybox/objects/Device_Object.xsd"/>
|
16
|
+
<import namespace="http://cybox.mitre.org/objects#DiskObject-2" schemaLocation="stix/cybox/objects/Disk_Object.xsd"/>
|
17
|
+
<import namespace="http://cybox.mitre.org/objects#DiskPartitionObject-2" schemaLocation="stix/cybox/objects/Disk_Partition_Object.xsd"/>
|
18
|
+
<import namespace="http://cybox.mitre.org/objects#DNSCacheObject-2" schemaLocation="stix/cybox/objects/DNS_Cache_Object.xsd"/>
|
19
|
+
<import namespace="http://cybox.mitre.org/objects#DNSQueryObject-2" schemaLocation="stix/cybox/objects/DNS_Query_Object.xsd"/>
|
20
|
+
<import namespace="http://cybox.mitre.org/objects#DNSRecordObject-2" schemaLocation="stix/cybox/objects/DNS_Record_Object.xsd"/>
|
21
|
+
<import namespace="http://cybox.mitre.org/objects#EmailMessageObject-2" schemaLocation="stix/cybox/objects/Email_Message_Object.xsd"/>
|
22
|
+
<import namespace="http://cybox.mitre.org/objects#FileObject-2" schemaLocation="stix/cybox/objects/File_Object.xsd"/>
|
23
|
+
<import namespace="http://cybox.mitre.org/objects#GUIDialogboxObject-2" schemaLocation="stix/cybox/objects/GUI_Dialogbox_Object.xsd"/>
|
24
|
+
<import namespace="http://cybox.mitre.org/objects#GUIObject-2" schemaLocation="stix/cybox/objects/GUI_Object.xsd"/>
|
25
|
+
<import namespace="http://cybox.mitre.org/objects#GUIWindowObject-2" schemaLocation="stix/cybox/objects/GUI_Window_Object.xsd"/>
|
26
|
+
<import namespace="http://cybox.mitre.org/objects#HTTPSessionObject-2" schemaLocation="stix/cybox/objects/HTTP_Session_Object.xsd"/>
|
27
|
+
<import namespace="http://cybox.mitre.org/objects#LibraryObject-2" schemaLocation="stix/cybox/objects/Library_Object.xsd"/>
|
28
|
+
<import namespace="http://cybox.mitre.org/objects#LinkObject-1" schemaLocation="stix/cybox/objects/Link_Object.xsd"/>
|
29
|
+
<import namespace="http://cybox.mitre.org/objects#LinuxPackageObject-2" schemaLocation="stix/cybox/objects/Linux_Package_Object.xsd"/>
|
30
|
+
<import namespace="http://cybox.mitre.org/objects#MemoryObject-2" schemaLocation="stix/cybox/objects/Memory_Object.xsd"/>
|
31
|
+
<import namespace="http://cybox.mitre.org/objects#MutexObject-2" schemaLocation="stix/cybox/objects/Mutex_Object.xsd"/>
|
32
|
+
<import namespace="http://cybox.mitre.org/objects#NetworkConnectionObject-2" schemaLocation="stix/cybox/objects/Network_Connection_Object.xsd"/>
|
33
|
+
<import namespace="http://cybox.mitre.org/objects#NetworkFlowObject-2" schemaLocation="stix/cybox/objects/Network_Flow_Object.xsd"/>
|
34
|
+
<import namespace="http://cybox.mitre.org/objects#PacketObject-2" schemaLocation="stix/cybox/objects/Network_Packet_Object.xsd"/>
|
35
|
+
<import namespace="http://cybox.mitre.org/objects#NetworkRouteEntryObject-2" schemaLocation="stix/cybox/objects/Network_Route_Entry_Object.xsd"/>
|
36
|
+
<import namespace="http://cybox.mitre.org/objects#NetworkRouteObject-2" schemaLocation="stix/cybox/objects/Network_Route_Object.xsd"/>
|
37
|
+
<import namespace="http://cybox.mitre.org/objects#NetworkSocketObject-2" schemaLocation="stix/cybox/objects/Network_Socket_Object.xsd"/>
|
38
|
+
<import namespace="http://cybox.mitre.org/objects#NetworkSubnetObject-2" schemaLocation="stix/cybox/objects/Network_Subnet_Object.xsd"/>
|
39
|
+
<import namespace="http://cybox.mitre.org/objects#PDFFileObject-1" schemaLocation="stix/cybox/objects/PDF_File_Object.xsd"/>
|
40
|
+
<import namespace="http://cybox.mitre.org/objects#PipeObject-2" schemaLocation="stix/cybox/objects/Pipe_Object.xsd"/>
|
41
|
+
<import namespace="http://cybox.mitre.org/objects#PortObject-2" schemaLocation="stix/cybox/objects/Port_Object.xsd"/>
|
42
|
+
<import namespace="http://cybox.mitre.org/objects#ProcessObject-2" schemaLocation="stix/cybox/objects/Process_Object.xsd"/>
|
43
|
+
<import namespace="http://cybox.mitre.org/objects#ProductObject-2" schemaLocation="stix/cybox/objects/Product_Object.xsd"/>
|
44
|
+
<import namespace="http://cybox.mitre.org/objects#SemaphoreObject-2" schemaLocation="stix/cybox/objects/Semaphore_Object.xsd"/>
|
45
|
+
<import namespace="http://cybox.mitre.org/objects#SocketAddressObject-1" schemaLocation="stix/cybox/objects/Socket_Address_Object.xsd"/>
|
46
|
+
<import namespace="http://cybox.mitre.org/objects#SystemObject-2" schemaLocation="stix/cybox/objects/System_Object.xsd"/>
|
47
|
+
<import namespace="http://cybox.mitre.org/objects#UnixFileObject-2" schemaLocation="stix/cybox/objects/Unix_File_Object.xsd"/>
|
48
|
+
<import namespace="http://cybox.mitre.org/objects#UnixNetworkRouteEntryObject-2" schemaLocation="stix/cybox/objects/Unix_Network_Route_Entry_Object.xsd"/>
|
49
|
+
<import namespace="http://cybox.mitre.org/objects#UnixPipeObject-2" schemaLocation="stix/cybox/objects/Unix_Pipe_Object.xsd"/>
|
50
|
+
<import namespace="http://cybox.mitre.org/objects#UnixProcessObject-2" schemaLocation="stix/cybox/objects/Unix_Process_Object.xsd"/>
|
51
|
+
<import namespace="http://cybox.mitre.org/objects#UnixUserAccountObject-2" schemaLocation="stix/cybox/objects/Unix_User_Account_Object.xsd"/>
|
52
|
+
<import namespace="http://cybox.mitre.org/objects#UnixVolumeObject-2" schemaLocation="stix/cybox/objects/Unix_Volume_Object.xsd"/>
|
53
|
+
<import namespace="http://cybox.mitre.org/objects#URIObject-2" schemaLocation="stix/cybox/objects/URI_Object.xsd"/>
|
54
|
+
<import namespace="http://cybox.mitre.org/objects#UserAccountObject-2" schemaLocation="stix/cybox/objects/User_Account_Object.xsd"/>
|
55
|
+
<import namespace="http://cybox.mitre.org/objects#UserSessionObject-2" schemaLocation="stix/cybox/objects/User_Session_Object.xsd"/>
|
56
|
+
<import namespace="http://cybox.mitre.org/objects#VolumeObject-2" schemaLocation="stix/cybox/objects/Volume_Object.xsd"/>
|
57
|
+
<import namespace="http://cybox.mitre.org/objects#WhoisObject-2" schemaLocation="stix/cybox/objects/Whois_Object.xsd"/>
|
58
|
+
<import namespace="http://cybox.mitre.org/objects#WinComputerAccountObject-2" schemaLocation="stix/cybox/objects/Win_Computer_Account_Object.xsd"/>
|
59
|
+
<import namespace="http://cybox.mitre.org/objects#WinCriticalSectionObject-2" schemaLocation="stix/cybox/objects/Win_Critical_Section_Object.xsd"/>
|
60
|
+
<import namespace="http://cybox.mitre.org/objects#WinDriverObject-2" schemaLocation="stix/cybox/objects/Win_Driver_Object.xsd"/>
|
61
|
+
<import namespace="http://cybox.mitre.org/objects#WinEventLogObject-2" schemaLocation="stix/cybox/objects/Win_Event_Log_Object.xsd"/>
|
62
|
+
<import namespace="http://cybox.mitre.org/objects#WinEventObject-2" schemaLocation="stix/cybox/objects/Win_Event_Object.xsd"/>
|
63
|
+
<import namespace="http://cybox.mitre.org/objects#WinExecutableFileObject-2" schemaLocation="stix/cybox/objects/Win_Executable_File_Object.xsd"/>
|
64
|
+
<import namespace="http://cybox.mitre.org/objects#WinFileObject-2" schemaLocation="stix/cybox/objects/Win_File_Object.xsd"/>
|
65
|
+
<import namespace="http://cybox.mitre.org/objects#WinHandleObject-2" schemaLocation="stix/cybox/objects/Win_Handle_Object.xsd"/>
|
66
|
+
<import namespace="http://cybox.mitre.org/objects#WinKernelHookObject-2" schemaLocation="stix/cybox/objects/Win_Kernel_Hook_Object.xsd"/>
|
67
|
+
<import namespace="http://cybox.mitre.org/objects#WinKernelObject-2" schemaLocation="stix/cybox/objects/Win_Kernel_Object.xsd"/>
|
68
|
+
<import namespace="http://cybox.mitre.org/objects#WinMailslotObject-2" schemaLocation="stix/cybox/objects/Win_Mailslot_Object.xsd"/>
|
69
|
+
<import namespace="http://cybox.mitre.org/objects#WinMemoryPageRegionObject-2" schemaLocation="stix/cybox/objects/Win_Memory_Page_Region_Object.xsd"/>
|
70
|
+
<import namespace="http://cybox.mitre.org/objects#WinMutexObject-2" schemaLocation="stix/cybox/objects/Win_Mutex_Object.xsd"/>
|
71
|
+
<import namespace="http://cybox.mitre.org/objects#WinNetworkRouteEntryObject-2" schemaLocation="stix/cybox/objects/Win_Network_Route_Entry_Object.xsd"/>
|
72
|
+
<import namespace="http://cybox.mitre.org/objects#WinNetworkShareObject-2" schemaLocation="stix/cybox/objects/Win_Network_Share_Object.xsd"/>
|
73
|
+
<import namespace="http://cybox.mitre.org/objects#WinPipeObject-2" schemaLocation="stix/cybox/objects/Win_Pipe_Object.xsd"/>
|
74
|
+
<import namespace="http://cybox.mitre.org/objects#WinPrefetchObject-2" schemaLocation="stix/cybox/objects/Win_Prefetch_Object.xsd"/>
|
75
|
+
<import namespace="http://cybox.mitre.org/objects#WinProcessObject-2" schemaLocation="stix/cybox/objects/Win_Process_Object.xsd"/>
|
76
|
+
<import namespace="http://cybox.mitre.org/objects#WinRegistryKeyObject-2" schemaLocation="stix/cybox/objects/Win_Registry_Key_Object.xsd"/>
|
77
|
+
<import namespace="http://cybox.mitre.org/objects#WinSemaphoreObject-2" schemaLocation="stix/cybox/objects/Win_Semaphore_Object.xsd"/>
|
78
|
+
<import namespace="http://cybox.mitre.org/objects#WinServiceObject-2" schemaLocation="stix/cybox/objects/Win_Service_Object.xsd"/>
|
79
|
+
<import namespace="http://cybox.mitre.org/objects#WinSystemObject-2" schemaLocation="stix/cybox/objects/Win_System_Object.xsd"/>
|
80
|
+
<import namespace="http://cybox.mitre.org/objects#WinSystemRestoreObject-2" schemaLocation="stix/cybox/objects/Win_System_Restore_Object.xsd"/>
|
81
|
+
<import namespace="http://cybox.mitre.org/objects#WinTaskObject-2" schemaLocation="stix/cybox/objects/Win_Task_Object.xsd"/>
|
82
|
+
<import namespace="http://cybox.mitre.org/objects#WinThreadObject-2" schemaLocation="stix/cybox/objects/Win_Thread_Object.xsd"/>
|
83
|
+
<import namespace="http://cybox.mitre.org/objects#WinUserAccountObject-2" schemaLocation="stix/cybox/objects/Win_User_Account_Object.xsd"/>
|
84
|
+
<import namespace="http://cybox.mitre.org/objects#WinVolumeObject-2" schemaLocation="stix/cybox/objects/Win_Volume_Object.xsd"/>
|
85
|
+
<import namespace="http://cybox.mitre.org/objects#WinWaitableTimerObject-2" schemaLocation="stix/cybox/objects/Win_Waitable_Timer_Object.xsd"/>
|
86
|
+
<import namespace="http://cybox.mitre.org/objects#X509CertificateObject-2" schemaLocation="stix/cybox/objects/X509_Certificate_Object.xsd"/>
|
87
|
+
<import namespace="http://data-marking.mitre.org/Marking-1" schemaLocation="stix/data_marking.xsd"/>
|
88
|
+
<import namespace="http://stix.mitre.org/ExploitTarget-1" schemaLocation="stix/exploit_target.xsd"/>
|
89
|
+
<import namespace="http://stix.mitre.org/extensions/Address#CIQAddress3.0-1" schemaLocation="stix/extensions/address/ciq_address_3.0.xsd"/>
|
90
|
+
<import namespace="http://stix.mitre.org/extensions/AP#CAPEC2.5-1" schemaLocation="stix/extensions/attack_pattern/capec_2.5.xsd"/>
|
91
|
+
<import namespace="http://stix.mitre.org/extensions/Identity#CIQIdentity3.0-1" schemaLocation="stix/extensions/identity/ciq_identity_3.0.xsd"/>
|
92
|
+
<import namespace="http://stix.mitre.org/extensions/Malware#MAEC4.0-1" schemaLocation="stix/extensions/malware/maec_4.0.xsd"/>
|
93
|
+
<import namespace="http://data-marking.mitre.org/extensions/MarkingStructure#Simple-1" schemaLocation="stix/extensions/marking/simple_marking.xsd"/>
|
94
|
+
<import namespace="http://data-marking.mitre.org/extensions/MarkingStructure#TLP-1" schemaLocation="stix/extensions/marking/tlp.xsd"/>
|
95
|
+
<import namespace="http://stix.mitre.org/extensions/StructuredCOA#Generic-1" schemaLocation="stix/extensions/structured_coa/generic.xsd"/>
|
96
|
+
<import namespace="http://stix.mitre.org/extensions/TestMechanism#Generic-1" schemaLocation="stix/extensions/test_mechanism/generic.xsd"/>
|
97
|
+
<import namespace="http://stix.mitre.org/extensions/TestMechanism#OpenIOC2010-1" schemaLocation="stix/extensions/test_mechanism/open_ioc_2010.xsd"/>
|
98
|
+
<import namespace="http://stix.mitre.org/extensions/TestMechanism#OVAL5.10-1" schemaLocation="stix/extensions/test_mechanism/oval_5.10.xsd"/>
|
99
|
+
<import namespace="http://stix.mitre.org/extensions/TestMechanism#Snort-1" schemaLocation="stix/extensions/test_mechanism/snort.xsd"/>
|
100
|
+
<import namespace="http://stix.mitre.org/extensions/TestMechanism#YARA-1" schemaLocation="stix/extensions/test_mechanism/yara.xsd"/>
|
101
|
+
<import namespace="http://stix.mitre.org/extensions/Vulnerability#CVRF-1" schemaLocation="stix/extensions/vulnerability/cvrf_1.1.xsd"/>
|
102
|
+
<import namespace="http://capec.mitre.org/capec-2" schemaLocation="stix/external/capec_2.5/ap_schema_v2.5.xsd"/>
|
103
|
+
<import namespace="http://www.icasi.org/CVRF/schema/common/1.1" schemaLocation="stix/external/cvrf_1.1/common.xsd"/>
|
104
|
+
<import namespace="http://cpe.mitre.org/language/2.0" schemaLocation="stix/external/cvrf_1.1/cpe-language_2.2a.xsd"/>
|
105
|
+
<import namespace="http://www.icasi.org/CVRF/schema/cvrf/1.1" schemaLocation="stix/external/cvrf_1.1/cvrf.xsd"/>
|
106
|
+
<import namespace="http://scap.nist.gov/schema/cvss-v2/1.0" schemaLocation="stix/external/cvrf_1.1/cvss-v2_0.9.xsd"/>
|
107
|
+
<import namespace="http://purl.org/dc/elements/1.1/" schemaLocation="stix/external/cvrf_1.1/dc.xsd"/>
|
108
|
+
<import namespace="http://www.icasi.org/CVRF/schema/prod/1.1" schemaLocation="stix/external/cvrf_1.1/prod.xsd"/>
|
109
|
+
<import namespace="http://scap.nist.gov/schema/scap-core/1.0" schemaLocation="stix/external/cvrf_1.1/scap-core_0.9.xsd"/>
|
110
|
+
<import namespace="http://www.icasi.org/CVRF/schema/vuln/1.1" schemaLocation="stix/external/cvrf_1.1/vuln.xsd"/>
|
111
|
+
<import namespace="http://www.w3.org/XML/1998/namespace" schemaLocation="stix/external/cvrf_1.1/xml.xsd"/>
|
112
|
+
<import namespace="urn:oasis:names:tc:ciq:ct:3" schemaLocation="stix/external/oasis_ciq_3.0/CommonTypes.xsd"/>
|
113
|
+
<import namespace="urn:oasis:names:tc:ciq:xal:3" schemaLocation="stix/external/oasis_ciq_3.0/xAL.xsd"/>
|
114
|
+
<import namespace="http://www.w3.org/1999/xlink" schemaLocation="stix/external/oasis_ciq_3.0/xlink-2003-12-31.xsd"/>
|
115
|
+
<import namespace="urn:oasis:names:tc:ciq:xnal:3" schemaLocation="stix/external/oasis_ciq_3.0/xNAL.xsd"/>
|
116
|
+
<import namespace="urn:oasis:names:tc:ciq:xnl:3" schemaLocation="stix/external/oasis_ciq_3.0/xNL.xsd"/>
|
117
|
+
<import namespace="urn:oasis:names:tc:ciq:xpil:3" schemaLocation="stix/external/oasis_ciq_3.0/xPIL.xsd"/>
|
118
|
+
<import namespace="http://schemas.mandiant.com/2010/ioc/TR/" schemaLocation="stix/external/open_ioc_2010/ioc-TR.xsd"/>
|
119
|
+
<import namespace="http://schemas.mandiant.com/2010/ioc" schemaLocation="stix/external/open_ioc_2010/ioc.xsd"/>
|
120
|
+
<import namespace="http://oval.mitre.org/XMLSchema/oval-common-5" schemaLocation="stix/external/oval_5.10/oval-common-schema.xsd"/>
|
121
|
+
<import namespace="http://oval.mitre.org/XMLSchema/oval-definitions-5" schemaLocation="stix/external/oval_5.10/oval-definitions-schema.xsd"/>
|
122
|
+
<import namespace="http://oval.mitre.org/XMLSchema/oval-variables-5" schemaLocation="stix/external/oval_5.10/oval-variables-schema.xsd"/>
|
123
|
+
<import namespace="http://www.w3.org/2000/09/xmldsig#" schemaLocation="stix/external/oval_5.10/xmldsig-core-schema.xsd"/>
|
124
|
+
<import namespace="http://stix.mitre.org/Incident-1" schemaLocation="stix/incident.xsd"/>
|
125
|
+
<import namespace="http://stix.mitre.org/Indicator-2" schemaLocation="stix/indicator.xsd"/>
|
126
|
+
<import namespace="http://stix.mitre.org/common-1" schemaLocation="stix/stix_common.xsd"/>
|
127
|
+
<import namespace="http://stix.mitre.org/stix-1" schemaLocation="stix/stix_core.xsd"/>
|
128
|
+
<import namespace="http://stix.mitre.org/default_vocabularies-1" schemaLocation="stix/stix_default_vocabularies.xsd"/>
|
129
|
+
<import namespace="http://stix.mitre.org/ThreatActor-1" schemaLocation="stix/threat_actor.xsd"/>
|
130
|
+
<import namespace="http://stix.mitre.org/TTP-1" schemaLocation="stix/ttp.xsd"/>
|
131
|
+
</schema>
|
@@ -0,0 +1,135 @@
|
|
1
|
+
<?xml version="1.0"?>
|
2
|
+
<schema xmlns="http://www.w3.org/2001/XMLSchema">
|
3
|
+
<import namespace="http://stix.mitre.org/Campaign-1" schemaLocation="stix/campaign.xsd"/>
|
4
|
+
<import namespace="http://stix.mitre.org/CourseOfAction-1" schemaLocation="stix/course_of_action.xsd"/>
|
5
|
+
<import namespace="http://cybox.mitre.org/common-2" schemaLocation="stix/cybox/cybox_common.xsd"/>
|
6
|
+
<import namespace="http://cybox.mitre.org/cybox-2" schemaLocation="stix/cybox/cybox_core.xsd"/>
|
7
|
+
<import namespace="http://cybox.mitre.org/default_vocabularies-2" schemaLocation="stix/cybox/cybox_default_vocabularies.xsd"/>
|
8
|
+
<import namespace="http://cpe.mitre.org/language/2.0" schemaLocation="stix/external/cvrf_1.1/cpe-language_2.2a.xsd"/>
|
9
|
+
<import namespace="http://cpe.mitre.org/naming/2.0" schemaLocation="stix/cybox/extensions/platform/cpe-naming_2.3.xsd"/>
|
10
|
+
<import namespace="http://cybox.mitre.org/extensions/platform#CPE2.3-1" schemaLocation="stix/cybox/extensions/platform/cpe2.3.xsd"/>
|
11
|
+
<import namespace="http://www.w3.org/XML/1998/namespace" schemaLocation="stix/external/cvrf_1.1/xml.xsd"/>
|
12
|
+
<import namespace="http://cybox.mitre.org/objects#AccountObject-2" schemaLocation="stix/cybox/objects/Account_Object.xsd"/>
|
13
|
+
<import namespace="http://cybox.mitre.org/objects#AddressObject-2" schemaLocation="stix/cybox/objects/Address_Object.xsd"/>
|
14
|
+
<import namespace="http://cybox.mitre.org/objects#APIObject-2" schemaLocation="stix/cybox/objects/API_Object.xsd"/>
|
15
|
+
<import namespace="http://cybox.mitre.org/objects#ArtifactObject-2" schemaLocation="stix/cybox/objects/Artifact_Object.xsd"/>
|
16
|
+
<import namespace="http://cybox.mitre.org/objects#CodeObject-2" schemaLocation="stix/cybox/objects/Code_Object.xsd"/>
|
17
|
+
<import namespace="http://cybox.mitre.org/objects#CustomObject-1" schemaLocation="stix/cybox/objects/Custom_Object.xsd"/>
|
18
|
+
<import namespace="http://cybox.mitre.org/objects#DeviceObject-2" schemaLocation="stix/cybox/objects/Device_Object.xsd"/>
|
19
|
+
<import namespace="http://cybox.mitre.org/objects#DiskObject-2" schemaLocation="stix/cybox/objects/Disk_Object.xsd"/>
|
20
|
+
<import namespace="http://cybox.mitre.org/objects#DiskPartitionObject-2" schemaLocation="stix/cybox/objects/Disk_Partition_Object.xsd"/>
|
21
|
+
<import namespace="http://cybox.mitre.org/objects#DNSCacheObject-2" schemaLocation="stix/cybox/objects/DNS_Cache_Object.xsd"/>
|
22
|
+
<import namespace="http://cybox.mitre.org/objects#DNSQueryObject-2" schemaLocation="stix/cybox/objects/DNS_Query_Object.xsd"/>
|
23
|
+
<import namespace="http://cybox.mitre.org/objects#DNSRecordObject-2" schemaLocation="stix/cybox/objects/DNS_Record_Object.xsd"/>
|
24
|
+
<import namespace="http://cybox.mitre.org/objects#EmailMessageObject-2" schemaLocation="stix/cybox/objects/Email_Message_Object.xsd"/>
|
25
|
+
<import namespace="http://cybox.mitre.org/objects#FileObject-2" schemaLocation="stix/cybox/objects/File_Object.xsd"/>
|
26
|
+
<import namespace="http://cybox.mitre.org/objects#GUIDialogboxObject-2" schemaLocation="stix/cybox/objects/GUI_Dialogbox_Object.xsd"/>
|
27
|
+
<import namespace="http://cybox.mitre.org/objects#GUIObject-2" schemaLocation="stix/cybox/objects/GUI_Object.xsd"/>
|
28
|
+
<import namespace="http://cybox.mitre.org/objects#GUIWindowObject-2" schemaLocation="stix/cybox/objects/GUI_Window_Object.xsd"/>
|
29
|
+
<import namespace="http://cybox.mitre.org/objects#HTTPSessionObject-2" schemaLocation="stix/cybox/objects/HTTP_Session_Object.xsd"/>
|
30
|
+
<import namespace="http://cybox.mitre.org/objects#LibraryObject-2" schemaLocation="stix/cybox/objects/Library_Object.xsd"/>
|
31
|
+
<import namespace="http://cybox.mitre.org/objects#LinkObject-1" schemaLocation="stix/cybox/objects/Link_Object.xsd"/>
|
32
|
+
<import namespace="http://cybox.mitre.org/objects#LinuxPackageObject-2" schemaLocation="stix/cybox/objects/Linux_Package_Object.xsd"/>
|
33
|
+
<import namespace="http://cybox.mitre.org/objects#MemoryObject-2" schemaLocation="stix/cybox/objects/Memory_Object.xsd"/>
|
34
|
+
<import namespace="http://cybox.mitre.org/objects#MutexObject-2" schemaLocation="stix/cybox/objects/Mutex_Object.xsd"/>
|
35
|
+
<import namespace="http://cybox.mitre.org/objects#NetworkConnectionObject-2" schemaLocation="stix/cybox/objects/Network_Connection_Object.xsd"/>
|
36
|
+
<import namespace="http://cybox.mitre.org/objects#NetworkFlowObject-2" schemaLocation="stix/cybox/objects/Network_Flow_Object.xsd"/>
|
37
|
+
<import namespace="http://cybox.mitre.org/objects#PacketObject-2" schemaLocation="stix/cybox/objects/Network_Packet_Object.xsd"/>
|
38
|
+
<import namespace="http://cybox.mitre.org/objects#NetworkRouteEntryObject-2" schemaLocation="stix/cybox/objects/Network_Route_Entry_Object.xsd"/>
|
39
|
+
<import namespace="http://cybox.mitre.org/objects#NetworkRouteObject-2" schemaLocation="stix/cybox/objects/Network_Route_Object.xsd"/>
|
40
|
+
<import namespace="http://cybox.mitre.org/objects#NetworkSocketObject-2" schemaLocation="stix/cybox/objects/Network_Socket_Object.xsd"/>
|
41
|
+
<import namespace="http://cybox.mitre.org/objects#NetworkSubnetObject-2" schemaLocation="stix/cybox/objects/Network_Subnet_Object.xsd"/>
|
42
|
+
<import namespace="http://cybox.mitre.org/objects#PDFFileObject-1" schemaLocation="stix/cybox/objects/PDF_File_Object.xsd"/>
|
43
|
+
<import namespace="http://cybox.mitre.org/objects#PipeObject-2" schemaLocation="stix/cybox/objects/Pipe_Object.xsd"/>
|
44
|
+
<import namespace="http://cybox.mitre.org/objects#PortObject-2" schemaLocation="stix/cybox/objects/Port_Object.xsd"/>
|
45
|
+
<import namespace="http://cybox.mitre.org/objects#ProcessObject-2" schemaLocation="stix/cybox/objects/Process_Object.xsd"/>
|
46
|
+
<import namespace="http://cybox.mitre.org/objects#ProductObject-2" schemaLocation="stix/cybox/objects/Product_Object.xsd"/>
|
47
|
+
<import namespace="http://cybox.mitre.org/objects#SemaphoreObject-2" schemaLocation="stix/cybox/objects/Semaphore_Object.xsd"/>
|
48
|
+
<import namespace="http://cybox.mitre.org/objects#SocketAddressObject-1" schemaLocation="stix/cybox/objects/Socket_Address_Object.xsd"/>
|
49
|
+
<import namespace="http://cybox.mitre.org/objects#SystemObject-2" schemaLocation="stix/cybox/objects/System_Object.xsd"/>
|
50
|
+
<import namespace="http://cybox.mitre.org/objects#UnixFileObject-2" schemaLocation="stix/cybox/objects/Unix_File_Object.xsd"/>
|
51
|
+
<import namespace="http://cybox.mitre.org/objects#UnixNetworkRouteEntryObject-2" schemaLocation="stix/cybox/objects/Unix_Network_Route_Entry_Object.xsd"/>
|
52
|
+
<import namespace="http://cybox.mitre.org/objects#UnixPipeObject-2" schemaLocation="stix/cybox/objects/Unix_Pipe_Object.xsd"/>
|
53
|
+
<import namespace="http://cybox.mitre.org/objects#UnixProcessObject-2" schemaLocation="stix/cybox/objects/Unix_Process_Object.xsd"/>
|
54
|
+
<import namespace="http://cybox.mitre.org/objects#UnixUserAccountObject-2" schemaLocation="stix/cybox/objects/Unix_User_Account_Object.xsd"/>
|
55
|
+
<import namespace="http://cybox.mitre.org/objects#UnixVolumeObject-2" schemaLocation="stix/cybox/objects/Unix_Volume_Object.xsd"/>
|
56
|
+
<import namespace="http://cybox.mitre.org/objects#URIObject-2" schemaLocation="stix/cybox/objects/URI_Object.xsd"/>
|
57
|
+
<import namespace="http://cybox.mitre.org/objects#UserAccountObject-2" schemaLocation="stix/cybox/objects/User_Account_Object.xsd"/>
|
58
|
+
<import namespace="http://cybox.mitre.org/objects#UserSessionObject-2" schemaLocation="stix/cybox/objects/User_Session_Object.xsd"/>
|
59
|
+
<import namespace="http://cybox.mitre.org/objects#VolumeObject-2" schemaLocation="stix/cybox/objects/Volume_Object.xsd"/>
|
60
|
+
<import namespace="http://cybox.mitre.org/objects#WhoisObject-2" schemaLocation="stix/cybox/objects/Whois_Object.xsd"/>
|
61
|
+
<import namespace="http://cybox.mitre.org/objects#WinComputerAccountObject-2" schemaLocation="stix/cybox/objects/Win_Computer_Account_Object.xsd"/>
|
62
|
+
<import namespace="http://cybox.mitre.org/objects#WinCriticalSectionObject-2" schemaLocation="stix/cybox/objects/Win_Critical_Section_Object.xsd"/>
|
63
|
+
<import namespace="http://cybox.mitre.org/objects#WinDriverObject-2" schemaLocation="stix/cybox/objects/Win_Driver_Object.xsd"/>
|
64
|
+
<import namespace="http://cybox.mitre.org/objects#WinEventLogObject-2" schemaLocation="stix/cybox/objects/Win_Event_Log_Object.xsd"/>
|
65
|
+
<import namespace="http://cybox.mitre.org/objects#WinEventObject-2" schemaLocation="stix/cybox/objects/Win_Event_Object.xsd"/>
|
66
|
+
<import namespace="http://cybox.mitre.org/objects#WinExecutableFileObject-2" schemaLocation="stix/cybox/objects/Win_Executable_File_Object.xsd"/>
|
67
|
+
<import namespace="http://cybox.mitre.org/objects#WinFileObject-2" schemaLocation="stix/cybox/objects/Win_File_Object.xsd"/>
|
68
|
+
<import namespace="http://cybox.mitre.org/objects#WinHandleObject-2" schemaLocation="stix/cybox/objects/Win_Handle_Object.xsd"/>
|
69
|
+
<import namespace="http://cybox.mitre.org/objects#WinKernelHookObject-2" schemaLocation="stix/cybox/objects/Win_Kernel_Hook_Object.xsd"/>
|
70
|
+
<import namespace="http://cybox.mitre.org/objects#WinKernelObject-2" schemaLocation="stix/cybox/objects/Win_Kernel_Object.xsd"/>
|
71
|
+
<import namespace="http://cybox.mitre.org/objects#WinMailslotObject-2" schemaLocation="stix/cybox/objects/Win_Mailslot_Object.xsd"/>
|
72
|
+
<import namespace="http://cybox.mitre.org/objects#WinMemoryPageRegionObject-2" schemaLocation="stix/cybox/objects/Win_Memory_Page_Region_Object.xsd"/>
|
73
|
+
<import namespace="http://cybox.mitre.org/objects#WinMutexObject-2" schemaLocation="stix/cybox/objects/Win_Mutex_Object.xsd"/>
|
74
|
+
<import namespace="http://cybox.mitre.org/objects#WinNetworkRouteEntryObject-2" schemaLocation="stix/cybox/objects/Win_Network_Route_Entry_Object.xsd"/>
|
75
|
+
<import namespace="http://cybox.mitre.org/objects#WinNetworkShareObject-2" schemaLocation="stix/cybox/objects/Win_Network_Share_Object.xsd"/>
|
76
|
+
<import namespace="http://cybox.mitre.org/objects#WinPipeObject-2" schemaLocation="stix/cybox/objects/Win_Pipe_Object.xsd"/>
|
77
|
+
<import namespace="http://cybox.mitre.org/objects#WinPrefetchObject-2" schemaLocation="stix/cybox/objects/Win_Prefetch_Object.xsd"/>
|
78
|
+
<import namespace="http://cybox.mitre.org/objects#WinProcessObject-2" schemaLocation="stix/cybox/objects/Win_Process_Object.xsd"/>
|
79
|
+
<import namespace="http://cybox.mitre.org/objects#WinRegistryKeyObject-2" schemaLocation="stix/cybox/objects/Win_Registry_Key_Object.xsd"/>
|
80
|
+
<import namespace="http://cybox.mitre.org/objects#WinSemaphoreObject-2" schemaLocation="stix/cybox/objects/Win_Semaphore_Object.xsd"/>
|
81
|
+
<import namespace="http://cybox.mitre.org/objects#WinServiceObject-2" schemaLocation="stix/cybox/objects/Win_Service_Object.xsd"/>
|
82
|
+
<import namespace="http://cybox.mitre.org/objects#WinSystemObject-2" schemaLocation="stix/cybox/objects/Win_System_Object.xsd"/>
|
83
|
+
<import namespace="http://cybox.mitre.org/objects#WinSystemRestoreObject-2" schemaLocation="stix/cybox/objects/Win_System_Restore_Object.xsd"/>
|
84
|
+
<import namespace="http://cybox.mitre.org/objects#WinTaskObject-2" schemaLocation="stix/cybox/objects/Win_Task_Object.xsd"/>
|
85
|
+
<import namespace="http://cybox.mitre.org/objects#WinThreadObject-2" schemaLocation="stix/cybox/objects/Win_Thread_Object.xsd"/>
|
86
|
+
<import namespace="http://cybox.mitre.org/objects#WinUserAccountObject-2" schemaLocation="stix/cybox/objects/Win_User_Account_Object.xsd"/>
|
87
|
+
<import namespace="http://cybox.mitre.org/objects#WinVolumeObject-2" schemaLocation="stix/cybox/objects/Win_Volume_Object.xsd"/>
|
88
|
+
<import namespace="http://cybox.mitre.org/objects#WinWaitableTimerObject-2" schemaLocation="stix/cybox/objects/Win_Waitable_Timer_Object.xsd"/>
|
89
|
+
<import namespace="http://cybox.mitre.org/objects#X509CertificateObject-2" schemaLocation="stix/cybox/objects/X509_Certificate_Object.xsd"/>
|
90
|
+
<import namespace="http://data-marking.mitre.org/Marking-1" schemaLocation="stix/data_marking.xsd"/>
|
91
|
+
<import namespace="http://stix.mitre.org/ExploitTarget-1" schemaLocation="stix/exploit_target.xsd"/>
|
92
|
+
<import namespace="http://stix.mitre.org/extensions/Address#CIQAddress3.0-1" schemaLocation="stix/extensions/address/ciq_address_3.0.xsd"/>
|
93
|
+
<import namespace="http://stix.mitre.org/extensions/AP#CAPEC2.6-1" schemaLocation="stix/extensions/attack_pattern/capec_2.6.1.xsd"/>
|
94
|
+
<import namespace="http://stix.mitre.org/extensions/Identity#CIQIdentity3.0-1" schemaLocation="stix/extensions/identity/ciq_identity_3.0.xsd"/>
|
95
|
+
<import namespace="http://stix.mitre.org/extensions/Malware#MAEC4.0-1" schemaLocation="stix/extensions/malware/maec_4.0.1.xsd"/>
|
96
|
+
<import namespace="http://data-marking.mitre.org/extensions/MarkingStructure#Simple-1" schemaLocation="stix/extensions/marking/simple_marking.xsd"/>
|
97
|
+
<import namespace="http://data-marking.mitre.org/extensions/MarkingStructure#TLP-1" schemaLocation="stix/extensions/marking/tlp.xsd"/>
|
98
|
+
<import namespace="http://stix.mitre.org/extensions/StructuredCOA#Generic-1" schemaLocation="stix/extensions/structured_coa/generic.xsd"/>
|
99
|
+
<import namespace="http://stix.mitre.org/extensions/TestMechanism#Generic-1" schemaLocation="stix/extensions/test_mechanism/generic.xsd"/>
|
100
|
+
<import namespace="http://stix.mitre.org/extensions/TestMechanism#OpenIOC2010-1" schemaLocation="stix/extensions/test_mechanism/open_ioc_2010.xsd"/>
|
101
|
+
<import namespace="http://stix.mitre.org/extensions/TestMechanism#OVAL5.10-1" schemaLocation="stix/extensions/test_mechanism/oval_5.10.xsd"/>
|
102
|
+
<import namespace="http://stix.mitre.org/extensions/TestMechanism#Snort-1" schemaLocation="stix/extensions/test_mechanism/snort.xsd"/>
|
103
|
+
<import namespace="http://stix.mitre.org/extensions/TestMechanism#YARA-1" schemaLocation="stix/extensions/test_mechanism/yara.xsd"/>
|
104
|
+
<import namespace="http://stix.mitre.org/extensions/Vulnerability#CVRF-1" schemaLocation="stix/extensions/vulnerability/cvrf_1.1.xsd"/>
|
105
|
+
<import namespace="http://capec.mitre.org/capec-2" schemaLocation="stix/external/capec_2.6.1/ap_schema_v2.6.1.xsd"/>
|
106
|
+
<import namespace="http://www.icasi.org/CVRF/schema/common/1.1" schemaLocation="stix/external/cvrf_1.1/common.xsd"/>
|
107
|
+
<import namespace="http://www.icasi.org/CVRF/schema/cvrf/1.1" schemaLocation="stix/external/cvrf_1.1/cvrf.xsd"/>
|
108
|
+
<import namespace="http://scap.nist.gov/schema/cvss-v2/1.0" schemaLocation="stix/external/cvrf_1.1/cvss-v2_0.9.xsd"/>
|
109
|
+
<import namespace="http://purl.org/dc/elements/1.1/" schemaLocation="stix/external/cvrf_1.1/dc.xsd"/>
|
110
|
+
<import namespace="http://www.icasi.org/CVRF/schema/prod/1.1" schemaLocation="stix/external/cvrf_1.1/prod.xsd"/>
|
111
|
+
<import namespace="http://scap.nist.gov/schema/scap-core/1.0" schemaLocation="stix/external/cvrf_1.1/scap-core_0.9.xsd"/>
|
112
|
+
<import namespace="http://www.icasi.org/CVRF/schema/vuln/1.1" schemaLocation="stix/external/cvrf_1.1/vuln.xsd"/>
|
113
|
+
<import namespace="http://maec.mitre.org/XMLSchema/maec-bundle-4" schemaLocation="stix/external/maec_4.0.1/maec_bundle_schema.xsd"/>
|
114
|
+
<import namespace="http://maec.mitre.org/XMLSchema/maec-package-2" schemaLocation="stix/external/maec_4.0.1/maec_package_schema.xsd"/>
|
115
|
+
<import namespace="http://xml/metadataSharing.xsd" schemaLocation="stix/external/maec_4.0.1/metadataSharing.xsd"/>
|
116
|
+
<import namespace="urn:oasis:names:tc:ciq:ct:3" schemaLocation="stix/external/oasis_ciq_3.0/CommonTypes.xsd"/>
|
117
|
+
<import namespace="urn:oasis:names:tc:ciq:xal:3" schemaLocation="stix/external/oasis_ciq_3.0/xAL.xsd"/>
|
118
|
+
<import namespace="http://www.w3.org/1999/xlink" schemaLocation="stix/external/oasis_ciq_3.0/xlink-2003-12-31.xsd"/>
|
119
|
+
<import namespace="urn:oasis:names:tc:ciq:xnal:3" schemaLocation="stix/external/oasis_ciq_3.0/xNAL.xsd"/>
|
120
|
+
<import namespace="urn:oasis:names:tc:ciq:xnl:3" schemaLocation="stix/external/oasis_ciq_3.0/xNL.xsd"/>
|
121
|
+
<import namespace="urn:oasis:names:tc:ciq:xpil:3" schemaLocation="stix/external/oasis_ciq_3.0/xPIL.xsd"/>
|
122
|
+
<import namespace="http://schemas.mandiant.com/2010/ioc/TR/" schemaLocation="stix/external/open_ioc_2010/ioc-TR.xsd"/>
|
123
|
+
<import namespace="http://schemas.mandiant.com/2010/ioc" schemaLocation="stix/external/open_ioc_2010/ioc.xsd"/>
|
124
|
+
<import namespace="http://oval.mitre.org/XMLSchema/oval-common-5" schemaLocation="stix/external/oval_5.10/oval-common-schema.xsd"/>
|
125
|
+
<import namespace="http://oval.mitre.org/XMLSchema/oval-definitions-5" schemaLocation="stix/external/oval_5.10/oval-definitions-schema.xsd"/>
|
126
|
+
<import namespace="http://oval.mitre.org/XMLSchema/oval-variables-5" schemaLocation="stix/external/oval_5.10/oval-variables-schema.xsd"/>
|
127
|
+
<import namespace="http://www.w3.org/2000/09/xmldsig#" schemaLocation="stix/external/oval_5.10/xmldsig-core-schema.xsd"/>
|
128
|
+
<import namespace="http://stix.mitre.org/Incident-1" schemaLocation="stix/incident.xsd"/>
|
129
|
+
<import namespace="http://stix.mitre.org/Indicator-2" schemaLocation="stix/indicator.xsd"/>
|
130
|
+
<import namespace="http://stix.mitre.org/common-1" schemaLocation="stix/stix_common.xsd"/>
|
131
|
+
<import namespace="http://stix.mitre.org/stix-1" schemaLocation="stix/stix_core.xsd"/>
|
132
|
+
<import namespace="http://stix.mitre.org/default_vocabularies-1" schemaLocation="stix/stix_default_vocabularies.xsd"/>
|
133
|
+
<import namespace="http://stix.mitre.org/ThreatActor-1" schemaLocation="stix/threat_actor.xsd"/>
|
134
|
+
<import namespace="http://stix.mitre.org/TTP-1" schemaLocation="stix/ttp.xsd"/>
|
135
|
+
</schema>
|
@@ -38,7 +38,7 @@ module StixSchemaSpy
|
|
38
38
|
|
39
39
|
# Returns a list of possible values for that vocabulary
|
40
40
|
def vocab_values
|
41
|
-
type = Schema.find(self.schema.prefix).find_type(name.gsub("Vocab", "Enum"))
|
41
|
+
type = Schema.find(self.schema.prefix, stix_version).find_type(name.gsub("Vocab", "Enum"))
|
42
42
|
|
43
43
|
if type
|
44
44
|
type.enumeration_values
|
@@ -73,7 +73,7 @@ module StixSchemaSpy
|
|
73
73
|
type = ComplexType.build(child, self.schema)
|
74
74
|
@types[type.name] = type
|
75
75
|
else
|
76
|
-
Type.find(child.attributes['ref'].value).attributes.each {|attrib| @attributes[attrib.name] = attrib}
|
76
|
+
Type.find(child.attributes['ref'].value, nil, stix_version).attributes.each {|attrib| @attributes[attrib.name] = attrib}
|
77
77
|
end
|
78
78
|
else
|
79
79
|
$logger.debug "Skipping: #{child.name}" if defined?($logger)
|
@@ -35,7 +35,7 @@ module StixSchemaSpy
|
|
35
35
|
ExternalType.new(*@xml.attributes['ref'].value.split(':')).use(self)
|
36
36
|
end
|
37
37
|
elsif named_type = @xml.attributes['type']
|
38
|
-
type = schema.find_type(named_type.value) || Type.find(named_type.value)
|
38
|
+
type = schema.find_type(named_type.value) || Type.find(named_type.value, nil, stix_version)
|
39
39
|
type.use(self)
|
40
40
|
else
|
41
41
|
Type.inline(@xml, self.schema, self.name).use(self)
|
@@ -68,5 +68,9 @@ module StixSchemaSpy
|
|
68
68
|
def inspect
|
69
69
|
"#<#{self.class.to_s}:#{object_id} @name=\"#{name}\">"
|
70
70
|
end
|
71
|
+
|
72
|
+
def stix_version
|
73
|
+
schema.stix_version
|
74
|
+
end
|
71
75
|
end
|
72
76
|
end
|
@@ -6,20 +6,22 @@ require 'json'
|
|
6
6
|
module StixSchemaSpy
|
7
7
|
class Schema
|
8
8
|
|
9
|
+
VERSIONS = ['1.1.1', '1.1', '1.0.1', '1.0']
|
10
|
+
|
9
11
|
include StixSchemaSpy::HasChildren
|
10
12
|
include StixSchemaSpy::Util::SchemaNaming
|
11
13
|
|
12
14
|
@@schemas = {}
|
13
15
|
@@schemas_by_file = {}
|
14
16
|
@@config = JSON.parse(File.read(File.join(File.dirname(File.expand_path(__FILE__)), '..', '..', '..', 'config', 'mappings.json')))
|
15
|
-
attr_reader :doc, :prefix, :types, :namespace, :filename
|
17
|
+
attr_reader :doc, :prefix, :types, :namespace, :filename, :stix_version
|
16
18
|
|
17
19
|
@schema_root = {
|
18
20
|
stix: 'http://stix.mitre.org/XMLSchema',
|
19
21
|
cybox: 'http://cybox.mitre.org/XMLSchema'
|
20
22
|
}
|
21
23
|
|
22
|
-
def initialize(schema_location)
|
24
|
+
def initialize(schema_location, version = self.latest_version)
|
23
25
|
# Open the schema
|
24
26
|
@filename = schema_location.split(/[\/\\]/).last
|
25
27
|
@doc = Nokogiri::XML(open(schema_location))
|
@@ -28,11 +30,13 @@ module StixSchemaSpy
|
|
28
30
|
@attributes = {}
|
29
31
|
@types = {}
|
30
32
|
@special_fields = []
|
33
|
+
@stix_version = version
|
31
34
|
|
32
35
|
# Find this document's prefix (if any)
|
33
36
|
@namespace = doc.root.attributes['targetNamespace'].value
|
34
37
|
@prefix = find_prefix(doc)
|
35
|
-
@@schemas[
|
38
|
+
@@schemas[version] ||= {}
|
39
|
+
@@schemas[version][prefix] = self
|
36
40
|
|
37
41
|
# First, process any schemas that this schema imports (unless they're blacklisted)
|
38
42
|
path = schema_location.split('/')[0...-1].join('/')
|
@@ -43,13 +47,14 @@ module StixSchemaSpy
|
|
43
47
|
schema_location = import.attributes['schemaLocation'].value
|
44
48
|
schema_location = "#{path}/#{schema_location}" unless (schema_location =~ /http/)
|
45
49
|
end
|
46
|
-
self.class.build(schema_location) unless self.class.blacklisted?(import.attributes['namespace'].value)
|
50
|
+
self.class.build(schema_location, version) unless self.class.blacklisted?(import.attributes['namespace'].value)
|
47
51
|
end
|
48
52
|
|
49
53
|
doc.xpath('//xs:include', {'xs' => 'http://www.w3.org/2001/XMLSchema'}).each do |include_elem|
|
50
54
|
schema_location = include_elem.attributes['schemaLocation'].value
|
51
55
|
schema_location = "#{path}/#{schema_location}" unless (schema_location =~ /http/)
|
52
|
-
@@schemas_by_file[
|
56
|
+
@@schemas_by_file[version] ||= {}
|
57
|
+
@@schemas_by_file[version][schema_location.split('/').last] = :imported
|
53
58
|
process_doc(Nokogiri::XML(open(schema_location)))
|
54
59
|
end
|
55
60
|
|
@@ -125,12 +130,13 @@ module StixSchemaSpy
|
|
125
130
|
end
|
126
131
|
|
127
132
|
# Build a new schema, cache it
|
128
|
-
def self.build(schema_location)
|
133
|
+
def self.build(schema_location, version = self.latest_version)
|
129
134
|
filename = schema_location.split('/').last
|
130
135
|
if filename == 'generic.xsd'
|
131
136
|
filename = schema_location.split('/')[-2..-1].join('/')
|
132
137
|
end
|
133
|
-
@@schemas_by_file[
|
138
|
+
@@schemas_by_file[version] ||= {}
|
139
|
+
@@schemas_by_file[version][filename] ||= self.new(schema_location, version)
|
134
140
|
end
|
135
141
|
|
136
142
|
def self.schemas_by_file
|
@@ -143,16 +149,17 @@ module StixSchemaSpy
|
|
143
149
|
end
|
144
150
|
|
145
151
|
# Get all schemas
|
146
|
-
def self.all
|
147
|
-
@@schemas.values
|
152
|
+
def self.all(version = self.latest_version)
|
153
|
+
@@schemas[version].values
|
148
154
|
end
|
149
155
|
|
150
156
|
# Find a schema by prefix
|
151
|
-
def self.find(prefix_or_ns)
|
152
|
-
|
153
|
-
|
157
|
+
def self.find(prefix_or_ns, version = self.latest_version)
|
158
|
+
@@schemas[version] ||= {}
|
159
|
+
if @@schemas[version][prefix_or_ns]
|
160
|
+
@@schemas[version][prefix_or_ns]
|
154
161
|
elsif schema_mapping = self.config['schemas'][prefix_or_ns]
|
155
|
-
@@schemas[schema_mapping['prefix']]
|
162
|
+
@@schemas[version][schema_mapping['prefix']]
|
156
163
|
end
|
157
164
|
end
|
158
165
|
|
@@ -160,14 +167,18 @@ module StixSchemaSpy
|
|
160
167
|
self.all.inject({'xs' => 'http://www.w3.org/2001/XMLSchema', 'xsi' => 'http://www.w3.org/2001/XMLSchema-instance'}) {|coll, schema| coll[schema.prefix] = schema.namespace; coll}
|
161
168
|
end
|
162
169
|
|
163
|
-
def self.schema_dir
|
164
|
-
File.join(File.dirname(File.expand_path(__FILE__)), '..', '..', '..', 'config',
|
170
|
+
def self.schema_dir(version = self.latest_version)
|
171
|
+
File.join(File.dirname(File.expand_path(__FILE__)), '..', '..', '..', 'config', version)
|
165
172
|
end
|
166
173
|
|
167
|
-
def self.
|
174
|
+
def self.latest_version
|
168
175
|
"1.1.1"
|
169
176
|
end
|
170
177
|
|
178
|
+
def latest_version
|
179
|
+
self.class.latest_version
|
180
|
+
end
|
181
|
+
|
171
182
|
# Don't process non STIX or CybOX schemas
|
172
183
|
def self.blacklisted?(namespace)
|
173
184
|
blacklist_enabled? && (namespace =~ /(stix)|(cybox)|(data-marking)/).nil?
|
@@ -189,16 +200,17 @@ module StixSchemaSpy
|
|
189
200
|
end
|
190
201
|
end
|
191
202
|
|
192
|
-
def self.preload!
|
193
|
-
|
194
|
-
@preloaded
|
195
|
-
|
196
|
-
Dir.glob("#{schema_dir}/stix/cybox
|
197
|
-
Dir.glob("#{schema_dir}/stix/cybox/
|
198
|
-
Dir.glob("#{schema_dir}/stix/*.xsd").each {|f| self.build(f)}
|
199
|
-
Dir.glob("#{schema_dir}/stix
|
200
|
-
|
201
|
-
Schema.
|
203
|
+
def self.preload!(version = self.latest_version)
|
204
|
+
@preloaded ||= {}
|
205
|
+
return if @preloaded[version]
|
206
|
+
@preloaded[version] = true
|
207
|
+
Dir.glob("#{schema_dir(version)}/stix/cybox/*.xsd").each {|f| self.build(f, version)}
|
208
|
+
Dir.glob("#{schema_dir(version)}/stix/cybox/objects/*.xsd").each {|f| self.build(f, version)}
|
209
|
+
Dir.glob("#{schema_dir(version)}/stix/cybox/extensions/*.xsd").each {|f| self.build(f, version)}
|
210
|
+
Dir.glob("#{schema_dir(version)}/stix/*.xsd").each {|f| self.build(f, version)}
|
211
|
+
Dir.glob("#{schema_dir(version)}/stix/extensions/**/*.xsd").each {|f| self.build(f, version)}
|
212
|
+
@uber_schema = Dir.chdir(schema_dir(version)) {Nokogiri::XML::Schema.new(File.read('uber_schema.xsd'))}
|
213
|
+
Schema.all(version).each(&:preload!)
|
202
214
|
return true
|
203
215
|
end
|
204
216
|
|
@@ -10,8 +10,7 @@ module StixSchemaSpy
|
|
10
10
|
@schema = schema
|
11
11
|
@xml = xml
|
12
12
|
@name = xml.attributes['name'] ? xml.attributes['name'].value : "#{inline}InlineType"
|
13
|
-
@documentation = xml.xpath('./xs:annotation/xs:documentation', {'xs' => 'http://www.w3.org/2001/XMLSchema'}).to_a.map {|node| node.text}.join("\n")
|
14
|
-
|
13
|
+
@documentation = xml.xpath('./xs:annotation/xs:documentation', {'xs' => 'http://www.w3.org/2001/XMLSchema'}).to_a.map {|node| node.text}.join("\n")
|
15
14
|
end
|
16
15
|
|
17
16
|
def full_name
|
@@ -21,7 +20,7 @@ module StixSchemaSpy
|
|
21
20
|
def get_extension(type)
|
22
21
|
if node = type.xpath('xs:complexContent/xs:extension | xs:simpleContent/xs:extension | xs:complexContent/xs:restriction | xs:simpleContent/xs:restriction', {'xs' => 'http://www.w3.org/2001/XMLSchema'}).first
|
23
22
|
base = node.attributes['base'].value
|
24
|
-
parent = schema.find_type(base) || Type.find(base)
|
23
|
+
parent = schema.find_type(base) || Type.find(base, nil, stix_version)
|
25
24
|
if parent.nil?
|
26
25
|
puts "Unable to find base type #{base} for extended type #{full_name}"
|
27
26
|
return false
|
@@ -80,7 +79,7 @@ module StixSchemaSpy
|
|
80
79
|
type
|
81
80
|
end
|
82
81
|
|
83
|
-
def self.find(prefix, name
|
82
|
+
def self.find(prefix, name, version)
|
84
83
|
if name.nil?
|
85
84
|
if prefix.split(':').length == 2
|
86
85
|
prefix, name = prefix.split(':')
|
@@ -90,7 +89,7 @@ module StixSchemaSpy
|
|
90
89
|
end
|
91
90
|
end
|
92
91
|
|
93
|
-
if schema = Schema.find(prefix)
|
92
|
+
if schema = Schema.find(prefix, version)
|
94
93
|
schema.find_type(name)
|
95
94
|
else
|
96
95
|
ExternalType.new(prefix, name)
|
@@ -138,6 +137,10 @@ module StixSchemaSpy
|
|
138
137
|
@counter += 1
|
139
138
|
end
|
140
139
|
|
140
|
+
def stix_version
|
141
|
+
schema.stix_version
|
142
|
+
end
|
143
|
+
|
141
144
|
def inspect
|
142
145
|
"#<#{self.class.to_s}:#{object_id} @name=\"#{full_name}\">"
|
143
146
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: stix_schema_spy
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: '1.
|
4
|
+
version: '1.2'
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- The MITRE Corporation
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-07
|
11
|
+
date: 2014-08-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: nokogiri
|
@@ -238,6 +238,7 @@ files:
|
|
238
238
|
- config/1.0.1/stix/stix_default_vocabularies.xsd
|
239
239
|
- config/1.0.1/stix/threat_actor.xsd
|
240
240
|
- config/1.0.1/stix/ttp.xsd
|
241
|
+
- config/1.0.1/uber_schema.xsd
|
241
242
|
- config/1.0/stix/campaign.xsd
|
242
243
|
- config/1.0/stix/course_of_action.xsd
|
243
244
|
- config/1.0/stix/cybox/cybox_common.xsd
|
@@ -375,6 +376,7 @@ files:
|
|
375
376
|
- config/1.0/stix/stix_default_vocabularies.xsd
|
376
377
|
- config/1.0/stix/threat_actor.xsd
|
377
378
|
- config/1.0/stix/ttp.xsd
|
379
|
+
- config/1.0/uber_schema.xsd
|
378
380
|
- config/1.1.1/stix/campaign.xsd
|
379
381
|
- config/1.1.1/stix/course_of_action.xsd
|
380
382
|
- config/1.1.1/stix/cybox/cybox_common.xsd
|