Skip to content

Commit ad76e62

Browse files
committed
Add SCAP 1.3 source datastream schema
Downloaded from https://csrc.nist.gov/schema/scap/1.3/scap-source-data-stream_1.3.xsd Converted the EOLs to Unix using `dos2unix` tool.
1 parent 4272ea0 commit ad76e62

File tree

1 file changed

+230
-0
lines changed

1 file changed

+230
-0
lines changed
Lines changed: 230 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,230 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:ds="http://scap.nist.gov/schema/scap/source/1.2"
3+
xmlns:xccdf="http://checklists.nist.gov/xccdf/1.2" xmlns:oval="http://oval.mitre.org/XMLSchema/oval-definitions-5"
4+
xmlns:cpe-dict="http://cpe.mitre.org/dictionary/2.0" xmlns:ocil="http://scap.nist.gov/schema/ocil/2.0"
5+
xmlns:dsig="http://www.w3.org/2000/09/xmldsig#" targetNamespace="http://scap.nist.gov/schema/scap/source/1.2"
6+
xmlns:cat="urn:oasis:names:tc:entity:xmlns:xml:catalog" xmlns:xlink="http://www.w3.org/1999/xlink"
7+
elementFormDefault="qualified" attributeFormDefault="unqualified" version="1.3">
8+
<xs:annotation>
9+
<xs:appinfo>
10+
<schema>SCAP 1.3 Source Data Stream Collection</schema>
11+
<author>Adam Halbardier, David Waltermire</author>
12+
<version>1.3</version>
13+
<date>2016-12-01</date>
14+
</xs:appinfo>
15+
</xs:annotation>
16+
<xs:import namespace="http://checklists.nist.gov/xccdf/1.2"
17+
schemaLocation="/schema/xccdf/1.2/xccdf_1.2.xsd"/>
18+
<xs:import namespace="http://oval.mitre.org/XMLSchema/oval-definitions-5"
19+
schemaLocation="https://raw.githubusercontent.com/OVALProject/Language/5.11.2/schemas/oval-definitions-schema.xsd"/>
20+
<xs:import namespace="http://cpe.mitre.org/dictionary/2.0"
21+
schemaLocation="/schema/cpe/2.3/cpe-dictionary_2.3.xsd"/>
22+
<xs:import namespace="http://scap.nist.gov/schema/ocil/2.0"
23+
schemaLocation="/schema/ocil/2.0/ocil-2.0.xsd"/>
24+
<xs:import namespace="http://www.w3.org/2000/09/xmldsig#"
25+
schemaLocation="https://www.w3.org/TR/xmldsig-core/xmldsig-core-schema.xsd"/>
26+
<xs:import namespace="urn:oasis:names:tc:entity:xmlns:xml:catalog"
27+
schemaLocation="http://www.oasis-open.org/committees/entity/release/1.1/catalog.xsd"/>
28+
<xs:import namespace="http://www.w3.org/1999/xlink" schemaLocation="https://www.w3.org/1999/xlink.xsd"/>
29+
<xs:element name="data-stream-collection">
30+
<xs:annotation>
31+
<xs:documentation>Holds a collection of data streams and components.</xs:documentation>
32+
</xs:annotation>
33+
<xs:complexType>
34+
<xs:sequence>
35+
<xs:element maxOccurs="unbounded" ref="ds:data-stream"/>
36+
<xs:element maxOccurs="unbounded" ref="ds:component"/>
37+
<xs:element maxOccurs="unbounded" minOccurs="0" ref="ds:extended-component"/>
38+
<xs:element maxOccurs="unbounded" minOccurs="0" ref="dsig:Signature">
39+
<xs:annotation>
40+
<xs:documentation>A digital signature of a data stream.</xs:documentation>
41+
</xs:annotation>
42+
</xs:element>
43+
</xs:sequence>
44+
<xs:attribute name="id" use="required">
45+
<xs:annotation>
46+
<xs:documentation>This MUST be a globally unique ID.</xs:documentation>
47+
</xs:annotation>
48+
<xs:simpleType>
49+
<xs:restriction base="xs:ID">
50+
<xs:pattern value="scap_[^_]+_collection_.+"/>
51+
</xs:restriction>
52+
</xs:simpleType>
53+
</xs:attribute>
54+
<xs:attribute name="schematron-version" type="xs:token" use="required">
55+
<xs:annotation>
56+
<xs:documentation>The version of the requirements Schematron ruleset to which the instance
57+
conforms.</xs:documentation>
58+
</xs:annotation>
59+
</xs:attribute>
60+
</xs:complexType>
61+
</xs:element>
62+
<xs:element name="data-stream">
63+
<xs:annotation>
64+
<xs:documentation>An SCAP data stream containing pointers to all of the components composing the data
65+
stream.</xs:documentation>
66+
</xs:annotation>
67+
<xs:complexType>
68+
<xs:sequence>
69+
<xs:element name="dictionaries" type="ds:refListType" minOccurs="0">
70+
<xs:annotation>
71+
<xs:documentation>Holds pointers to dictionary components.</xs:documentation>
72+
</xs:annotation>
73+
</xs:element>
74+
<xs:element name="checklists" type="ds:refListType" minOccurs="0">
75+
<xs:annotation>
76+
<xs:documentation>Holds pointers to checklist components.</xs:documentation>
77+
</xs:annotation>
78+
</xs:element>
79+
<xs:element name="checks" type="ds:refListType">
80+
<xs:annotation>
81+
<xs:documentation>Holds pointers to check components.</xs:documentation>
82+
</xs:annotation>
83+
</xs:element>
84+
<xs:element minOccurs="0" name="extended-components" type="ds:refListType">
85+
<xs:annotation>
86+
<xs:documentation>Holds pointers to non-standard SCAP components captured as extended-component
87+
elements.</xs:documentation>
88+
</xs:annotation>
89+
</xs:element>
90+
</xs:sequence>
91+
<xs:attribute name="id" use="required">
92+
<xs:annotation>
93+
<xs:documentation>This MUST be a globally unique ID.</xs:documentation>
94+
</xs:annotation>
95+
<xs:simpleType>
96+
<xs:restriction base="xs:ID">
97+
<xs:pattern value="scap_[^_]+_datastream_.+"/>
98+
</xs:restriction>
99+
</xs:simpleType>
100+
</xs:attribute>
101+
<xs:attribute name="use-case" use="required">
102+
<xs:annotation>
103+
<xs:documentation>The SCAP capability being expressed by this data stream. The type is expressed to allow for
104+
future use of this schema while indicating the currently acceptable values.</xs:documentation>
105+
</xs:annotation>
106+
<xs:simpleType>
107+
<xs:union memberTypes="ds:useCaseType xs:token"/>
108+
</xs:simpleType>
109+
</xs:attribute>
110+
<xs:attribute name="scap-version" use="required">
111+
<xs:annotation>
112+
<xs:documentation>The version of SCAP expressed by this data stream. The type is expressed to allow for future
113+
use of this schema while indicating the currently acceptable values.</xs:documentation>
114+
</xs:annotation>
115+
<xs:simpleType>
116+
<xs:union memberTypes="ds:scapVersionType xs:token"/>
117+
</xs:simpleType>
118+
</xs:attribute>
119+
<xs:attribute name="timestamp" type="xs:dateTime">
120+
<xs:annotation>
121+
<xs:documentation>The time when the data stream was created or last modified.</xs:documentation>
122+
</xs:annotation>
123+
</xs:attribute>
124+
</xs:complexType>
125+
</xs:element>
126+
<xs:element name="component">
127+
<xs:annotation>
128+
<xs:documentation>A component that is used by an SCAP data stream.</xs:documentation>
129+
</xs:annotation>
130+
<xs:complexType>
131+
<xs:choice>
132+
<xs:element ref="xccdf:Benchmark"/>
133+
<xs:element ref="oval:oval_definitions"/>
134+
<xs:element ref="ocil:ocil"/>
135+
<xs:element ref="cpe-dict:cpe-list"/>
136+
<xs:element ref="xccdf:Tailoring"/>
137+
</xs:choice>
138+
<xs:attribute name="id" use="required">
139+
<xs:annotation>
140+
<xs:documentation>This MUST be a globally unique ID.</xs:documentation>
141+
</xs:annotation>
142+
<xs:simpleType>
143+
<xs:restriction base="xs:ID">
144+
<xs:pattern value="scap_[^_]+_comp_.+"/>
145+
</xs:restriction>
146+
</xs:simpleType>
147+
</xs:attribute>
148+
<xs:attribute name="timestamp" type="xs:dateTime" use="required">
149+
<xs:annotation>
150+
<xs:documentation>The time when the component was created or last modified.</xs:documentation>
151+
</xs:annotation>
152+
</xs:attribute>
153+
</xs:complexType>
154+
<xs:unique name="cpeDictionaryUnique">
155+
<xs:selector xpath="cpe-dict:cpe-list/cpe-dict:cpe-item"/>
156+
<xs:field xpath="@name"/>
157+
</xs:unique>
158+
</xs:element>
159+
<xs:element name="extended-component">
160+
<xs:annotation>
161+
<xs:documentation>A component that holds non-standard SCAP content.</xs:documentation>
162+
</xs:annotation>
163+
<xs:complexType>
164+
<xs:sequence>
165+
<xs:any namespace="##other" processContents="lax"/>
166+
</xs:sequence>
167+
<xs:attribute name="id" use="required">
168+
<xs:annotation>
169+
<xs:documentation>This MUST be a globally unique ID.</xs:documentation>
170+
</xs:annotation>
171+
<xs:simpleType>
172+
<xs:restriction base="xs:ID">
173+
<xs:pattern value="scap_[^_]+_ecomp_.+"/>
174+
</xs:restriction>
175+
</xs:simpleType>
176+
</xs:attribute>
177+
<xs:attribute name="timestamp" type="xs:dateTime" use="required">
178+
<xs:annotation>
179+
<xs:documentation>The time when the component was created or last modified.</xs:documentation>
180+
</xs:annotation>
181+
</xs:attribute>
182+
</xs:complexType>
183+
</xs:element>
184+
<xs:element name="component-ref">
185+
<xs:annotation>
186+
<xs:documentation>An XLink element that points to a component.</xs:documentation>
187+
</xs:annotation>
188+
<xs:complexType>
189+
<xs:sequence>
190+
<xs:element minOccurs="0" ref="cat:catalog"/>
191+
</xs:sequence>
192+
<xs:attribute name="id" use="required">
193+
<xs:annotation>
194+
<xs:documentation>This MUST be a globally unique ID.</xs:documentation>
195+
</xs:annotation>
196+
<xs:simpleType>
197+
<xs:restriction base="xs:ID">
198+
<xs:pattern value="scap_[^_]+_cref_.+"/>
199+
</xs:restriction>
200+
</xs:simpleType>
201+
</xs:attribute>
202+
<xs:attribute fixed="simple" ref="xlink:type"/>
203+
<xs:attribute use="required" ref="xlink:href"/>
204+
</xs:complexType>
205+
</xs:element>
206+
<xs:simpleType name="useCaseType">
207+
<xs:restriction base="xs:token">
208+
<xs:enumeration value="CONFIGURATION"/>
209+
<xs:enumeration value="VULNERABILITY"/>
210+
<xs:enumeration value="INVENTORY"/>
211+
<xs:enumeration value="OTHER"/>
212+
</xs:restriction>
213+
</xs:simpleType>
214+
<xs:simpleType name="scapVersionType">
215+
<xs:restriction base="xs:token">
216+
<xs:enumeration value="1.0"/>
217+
<xs:enumeration value="1.1"/>
218+
<xs:enumeration value="1.2"/>
219+
<xs:enumeration value="1.3"/>
220+
</xs:restriction>
221+
</xs:simpleType>
222+
<xs:complexType name="contentSourceType">
223+
<xs:attribute name="href" type="xs:anyURI" use="required"/>
224+
</xs:complexType>
225+
<xs:complexType name="refListType">
226+
<xs:sequence>
227+
<xs:element maxOccurs="unbounded" ref="ds:component-ref"/>
228+
</xs:sequence>
229+
</xs:complexType>
230+
</xs:schema>

0 commit comments

Comments
 (0)