|
|
fa2dd6 |
From 5bf1556bc867401e664de67a0b2ccaa8e7c86ce4 Mon Sep 17 00:00:00 2001
|
|
|
fa2dd6 |
From: =?UTF-8?q?Jan=20=C4=8Cern=C3=BD?= <jcerny@redhat.com>
|
|
|
fa2dd6 |
Date: Tue, 7 May 2019 12:33:31 +0200
|
|
|
fa2dd6 |
Subject: [PATCH 1/9] Add SCAP 1.3 source datastream schema
|
|
|
fa2dd6 |
|
|
|
fa2dd6 |
Downloaded from
|
|
|
fa2dd6 |
https://csrc.nist.gov/schema/scap/1.3/scap-source-data-stream_1.3.xsd
|
|
|
fa2dd6 |
Converted the EOLs to Unix using `dos2unix` tool.
|
|
|
fa2dd6 |
---
|
|
|
fa2dd6 |
schemas/Makefile.am | 3 +
|
|
|
fa2dd6 |
.../sds/1.3/scap-source-data-stream_1.3.xsd | 230 ++++++++++++++++++
|
|
|
fa2dd6 |
2 files changed, 233 insertions(+)
|
|
|
fa2dd6 |
create mode 100644 schemas/sds/1.3/scap-source-data-stream_1.3.xsd
|
|
|
fa2dd6 |
|
|
|
fa2dd6 |
diff --git a/schemas/Makefile.am b/schemas/Makefile.am
|
|
|
fa2dd6 |
index 5a5cf015e..2ca4851e6 100644
|
|
|
fa2dd6 |
--- a/schemas/Makefile.am
|
|
|
fa2dd6 |
+++ b/schemas/Makefile.am
|
|
|
fa2dd6 |
@@ -15,6 +15,7 @@ xccdf11dir = $(pkgdatadir)/schemas/xccdf/1.1/
|
|
|
fa2dd6 |
xccdf11tailoringdir = $(pkgdatadir)/schemas/xccdf/1.1-tailoring/
|
|
|
fa2dd6 |
xccdf12dir = $(pkgdatadir)/schemas/xccdf/1.2/
|
|
|
fa2dd6 |
sds12dir = $(pkgdatadir)/schemas/sds/1.2/
|
|
|
fa2dd6 |
+sds13dir = $(pkgdatadir)/schemas/sds/1.3/
|
|
|
fa2dd6 |
arf11dir = $(pkgdatadir)/schemas/arf/1.1/
|
|
|
fa2dd6 |
ocil20dir = $(pkgdatadir)/schemas/ocil/2.0/
|
|
|
fa2dd6 |
cpe20dir = $(pkgdatadir)/schemas/cpe/2.0/
|
|
|
fa2dd6 |
@@ -46,6 +47,7 @@ xccdf11tailoring_DATA = $(wildcard $(srcdir)/xccdf/1.1-tailoring/*.xsd $(srcdir)
|
|
|
fa2dd6 |
xccdf12_DATA = $(wildcard $(srcdir)/xccdf/1.2/*.xsd $(srcdir)/xccdf/1.2/*.dtd $(srcdir)/xccdf/1.2/*.xsl)
|
|
|
fa2dd6 |
|
|
|
fa2dd6 |
sds12_DATA = $(wildcard $(srcdir)/sds/1.2/*.xsd $(srcdir)/sds/1.2/*.dtd)
|
|
|
fa2dd6 |
+sds13_DATA = $(wildcard $(srcdir)/sds/1.3/*.xsd $(srcdir)/sds/1.3/*.dtd)
|
|
|
fa2dd6 |
arf11_DATA = $(wildcard $(srcdir)/arf/1.1/*.xsd)
|
|
|
fa2dd6 |
|
|
|
fa2dd6 |
ocil20_DATA = $(wildcard $(srcdir)/ocil/2.0/*.xsd $(srcdir)/sds/2.0/*.dtd)
|
|
|
fa2dd6 |
@@ -77,6 +79,7 @@ EXTRA_DIST = \
|
|
|
fa2dd6 |
$(xccdf11tailoring_DATA) \
|
|
|
fa2dd6 |
$(xccdf12_DATA) \
|
|
|
fa2dd6 |
$(sds12_DATA) \
|
|
|
fa2dd6 |
+ $(sds13_DATA) \
|
|
|
fa2dd6 |
$(arf11_DATA) \
|
|
|
fa2dd6 |
$(ocil20_DATA) \
|
|
|
fa2dd6 |
$(cpe20_DATA) \
|
|
|
fa2dd6 |
diff --git a/schemas/sds/1.3/scap-source-data-stream_1.3.xsd b/schemas/sds/1.3/scap-source-data-stream_1.3.xsd
|
|
|
fa2dd6 |
new file mode 100644
|
|
|
fa2dd6 |
index 000000000..4a933ba2e
|
|
|
fa2dd6 |
--- /dev/null
|
|
|
fa2dd6 |
+++ b/schemas/sds/1.3/scap-source-data-stream_1.3.xsd
|
|
|
fa2dd6 |
@@ -0,0 +1,230 @@
|
|
|
fa2dd6 |
+
|
|
|
fa2dd6 |
+
|
|
|
fa2dd6 |
+ xmlns:xccdf="http://checklists.nist.gov/xccdf/1.2" xmlns:oval="http://oval.mitre.org/XMLSchema/oval-definitions-5"
|
|
|
fa2dd6 |
+ xmlns:cpe-dict="http://cpe.mitre.org/dictionary/2.0" xmlns:ocil="http://scap.nist.gov/schema/ocil/2.0"
|
|
|
fa2dd6 |
+ xmlns:dsig="http://www.w3.org/2000/09/xmldsig#" targetNamespace="http://scap.nist.gov/schema/scap/source/1.2"
|
|
|
fa2dd6 |
+ xmlns:cat="urn:oasis:names:tc:entity:xmlns:xml:catalog" xmlns:xlink="http://www.w3.org/1999/xlink"
|
|
|
fa2dd6 |
+ elementFormDefault="qualified" attributeFormDefault="unqualified" version="1.3">
|
|
|
fa2dd6 |
+ <xs:annotation>
|
|
|
fa2dd6 |
+ <xs:appinfo>
|
|
|
fa2dd6 |
+ <schema>SCAP 1.3 Source Data Stream Collection</schema>
|
|
|
fa2dd6 |
+ <author>Adam Halbardier, David Waltermire</author>
|
|
|
fa2dd6 |
+ <version>1.3</version>
|
|
|
fa2dd6 |
+ <date>2016-12-01</date>
|
|
|
fa2dd6 |
+ </xs:appinfo>
|
|
|
fa2dd6 |
+ </xs:annotation>
|
|
|
fa2dd6 |
+
|
|
|
fa2dd6 |
+ schemaLocation="/schema/xccdf/1.2/xccdf_1.2.xsd"/>
|
|
|
fa2dd6 |
+
|
|
|
fa2dd6 |
+ schemaLocation="https://raw.githubusercontent.com/OVALProject/Language/5.11.2/schemas/oval-definitions-schema.xsd"/>
|
|
|
fa2dd6 |
+
|
|
|
fa2dd6 |
+ schemaLocation="/schema/cpe/2.3/cpe-dictionary_2.3.xsd"/>
|
|
|
fa2dd6 |
+
|
|
|
fa2dd6 |
+ schemaLocation="/schema/ocil/2.0/ocil-2.0.xsd"/>
|
|
|
fa2dd6 |
+
|
|
|
fa2dd6 |
+ schemaLocation="https://www.w3.org/TR/xmldsig-core/xmldsig-core-schema.xsd"/>
|
|
|
fa2dd6 |
+
|
|
|
fa2dd6 |
+ schemaLocation="http://www.oasis-open.org/committees/entity/release/1.1/catalog.xsd"/>
|
|
|
fa2dd6 |
+ <xs:import namespace="http://www.w3.org/1999/xlink" schemaLocation="https://www.w3.org/1999/xlink.xsd"/>
|
|
|
fa2dd6 |
+ <xs:element name="data-stream-collection">
|
|
|
fa2dd6 |
+ <xs:annotation>
|
|
|
fa2dd6 |
+ <xs:documentation>Holds a collection of data streams and components.</xs:documentation>
|
|
|
fa2dd6 |
+ </xs:annotation>
|
|
|
fa2dd6 |
+ <xs:complexType>
|
|
|
fa2dd6 |
+ <xs:sequence>
|
|
|
fa2dd6 |
+ <xs:element maxOccurs="unbounded" ref="ds:data-stream"/>
|
|
|
fa2dd6 |
+ <xs:element maxOccurs="unbounded" ref="ds:component"/>
|
|
|
fa2dd6 |
+ <xs:element maxOccurs="unbounded" minOccurs="0" ref="ds:extended-component"/>
|
|
|
fa2dd6 |
+ <xs:element maxOccurs="unbounded" minOccurs="0" ref="dsig:Signature">
|
|
|
fa2dd6 |
+ <xs:annotation>
|
|
|
fa2dd6 |
+ <xs:documentation>A digital signature of a data stream.</xs:documentation>
|
|
|
fa2dd6 |
+ </xs:annotation>
|
|
|
fa2dd6 |
+ </xs:element>
|
|
|
fa2dd6 |
+ </xs:sequence>
|
|
|
fa2dd6 |
+ <xs:attribute name="id" use="required">
|
|
|
fa2dd6 |
+ <xs:annotation>
|
|
|
fa2dd6 |
+ <xs:documentation>This MUST be a globally unique ID.</xs:documentation>
|
|
|
fa2dd6 |
+ </xs:annotation>
|
|
|
fa2dd6 |
+ <xs:simpleType>
|
|
|
fa2dd6 |
+ <xs:restriction base="xs:ID">
|
|
|
fa2dd6 |
+ <xs:pattern value="scap_[^_]+_collection_.+"/>
|
|
|
fa2dd6 |
+ </xs:restriction>
|
|
|
fa2dd6 |
+ </xs:simpleType>
|
|
|
fa2dd6 |
+ </xs:attribute>
|
|
|
fa2dd6 |
+ <xs:attribute name="schematron-version" type="xs:token" use="required">
|
|
|
fa2dd6 |
+ <xs:annotation>
|
|
|
fa2dd6 |
+ <xs:documentation>The version of the requirements Schematron ruleset to which the instance
|
|
|
fa2dd6 |
+ conforms.</xs:documentation>
|
|
|
fa2dd6 |
+ </xs:annotation>
|
|
|
fa2dd6 |
+ </xs:attribute>
|
|
|
fa2dd6 |
+ </xs:complexType>
|
|
|
fa2dd6 |
+ </xs:element>
|
|
|
fa2dd6 |
+ <xs:element name="data-stream">
|
|
|
fa2dd6 |
+ <xs:annotation>
|
|
|
fa2dd6 |
+ <xs:documentation>An SCAP data stream containing pointers to all of the components composing the data
|
|
|
fa2dd6 |
+ stream.</xs:documentation>
|
|
|
fa2dd6 |
+ </xs:annotation>
|
|
|
fa2dd6 |
+ <xs:complexType>
|
|
|
fa2dd6 |
+ <xs:sequence>
|
|
|
fa2dd6 |
+ <xs:element name="dictionaries" type="ds:refListType" minOccurs="0">
|
|
|
fa2dd6 |
+ <xs:annotation>
|
|
|
fa2dd6 |
+ <xs:documentation>Holds pointers to dictionary components.</xs:documentation>
|
|
|
fa2dd6 |
+ </xs:annotation>
|
|
|
fa2dd6 |
+ </xs:element>
|
|
|
fa2dd6 |
+ <xs:element name="checklists" type="ds:refListType" minOccurs="0">
|
|
|
fa2dd6 |
+ <xs:annotation>
|
|
|
fa2dd6 |
+ <xs:documentation>Holds pointers to checklist components.</xs:documentation>
|
|
|
fa2dd6 |
+ </xs:annotation>
|
|
|
fa2dd6 |
+ </xs:element>
|
|
|
fa2dd6 |
+ <xs:element name="checks" type="ds:refListType">
|
|
|
fa2dd6 |
+ <xs:annotation>
|
|
|
fa2dd6 |
+ <xs:documentation>Holds pointers to check components.</xs:documentation>
|
|
|
fa2dd6 |
+ </xs:annotation>
|
|
|
fa2dd6 |
+ </xs:element>
|
|
|
fa2dd6 |
+ <xs:element minOccurs="0" name="extended-components" type="ds:refListType">
|
|
|
fa2dd6 |
+ <xs:annotation>
|
|
|
fa2dd6 |
+ <xs:documentation>Holds pointers to non-standard SCAP components captured as extended-component
|
|
|
fa2dd6 |
+ elements.</xs:documentation>
|
|
|
fa2dd6 |
+ </xs:annotation>
|
|
|
fa2dd6 |
+ </xs:element>
|
|
|
fa2dd6 |
+ </xs:sequence>
|
|
|
fa2dd6 |
+ <xs:attribute name="id" use="required">
|
|
|
fa2dd6 |
+ <xs:annotation>
|
|
|
fa2dd6 |
+ <xs:documentation>This MUST be a globally unique ID.</xs:documentation>
|
|
|
fa2dd6 |
+ </xs:annotation>
|
|
|
fa2dd6 |
+ <xs:simpleType>
|
|
|
fa2dd6 |
+ <xs:restriction base="xs:ID">
|
|
|
fa2dd6 |
+ <xs:pattern value="scap_[^_]+_datastream_.+"/>
|
|
|
fa2dd6 |
+ </xs:restriction>
|
|
|
fa2dd6 |
+ </xs:simpleType>
|
|
|
fa2dd6 |
+ </xs:attribute>
|
|
|
fa2dd6 |
+ <xs:attribute name="use-case" use="required">
|
|
|
fa2dd6 |
+ <xs:annotation>
|
|
|
fa2dd6 |
+ <xs:documentation>The SCAP capability being expressed by this data stream. The type is expressed to allow for
|
|
|
fa2dd6 |
+ future use of this schema while indicating the currently acceptable values.</xs:documentation>
|
|
|
fa2dd6 |
+ </xs:annotation>
|
|
|
fa2dd6 |
+ <xs:simpleType>
|
|
|
fa2dd6 |
+ <xs:union memberTypes="ds:useCaseType xs:token"/>
|
|
|
fa2dd6 |
+ </xs:simpleType>
|
|
|
fa2dd6 |
+ </xs:attribute>
|
|
|
fa2dd6 |
+ <xs:attribute name="scap-version" use="required">
|
|
|
fa2dd6 |
+ <xs:annotation>
|
|
|
fa2dd6 |
+ <xs:documentation>The version of SCAP expressed by this data stream. The type is expressed to allow for future
|
|
|
fa2dd6 |
+ use of this schema while indicating the currently acceptable values.</xs:documentation>
|
|
|
fa2dd6 |
+ </xs:annotation>
|
|
|
fa2dd6 |
+ <xs:simpleType>
|
|
|
fa2dd6 |
+ <xs:union memberTypes="ds:scapVersionType xs:token"/>
|
|
|
fa2dd6 |
+ </xs:simpleType>
|
|
|
fa2dd6 |
+ </xs:attribute>
|
|
|
fa2dd6 |
+ <xs:attribute name="timestamp" type="xs:dateTime">
|
|
|
fa2dd6 |
+ <xs:annotation>
|
|
|
fa2dd6 |
+ <xs:documentation>The time when the data stream was created or last modified.</xs:documentation>
|
|
|
fa2dd6 |
+ </xs:annotation>
|
|
|
fa2dd6 |
+ </xs:attribute>
|
|
|
fa2dd6 |
+ </xs:complexType>
|
|
|
fa2dd6 |
+ </xs:element>
|
|
|
fa2dd6 |
+ <xs:element name="component">
|
|
|
fa2dd6 |
+ <xs:annotation>
|
|
|
fa2dd6 |
+ <xs:documentation>A component that is used by an SCAP data stream.</xs:documentation>
|
|
|
fa2dd6 |
+ </xs:annotation>
|
|
|
fa2dd6 |
+ <xs:complexType>
|
|
|
fa2dd6 |
+ <xs:choice>
|
|
|
fa2dd6 |
+ <xs:element ref="xccdf:Benchmark"/>
|
|
|
fa2dd6 |
+ <xs:element ref="oval:oval_definitions"/>
|
|
|
fa2dd6 |
+ <xs:element ref="ocil:ocil"/>
|
|
|
fa2dd6 |
+ <xs:element ref="cpe-dict:cpe-list"/>
|
|
|
fa2dd6 |
+ <xs:element ref="xccdf:Tailoring"/>
|
|
|
fa2dd6 |
+ </xs:choice>
|
|
|
fa2dd6 |
+ <xs:attribute name="id" use="required">
|
|
|
fa2dd6 |
+ <xs:annotation>
|
|
|
fa2dd6 |
+ <xs:documentation>This MUST be a globally unique ID.</xs:documentation>
|
|
|
fa2dd6 |
+ </xs:annotation>
|
|
|
fa2dd6 |
+ <xs:simpleType>
|
|
|
fa2dd6 |
+ <xs:restriction base="xs:ID">
|
|
|
fa2dd6 |
+ <xs:pattern value="scap_[^_]+_comp_.+"/>
|
|
|
fa2dd6 |
+ </xs:restriction>
|
|
|
fa2dd6 |
+ </xs:simpleType>
|
|
|
fa2dd6 |
+ </xs:attribute>
|
|
|
fa2dd6 |
+ <xs:attribute name="timestamp" type="xs:dateTime" use="required">
|
|
|
fa2dd6 |
+ <xs:annotation>
|
|
|
fa2dd6 |
+ <xs:documentation>The time when the component was created or last modified.</xs:documentation>
|
|
|
fa2dd6 |
+ </xs:annotation>
|
|
|
fa2dd6 |
+ </xs:attribute>
|
|
|
fa2dd6 |
+ </xs:complexType>
|
|
|
fa2dd6 |
+ <xs:unique name="cpeDictionaryUnique">
|
|
|
fa2dd6 |
+ <xs:selector xpath="cpe-dict:cpe-list/cpe-dict:cpe-item"/>
|
|
|
fa2dd6 |
+ <xs:field xpath="@name"/>
|
|
|
fa2dd6 |
+ </xs:unique>
|
|
|
fa2dd6 |
+ </xs:element>
|
|
|
fa2dd6 |
+ <xs:element name="extended-component">
|
|
|
fa2dd6 |
+ <xs:annotation>
|
|
|
fa2dd6 |
+ <xs:documentation>A component that holds non-standard SCAP content.</xs:documentation>
|
|
|
fa2dd6 |
+ </xs:annotation>
|
|
|
fa2dd6 |
+ <xs:complexType>
|
|
|
fa2dd6 |
+ <xs:sequence>
|
|
|
fa2dd6 |
+ <xs:any namespace="##other" processContents="lax"/>
|
|
|
fa2dd6 |
+ </xs:sequence>
|
|
|
fa2dd6 |
+ <xs:attribute name="id" use="required">
|
|
|
fa2dd6 |
+ <xs:annotation>
|
|
|
fa2dd6 |
+ <xs:documentation>This MUST be a globally unique ID.</xs:documentation>
|
|
|
fa2dd6 |
+ </xs:annotation>
|
|
|
fa2dd6 |
+ <xs:simpleType>
|
|
|
fa2dd6 |
+ <xs:restriction base="xs:ID">
|
|
|
fa2dd6 |
+ <xs:pattern value="scap_[^_]+_ecomp_.+"/>
|
|
|
fa2dd6 |
+ </xs:restriction>
|
|
|
fa2dd6 |
+ </xs:simpleType>
|
|
|
fa2dd6 |
+ </xs:attribute>
|
|
|
fa2dd6 |
+ <xs:attribute name="timestamp" type="xs:dateTime" use="required">
|
|
|
fa2dd6 |
+ <xs:annotation>
|
|
|
fa2dd6 |
+ <xs:documentation>The time when the component was created or last modified.</xs:documentation>
|
|
|
fa2dd6 |
+ </xs:annotation>
|
|
|
fa2dd6 |
+ </xs:attribute>
|
|
|
fa2dd6 |
+ </xs:complexType>
|
|
|
fa2dd6 |
+ </xs:element>
|
|
|
fa2dd6 |
+ <xs:element name="component-ref">
|
|
|
fa2dd6 |
+ <xs:annotation>
|
|
|
fa2dd6 |
+ <xs:documentation>An XLink element that points to a component.</xs:documentation>
|
|
|
fa2dd6 |
+ </xs:annotation>
|
|
|
fa2dd6 |
+ <xs:complexType>
|
|
|
fa2dd6 |
+ <xs:sequence>
|
|
|
fa2dd6 |
+ <xs:element minOccurs="0" ref="cat:catalog"/>
|
|
|
fa2dd6 |
+ </xs:sequence>
|
|
|
fa2dd6 |
+ <xs:attribute name="id" use="required">
|
|
|
fa2dd6 |
+ <xs:annotation>
|
|
|
fa2dd6 |
+ <xs:documentation>This MUST be a globally unique ID.</xs:documentation>
|
|
|
fa2dd6 |
+ </xs:annotation>
|
|
|
fa2dd6 |
+ <xs:simpleType>
|
|
|
fa2dd6 |
+ <xs:restriction base="xs:ID">
|
|
|
fa2dd6 |
+ <xs:pattern value="scap_[^_]+_cref_.+"/>
|
|
|
fa2dd6 |
+ </xs:restriction>
|
|
|
fa2dd6 |
+ </xs:simpleType>
|
|
|
fa2dd6 |
+ </xs:attribute>
|
|
|
fa2dd6 |
+ <xs:attribute fixed="simple" ref="xlink:type"/>
|
|
|
fa2dd6 |
+ <xs:attribute use="required" ref="xlink:href"/>
|
|
|
fa2dd6 |
+ </xs:complexType>
|
|
|
fa2dd6 |
+ </xs:element>
|
|
|
fa2dd6 |
+ <xs:simpleType name="useCaseType">
|
|
|
fa2dd6 |
+ <xs:restriction base="xs:token">
|
|
|
fa2dd6 |
+ <xs:enumeration value="CONFIGURATION"/>
|
|
|
fa2dd6 |
+ <xs:enumeration value="VULNERABILITY"/>
|
|
|
fa2dd6 |
+ <xs:enumeration value="INVENTORY"/>
|
|
|
fa2dd6 |
+ <xs:enumeration value="OTHER"/>
|
|
|
fa2dd6 |
+ </xs:restriction>
|
|
|
fa2dd6 |
+ </xs:simpleType>
|
|
|
fa2dd6 |
+ <xs:simpleType name="scapVersionType">
|
|
|
fa2dd6 |
+ <xs:restriction base="xs:token">
|
|
|
fa2dd6 |
+ <xs:enumeration value="1.0"/>
|
|
|
fa2dd6 |
+ <xs:enumeration value="1.1"/>
|
|
|
fa2dd6 |
+ <xs:enumeration value="1.2"/>
|
|
|
fa2dd6 |
+ <xs:enumeration value="1.3"/>
|
|
|
fa2dd6 |
+ </xs:restriction>
|
|
|
fa2dd6 |
+ </xs:simpleType>
|
|
|
fa2dd6 |
+ <xs:complexType name="contentSourceType">
|
|
|
fa2dd6 |
+ <xs:attribute name="href" type="xs:anyURI" use="required"/>
|
|
|
fa2dd6 |
+ </xs:complexType>
|
|
|
fa2dd6 |
+ <xs:complexType name="refListType">
|
|
|
fa2dd6 |
+ <xs:sequence>
|
|
|
fa2dd6 |
+ <xs:element maxOccurs="unbounded" ref="ds:component-ref"/>
|
|
|
fa2dd6 |
+ </xs:sequence>
|
|
|
fa2dd6 |
+ </xs:complexType>
|
|
|
fa2dd6 |
+</xs:schema>
|
|
|
fa2dd6 |
|
|
|
fa2dd6 |
From a005cfd40e2dd217e779102d6347384ec0e4a4d6 Mon Sep 17 00:00:00 2001
|
|
|
fa2dd6 |
From: =?UTF-8?q?Jan=20=C4=8Cern=C3=BD?= <jcerny@redhat.com>
|
|
|
fa2dd6 |
Date: Tue, 7 May 2019 14:03:53 +0200
|
|
|
fa2dd6 |
Subject: [PATCH 2/9] Move OASIS XML Catalog schema to the common directory
|
|
|
fa2dd6 |
|
|
|
fa2dd6 |
This way we can reuse the OASIS XML Catalog schema in
|
|
|
fa2dd6 |
other schemas.
|
|
|
fa2dd6 |
---
|
|
|
fa2dd6 |
schemas/{sds/1.2 => common}/catalog.xsd | 0
|
|
|
fa2dd6 |
schemas/sds/1.2/scap-source-data-stream_1.2.xsd | 2 +-
|
|
|
fa2dd6 |
2 files changed, 1 insertion(+), 1 deletion(-)
|
|
|
fa2dd6 |
rename schemas/{sds/1.2 => common}/catalog.xsd (100%)
|
|
|
fa2dd6 |
|
|
|
fa2dd6 |
diff --git a/schemas/sds/1.2/catalog.xsd b/schemas/common/catalog.xsd
|
|
|
fa2dd6 |
similarity index 100%
|
|
|
fa2dd6 |
rename from schemas/sds/1.2/catalog.xsd
|
|
|
fa2dd6 |
rename to schemas/common/catalog.xsd
|
|
|
fa2dd6 |
diff --git a/schemas/sds/1.2/scap-source-data-stream_1.2.xsd b/schemas/sds/1.2/scap-source-data-stream_1.2.xsd
|
|
|
fa2dd6 |
index 606a92445..0dd91f010 100644
|
|
|
fa2dd6 |
--- a/schemas/sds/1.2/scap-source-data-stream_1.2.xsd
|
|
|
fa2dd6 |
+++ b/schemas/sds/1.2/scap-source-data-stream_1.2.xsd
|
|
|
fa2dd6 |
@@ -14,7 +14,7 @@
|
|
|
fa2dd6 |
<xs:import namespace="http://cpe.mitre.org/dictionary/2.0" schemaLocation="cpe-dictionary_2.3.xsd"/>
|
|
|
fa2dd6 |
<xs:import namespace="http://scap.nist.gov/schema/ocil/2.0" schemaLocation="../../ocil/2.0/ocil-2.0.xsd"/>
|
|
|
fa2dd6 |
<xs:import namespace="http://www.w3.org/2000/09/xmldsig#" schemaLocation="../../common/xmldsig-core-schema.xsd"/>
|
|
|
fa2dd6 |
- <xs:import namespace="urn:oasis:names:tc:entity:xmlns:xml:catalog" schemaLocation="catalog.xsd"/>
|
|
|
fa2dd6 |
+ <xs:import namespace="urn:oasis:names:tc:entity:xmlns:xml:catalog" schemaLocation="../../common/catalog.xsd"/>
|
|
|
fa2dd6 |
<xs:import namespace="http://www.w3.org/1999/xlink" schemaLocation="xlink.xsd"/>
|
|
|
fa2dd6 |
<xs:element name="data-stream-collection">
|
|
|
fa2dd6 |
<xs:annotation>
|
|
|
fa2dd6 |
|
|
|
fa2dd6 |
From 61b89c3c9314be3f606bdb7f1b156a7a8359719e Mon Sep 17 00:00:00 2001
|
|
|
fa2dd6 |
From: =?UTF-8?q?Jan=20=C4=8Cern=C3=BD?= <jcerny@redhat.com>
|
|
|
fa2dd6 |
Date: Tue, 7 May 2019 14:08:53 +0200
|
|
|
fa2dd6 |
Subject: [PATCH 3/9] Move W3C Xlink schema to common directory
|
|
|
fa2dd6 |
|
|
|
fa2dd6 |
This way the schema can be reused in multiple different schemas.
|
|
|
fa2dd6 |
---
|
|
|
fa2dd6 |
.../arf/1.1/asset-reporting-format_1.1.0.xsd | 2 +-
|
|
|
fa2dd6 |
schemas/{arf/1.1 => common}/xlink.xsd | 2 +-
|
|
|
fa2dd6 |
.../sds/1.2/scap-source-data-stream_1.2.xsd | 2 +-
|
|
|
fa2dd6 |
schemas/sds/1.2/xlink.xsd | 270 ------------------
|
|
|
fa2dd6 |
4 files changed, 3 insertions(+), 273 deletions(-)
|
|
|
fa2dd6 |
rename schemas/{arf/1.1 => common}/xlink.xsd (96%)
|
|
|
fa2dd6 |
delete mode 100644 schemas/sds/1.2/xlink.xsd
|
|
|
fa2dd6 |
|
|
|
fa2dd6 |
diff --git a/schemas/arf/1.1/asset-reporting-format_1.1.0.xsd b/schemas/arf/1.1/asset-reporting-format_1.1.0.xsd
|
|
|
fa2dd6 |
index 3617e854f..7e60eb4f6 100644
|
|
|
fa2dd6 |
--- a/schemas/arf/1.1/asset-reporting-format_1.1.0.xsd
|
|
|
fa2dd6 |
+++ b/schemas/arf/1.1/asset-reporting-format_1.1.0.xsd
|
|
|
fa2dd6 |
@@ -104,7 +104,7 @@
|
|
|
fa2dd6 |
</xs:annotation>
|
|
|
fa2dd6 |
|
|
|
fa2dd6 |
<xs:import namespace="http://scap.nist.gov/schema/asset-identification/1.1" schemaLocation="asset-identification_1.1.0.xsd"/>
|
|
|
fa2dd6 |
- <xs:import namespace="http://www.w3.org/1999/xlink" schemaLocation="xlink.xsd"/>
|
|
|
fa2dd6 |
+ <xs:import namespace="http://www.w3.org/1999/xlink" schemaLocation="../../common/xlink.xsd"/>
|
|
|
fa2dd6 |
<xs:import namespace="http://scap.nist.gov/schema/reporting-core/1.1" schemaLocation="reporting-core_1.1.0.xsd"/>
|
|
|
fa2dd6 |
<xs:element name="asset-report-collection">
|
|
|
fa2dd6 |
<xs:annotation>
|
|
|
fa2dd6 |
diff --git a/schemas/arf/1.1/xlink.xsd b/schemas/common/xlink.xsd
|
|
|
fa2dd6 |
similarity index 96%
|
|
|
fa2dd6 |
rename from schemas/arf/1.1/xlink.xsd
|
|
|
fa2dd6 |
rename to schemas/common/xlink.xsd
|
|
|
fa2dd6 |
index ea77d428f..0b2645e90 100644
|
|
|
fa2dd6 |
--- a/schemas/arf/1.1/xlink.xsd
|
|
|
fa2dd6 |
+++ b/schemas/common/xlink.xsd
|
|
|
fa2dd6 |
@@ -24,7 +24,7 @@ constructs, e.g.
|
|
|
fa2dd6 |
</xs:schema>]]></xs:documentation>
|
|
|
fa2dd6 |
</xs:annotation>
|
|
|
fa2dd6 |
|
|
|
fa2dd6 |
- <xs:import namespace="http://www.w3.org/XML/1998/namespace" schemaLocation="../../common/xml.xsd"/>
|
|
|
fa2dd6 |
+ <xs:import namespace="http://www.w3.org/XML/1998/namespace" schemaLocation="xml.xsd"/>
|
|
|
fa2dd6 |
|
|
|
fa2dd6 |
<xs:attribute name="type" type="xlink:typeType"/>
|
|
|
fa2dd6 |
|
|
|
fa2dd6 |
diff --git a/schemas/sds/1.2/scap-source-data-stream_1.2.xsd b/schemas/sds/1.2/scap-source-data-stream_1.2.xsd
|
|
|
fa2dd6 |
index 0dd91f010..72de4f98e 100644
|
|
|
fa2dd6 |
--- a/schemas/sds/1.2/scap-source-data-stream_1.2.xsd
|
|
|
fa2dd6 |
+++ b/schemas/sds/1.2/scap-source-data-stream_1.2.xsd
|
|
|
fa2dd6 |
@@ -15,7 +15,7 @@
|
|
|
fa2dd6 |
<xs:import namespace="http://scap.nist.gov/schema/ocil/2.0" schemaLocation="../../ocil/2.0/ocil-2.0.xsd"/>
|
|
|
fa2dd6 |
<xs:import namespace="http://www.w3.org/2000/09/xmldsig#" schemaLocation="../../common/xmldsig-core-schema.xsd"/>
|
|
|
fa2dd6 |
<xs:import namespace="urn:oasis:names:tc:entity:xmlns:xml:catalog" schemaLocation="../../common/catalog.xsd"/>
|
|
|
fa2dd6 |
- <xs:import namespace="http://www.w3.org/1999/xlink" schemaLocation="xlink.xsd"/>
|
|
|
fa2dd6 |
+ <xs:import namespace="http://www.w3.org/1999/xlink" schemaLocation="../../common/xlink.xsd"/>
|
|
|
fa2dd6 |
<xs:element name="data-stream-collection">
|
|
|
fa2dd6 |
<xs:annotation>
|
|
|
fa2dd6 |
<xs:documentation>Holds a collection of data streams and components.</xs:documentation>
|
|
|
fa2dd6 |
diff --git a/schemas/sds/1.2/xlink.xsd b/schemas/sds/1.2/xlink.xsd
|
|
|
fa2dd6 |
deleted file mode 100644
|
|
|
fa2dd6 |
index ea77d428f..000000000
|
|
|
fa2dd6 |
--- a/schemas/sds/1.2/xlink.xsd
|
|
|
fa2dd6 |
+++ /dev/null
|
|
|
fa2dd6 |
@@ -1,270 +0,0 @@
|
|
|
fa2dd6 |
-
|
|
|
fa2dd6 |
-<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.w3.org/1999/xlink" xmlns:xlink="http://www.w3.org/1999/xlink">
|
|
|
fa2dd6 |
-
|
|
|
fa2dd6 |
- <xs:annotation>
|
|
|
fa2dd6 |
- <xs:documentation>This schema document provides attribute declarations and
|
|
|
fa2dd6 |
-attribute group, complex type and simple type definitions which can be used in
|
|
|
fa2dd6 |
-the construction of user schemas to define the structure of particular linking
|
|
|
fa2dd6 |
-constructs, e.g.
|
|
|
fa2dd6 |
-
|
|
|
fa2dd6 |
-
|
|
|
fa2dd6 |
- xmlns:xl="http://www.w3.org/1999/xlink">
|
|
|
fa2dd6 |
-
|
|
|
fa2dd6 |
-
|
|
|
fa2dd6 |
- location="http://www.w3.org/1999/xlink.xsd">
|
|
|
fa2dd6 |
-
|
|
|
fa2dd6 |
- <xs:element name="mySimple">
|
|
|
fa2dd6 |
- <xs:complexType>
|
|
|
fa2dd6 |
- ...
|
|
|
fa2dd6 |
- <xs:attributeGroup ref="xl:simpleAttrs"/>
|
|
|
fa2dd6 |
- ...
|
|
|
fa2dd6 |
- </xs:complexType>
|
|
|
fa2dd6 |
- </xs:element>
|
|
|
fa2dd6 |
- ...
|
|
|
fa2dd6 |
-</xs:schema>]]></xs:documentation>
|
|
|
fa2dd6 |
- </xs:annotation>
|
|
|
fa2dd6 |
-
|
|
|
fa2dd6 |
- <xs:import namespace="http://www.w3.org/XML/1998/namespace" schemaLocation="../../common/xml.xsd"/>
|
|
|
fa2dd6 |
-
|
|
|
fa2dd6 |
- <xs:attribute name="type" type="xlink:typeType"/>
|
|
|
fa2dd6 |
-
|
|
|
fa2dd6 |
- <xs:simpleType name="typeType">
|
|
|
fa2dd6 |
- <xs:restriction base="xs:token">
|
|
|
fa2dd6 |
- <xs:enumeration value="simple"/>
|
|
|
fa2dd6 |
- <xs:enumeration value="extended"/>
|
|
|
fa2dd6 |
- <xs:enumeration value="title"/>
|
|
|
fa2dd6 |
- <xs:enumeration value="resource"/>
|
|
|
fa2dd6 |
- <xs:enumeration value="locator"/>
|
|
|
fa2dd6 |
- <xs:enumeration value="arc"/>
|
|
|
fa2dd6 |
- </xs:restriction>
|
|
|
fa2dd6 |
- </xs:simpleType>
|
|
|
fa2dd6 |
-
|
|
|
fa2dd6 |
- <xs:attribute name="href" type="xlink:hrefType"/>
|
|
|
fa2dd6 |
-
|
|
|
fa2dd6 |
- <xs:simpleType name="hrefType">
|
|
|
fa2dd6 |
- <xs:restriction base="xs:anyURI"/>
|
|
|
fa2dd6 |
- </xs:simpleType>
|
|
|
fa2dd6 |
-
|
|
|
fa2dd6 |
- <xs:attribute name="role" type="xlink:roleType"/>
|
|
|
fa2dd6 |
-
|
|
|
fa2dd6 |
- <xs:simpleType name="roleType">
|
|
|
fa2dd6 |
- <xs:restriction base="xs:anyURI">
|
|
|
fa2dd6 |
- <xs:minLength value="1"/>
|
|
|
fa2dd6 |
- </xs:restriction>
|
|
|
fa2dd6 |
- </xs:simpleType>
|
|
|
fa2dd6 |
-
|
|
|
fa2dd6 |
- <xs:attribute name="arcrole" type="xlink:arcroleType"/>
|
|
|
fa2dd6 |
-
|
|
|
fa2dd6 |
- <xs:simpleType name="arcroleType">
|
|
|
fa2dd6 |
- <xs:restriction base="xs:anyURI">
|
|
|
fa2dd6 |
- <xs:minLength value="1"/>
|
|
|
fa2dd6 |
- </xs:restriction>
|
|
|
fa2dd6 |
- </xs:simpleType>
|
|
|
fa2dd6 |
-
|
|
|
fa2dd6 |
- <xs:attribute name="title" type="xlink:titleAttrType"/>
|
|
|
fa2dd6 |
-
|
|
|
fa2dd6 |
- <xs:simpleType name="titleAttrType">
|
|
|
fa2dd6 |
- <xs:restriction base="xs:string"/>
|
|
|
fa2dd6 |
- </xs:simpleType>
|
|
|
fa2dd6 |
-
|
|
|
fa2dd6 |
- <xs:attribute name="show" type="xlink:showType"/>
|
|
|
fa2dd6 |
-
|
|
|
fa2dd6 |
- <xs:simpleType name="showType">
|
|
|
fa2dd6 |
- <xs:restriction base="xs:token">
|
|
|
fa2dd6 |
- <xs:enumeration value="new"/>
|
|
|
fa2dd6 |
- <xs:enumeration value="replace"/>
|
|
|
fa2dd6 |
- <xs:enumeration value="embed"/>
|
|
|
fa2dd6 |
- <xs:enumeration value="other"/>
|
|
|
fa2dd6 |
- <xs:enumeration value="none"/>
|
|
|
fa2dd6 |
- </xs:restriction>
|
|
|
fa2dd6 |
- </xs:simpleType>
|
|
|
fa2dd6 |
-
|
|
|
fa2dd6 |
- <xs:attribute name="actuate" type="xlink:actuateType"/>
|
|
|
fa2dd6 |
-
|
|
|
fa2dd6 |
- <xs:simpleType name="actuateType">
|
|
|
fa2dd6 |
- <xs:restriction base="xs:token">
|
|
|
fa2dd6 |
- <xs:enumeration value="onLoad"/>
|
|
|
fa2dd6 |
- <xs:enumeration value="onRequest"/>
|
|
|
fa2dd6 |
- <xs:enumeration value="other"/>
|
|
|
fa2dd6 |
- <xs:enumeration value="none"/>
|
|
|
fa2dd6 |
- </xs:restriction>
|
|
|
fa2dd6 |
- </xs:simpleType>
|
|
|
fa2dd6 |
-
|
|
|
fa2dd6 |
- <xs:attribute name="label" type="xlink:labelType"/>
|
|
|
fa2dd6 |
-
|
|
|
fa2dd6 |
- <xs:simpleType name="labelType">
|
|
|
fa2dd6 |
- <xs:restriction base="xs:NCName"/>
|
|
|
fa2dd6 |
- </xs:simpleType>
|
|
|
fa2dd6 |
-
|
|
|
fa2dd6 |
- <xs:attribute name="from" type="xlink:fromType"/>
|
|
|
fa2dd6 |
-
|
|
|
fa2dd6 |
- <xs:simpleType name="fromType">
|
|
|
fa2dd6 |
- <xs:restriction base="xs:NCName"/>
|
|
|
fa2dd6 |
- </xs:simpleType>
|
|
|
fa2dd6 |
-
|
|
|
fa2dd6 |
- <xs:attribute name="to" type="xlink:toType"/>
|
|
|
fa2dd6 |
-
|
|
|
fa2dd6 |
- <xs:simpleType name="toType">
|
|
|
fa2dd6 |
- <xs:restriction base="xs:NCName"/>
|
|
|
fa2dd6 |
- </xs:simpleType>
|
|
|
fa2dd6 |
-
|
|
|
fa2dd6 |
- <xs:attributeGroup name="simpleAttrs">
|
|
|
fa2dd6 |
- <xs:attribute ref="xlink:type" fixed="simple"/>
|
|
|
fa2dd6 |
- <xs:attribute ref="xlink:href"/>
|
|
|
fa2dd6 |
- <xs:attribute ref="xlink:role"/>
|
|
|
fa2dd6 |
- <xs:attribute ref="xlink:arcrole"/>
|
|
|
fa2dd6 |
- <xs:attribute ref="xlink:title"/>
|
|
|
fa2dd6 |
- <xs:attribute ref="xlink:show"/>
|
|
|
fa2dd6 |
- <xs:attribute ref="xlink:actuate"/>
|
|
|
fa2dd6 |
- </xs:attributeGroup>
|
|
|
fa2dd6 |
-
|
|
|
fa2dd6 |
- <xs:group name="simpleModel">
|
|
|
fa2dd6 |
- <xs:sequence>
|
|
|
fa2dd6 |
- <xs:any processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
|
|
|
fa2dd6 |
- </xs:sequence>
|
|
|
fa2dd6 |
- </xs:group>
|
|
|
fa2dd6 |
-
|
|
|
fa2dd6 |
- <xs:complexType mixed="true" name="simple">
|
|
|
fa2dd6 |
- <xs:annotation>
|
|
|
fa2dd6 |
- <xs:documentation>
|
|
|
fa2dd6 |
- Intended for use as the type of user-declared elements to make them
|
|
|
fa2dd6 |
- simple links.
|
|
|
fa2dd6 |
- </xs:documentation>
|
|
|
fa2dd6 |
- </xs:annotation>
|
|
|
fa2dd6 |
- <xs:group ref="xlink:simpleModel"/>
|
|
|
fa2dd6 |
- <xs:attributeGroup ref="xlink:simpleAttrs"/>
|
|
|
fa2dd6 |
- </xs:complexType>
|
|
|
fa2dd6 |
-
|
|
|
fa2dd6 |
- <xs:attributeGroup name="extendedAttrs">
|
|
|
fa2dd6 |
- <xs:attribute ref="xlink:type" fixed="extended" use="required"/>
|
|
|
fa2dd6 |
- <xs:attribute ref="xlink:role"/>
|
|
|
fa2dd6 |
- <xs:attribute ref="xlink:title"/>
|
|
|
fa2dd6 |
- </xs:attributeGroup>
|
|
|
fa2dd6 |
-
|
|
|
fa2dd6 |
- <xs:group name="extendedModel">
|
|
|
fa2dd6 |
- <xs:choice>
|
|
|
fa2dd6 |
- <xs:element ref="xlink:title"/>
|
|
|
fa2dd6 |
- <xs:element ref="xlink:resource"/>
|
|
|
fa2dd6 |
- <xs:element ref="xlink:locator"/>
|
|
|
fa2dd6 |
- <xs:element ref="xlink:arc"/>
|
|
|
fa2dd6 |
- </xs:choice>
|
|
|
fa2dd6 |
- </xs:group>
|
|
|
fa2dd6 |
-
|
|
|
fa2dd6 |
- <xs:complexType name="extended">
|
|
|
fa2dd6 |
- <xs:annotation>
|
|
|
fa2dd6 |
- <xs:documentation>
|
|
|
fa2dd6 |
- Intended for use as the type of user-declared elements to make them
|
|
|
fa2dd6 |
- extended links.
|
|
|
fa2dd6 |
- Note that the elements referenced in the content model are all abstract.
|
|
|
fa2dd6 |
- The intention is that by simply declaring elements with these as their
|
|
|
fa2dd6 |
- substitutionGroup, all the right things will happen.
|
|
|
fa2dd6 |
- </xs:documentation>
|
|
|
fa2dd6 |
- </xs:annotation>
|
|
|
fa2dd6 |
- <xs:group ref="xlink:extendedModel" minOccurs="0" maxOccurs="unbounded"/>
|
|
|
fa2dd6 |
- <xs:attributeGroup ref="xlink:extendedAttrs"/>
|
|
|
fa2dd6 |
- </xs:complexType>
|
|
|
fa2dd6 |
-
|
|
|
fa2dd6 |
- <xs:element name="title" type="xlink:titleEltType" abstract="true"/>
|
|
|
fa2dd6 |
-
|
|
|
fa2dd6 |
- <xs:attributeGroup name="titleAttrs">
|
|
|
fa2dd6 |
- <xs:attribute ref="xlink:type" fixed="title" use="required"/>
|
|
|
fa2dd6 |
- <xs:attribute ref="xml:lang">
|
|
|
fa2dd6 |
- <xs:annotation>
|
|
|
fa2dd6 |
- <xs:documentation>
|
|
|
fa2dd6 |
- xml:lang is not required, but provides much of the
|
|
|
fa2dd6 |
- motivation for title elements in addition to attributes, and so
|
|
|
fa2dd6 |
- is provided here for convenience.
|
|
|
fa2dd6 |
- </xs:documentation>
|
|
|
fa2dd6 |
- </xs:annotation>
|
|
|
fa2dd6 |
- </xs:attribute>
|
|
|
fa2dd6 |
- </xs:attributeGroup>
|
|
|
fa2dd6 |
-
|
|
|
fa2dd6 |
- <xs:group name="titleModel">
|
|
|
fa2dd6 |
- <xs:sequence>
|
|
|
fa2dd6 |
- <xs:any processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
|
|
|
fa2dd6 |
- </xs:sequence>
|
|
|
fa2dd6 |
- </xs:group>
|
|
|
fa2dd6 |
-
|
|
|
fa2dd6 |
- <xs:complexType mixed="true" name="titleEltType">
|
|
|
fa2dd6 |
- <xs:group ref="xlink:titleModel"/>
|
|
|
fa2dd6 |
- <xs:attributeGroup ref="xlink:titleAttrs"/>
|
|
|
fa2dd6 |
- </xs:complexType>
|
|
|
fa2dd6 |
-
|
|
|
fa2dd6 |
- <xs:element name="resource" type="xlink:resourceType" abstract="true"/>
|
|
|
fa2dd6 |
-
|
|
|
fa2dd6 |
- <xs:attributeGroup name="resourceAttrs">
|
|
|
fa2dd6 |
- <xs:attribute ref="xlink:type" fixed="resource" use="required"/>
|
|
|
fa2dd6 |
- <xs:attribute ref="xlink:role"/>
|
|
|
fa2dd6 |
- <xs:attribute ref="xlink:title"/>
|
|
|
fa2dd6 |
- <xs:attribute ref="xlink:label"/>
|
|
|
fa2dd6 |
- </xs:attributeGroup>
|
|
|
fa2dd6 |
-
|
|
|
fa2dd6 |
- <xs:group name="resourceModel">
|
|
|
fa2dd6 |
- <xs:sequence>
|
|
|
fa2dd6 |
- <xs:any processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
|
|
|
fa2dd6 |
- </xs:sequence>
|
|
|
fa2dd6 |
- </xs:group>
|
|
|
fa2dd6 |
-
|
|
|
fa2dd6 |
- <xs:complexType mixed="true" name="resourceType">
|
|
|
fa2dd6 |
- <xs:group ref="xlink:resourceModel"/>
|
|
|
fa2dd6 |
- <xs:attributeGroup ref="xlink:resourceAttrs"/>
|
|
|
fa2dd6 |
- </xs:complexType>
|
|
|
fa2dd6 |
-
|
|
|
fa2dd6 |
- <xs:element name="locator" type="xlink:locatorType" abstract="true"/>
|
|
|
fa2dd6 |
-
|
|
|
fa2dd6 |
- <xs:attributeGroup name="locatorAttrs">
|
|
|
fa2dd6 |
- <xs:attribute ref="xlink:type" fixed="locator" use="required"/>
|
|
|
fa2dd6 |
- <xs:attribute ref="xlink:href" use="required"/>
|
|
|
fa2dd6 |
- <xs:attribute ref="xlink:role"/>
|
|
|
fa2dd6 |
- <xs:attribute ref="xlink:title"/>
|
|
|
fa2dd6 |
- <xs:attribute ref="xlink:label">
|
|
|
fa2dd6 |
- <xs:annotation>
|
|
|
fa2dd6 |
- <xs:documentation>
|
|
|
fa2dd6 |
- label is not required, but locators have no particular
|
|
|
fa2dd6 |
- XLink function if they are not labeled.
|
|
|
fa2dd6 |
- </xs:documentation>
|
|
|
fa2dd6 |
- </xs:annotation>
|
|
|
fa2dd6 |
- </xs:attribute>
|
|
|
fa2dd6 |
- </xs:attributeGroup>
|
|
|
fa2dd6 |
-
|
|
|
fa2dd6 |
- <xs:group name="locatorModel">
|
|
|
fa2dd6 |
- <xs:sequence>
|
|
|
fa2dd6 |
- <xs:element ref="xlink:title" minOccurs="0" maxOccurs="unbounded"/>
|
|
|
fa2dd6 |
- </xs:sequence>
|
|
|
fa2dd6 |
- </xs:group>
|
|
|
fa2dd6 |
-
|
|
|
fa2dd6 |
- <xs:complexType name="locatorType">
|
|
|
fa2dd6 |
- <xs:group ref="xlink:locatorModel"/>
|
|
|
fa2dd6 |
- <xs:attributeGroup ref="xlink:locatorAttrs"/>
|
|
|
fa2dd6 |
- </xs:complexType>
|
|
|
fa2dd6 |
-
|
|
|
fa2dd6 |
- <xs:element name="arc" type="xlink:arcType" abstract="true"/>
|
|
|
fa2dd6 |
-
|
|
|
fa2dd6 |
- <xs:attributeGroup name="arcAttrs">
|
|
|
fa2dd6 |
- <xs:attribute ref="xlink:type" fixed="arc" use="required"/>
|
|
|
fa2dd6 |
- <xs:attribute ref="xlink:arcrole"/>
|
|
|
fa2dd6 |
- <xs:attribute ref="xlink:title"/>
|
|
|
fa2dd6 |
- <xs:attribute ref="xlink:show"/>
|
|
|
fa2dd6 |
- <xs:attribute ref="xlink:actuate"/>
|
|
|
fa2dd6 |
- <xs:attribute ref="xlink:from"/>
|
|
|
fa2dd6 |
- <xs:attribute ref="xlink:to">
|
|
|
fa2dd6 |
- <xs:annotation>
|
|
|
fa2dd6 |
- <xs:documentation>
|
|
|
fa2dd6 |
- from and to have default behavior when values are missing
|
|
|
fa2dd6 |
- </xs:documentation>
|
|
|
fa2dd6 |
- </xs:annotation>
|
|
|
fa2dd6 |
- </xs:attribute>
|
|
|
fa2dd6 |
- </xs:attributeGroup>
|
|
|
fa2dd6 |
-
|
|
|
fa2dd6 |
- <xs:group name="arcModel">
|
|
|
fa2dd6 |
- <xs:sequence>
|
|
|
fa2dd6 |
- <xs:element ref="xlink:title" minOccurs="0" maxOccurs="unbounded"/>
|
|
|
fa2dd6 |
- </xs:sequence>
|
|
|
fa2dd6 |
- </xs:group>
|
|
|
fa2dd6 |
-
|
|
|
fa2dd6 |
- <xs:complexType name="arcType">
|
|
|
fa2dd6 |
- <xs:group ref="xlink:arcModel"/>
|
|
|
fa2dd6 |
- <xs:attributeGroup ref="xlink:arcAttrs"/>
|
|
|
fa2dd6 |
- </xs:complexType>
|
|
|
fa2dd6 |
-
|
|
|
fa2dd6 |
-</xs:schema>
|
|
|
fa2dd6 |
|
|
|
fa2dd6 |
From 9aeca3c095e10e5aa4d19516283bafb4f7ac567a Mon Sep 17 00:00:00 2001
|
|
|
fa2dd6 |
From: =?UTF-8?q?Jan=20=C4=8Cern=C3=BD?= <jcerny@redhat.com>
|
|
|
fa2dd6 |
Date: Tue, 7 May 2019 14:15:18 +0200
|
|
|
fa2dd6 |
Subject: [PATCH 4/9] Use local XSDs in SCAP 1.3 source data stream schema
|
|
|
fa2dd6 |
|
|
|
fa2dd6 |
Similar to acef6dd61270546aec9f2213f9b8d71ae9aab73b
|
|
|
fa2dd6 |
---
|
|
|
fa2dd6 |
schemas/sds/1.3/scap-source-data-stream_1.3.xsd | 14 +++++++-------
|
|
|
fa2dd6 |
1 file changed, 7 insertions(+), 7 deletions(-)
|
|
|
fa2dd6 |
|
|
|
fa2dd6 |
diff --git a/schemas/sds/1.3/scap-source-data-stream_1.3.xsd b/schemas/sds/1.3/scap-source-data-stream_1.3.xsd
|
|
|
fa2dd6 |
index 4a933ba2e..7d6e2b177 100644
|
|
|
fa2dd6 |
--- a/schemas/sds/1.3/scap-source-data-stream_1.3.xsd
|
|
|
fa2dd6 |
+++ b/schemas/sds/1.3/scap-source-data-stream_1.3.xsd
|
|
|
fa2dd6 |
@@ -14,18 +14,18 @@
|
|
|
fa2dd6 |
</xs:appinfo>
|
|
|
fa2dd6 |
</xs:annotation>
|
|
|
fa2dd6 |
|
|
|
fa2dd6 |
- schemaLocation="/schema/xccdf/1.2/xccdf_1.2.xsd"/>
|
|
|
fa2dd6 |
+ schemaLocation="../../xccdf/1.2/xccdf_1.2.xsd"/>
|
|
|
fa2dd6 |
|
|
|
fa2dd6 |
- schemaLocation="https://raw.githubusercontent.com/OVALProject/Language/5.11.2/schemas/oval-definitions-schema.xsd"/>
|
|
|
fa2dd6 |
+ schemaLocation="../../oval/5.11.2/oval-definitions-schema.xsd"/>
|
|
|
fa2dd6 |
|
|
|
fa2dd6 |
- schemaLocation="/schema/cpe/2.3/cpe-dictionary_2.3.xsd"/>
|
|
|
fa2dd6 |
+ schemaLocation="../../cpe/2.3/cpe-dictionary_2.3.xsd"/>
|
|
|
fa2dd6 |
|
|
|
fa2dd6 |
- schemaLocation="/schema/ocil/2.0/ocil-2.0.xsd"/>
|
|
|
fa2dd6 |
+ schemaLocation="../../ocil/2.0/ocil-2.0.xsd"/>
|
|
|
fa2dd6 |
|
|
|
fa2dd6 |
- schemaLocation="https://www.w3.org/TR/xmldsig-core/xmldsig-core-schema.xsd"/>
|
|
|
fa2dd6 |
+ schemaLocation="../../common/xmldsig-core-schema.xsd"/>
|
|
|
fa2dd6 |
|
|
|
fa2dd6 |
- schemaLocation="http://www.oasis-open.org/committees/entity/release/1.1/catalog.xsd"/>
|
|
|
fa2dd6 |
- <xs:import namespace="http://www.w3.org/1999/xlink" schemaLocation="https://www.w3.org/1999/xlink.xsd"/>
|
|
|
fa2dd6 |
+ schemaLocation="../../common/catalog.xsd"/>
|
|
|
fa2dd6 |
+ <xs:import namespace="http://www.w3.org/1999/xlink" schemaLocation="../../common/xlink.xsd"/>
|
|
|
fa2dd6 |
<xs:element name="data-stream-collection">
|
|
|
fa2dd6 |
<xs:annotation>
|
|
|
fa2dd6 |
<xs:documentation>Holds a collection of data streams and components.</xs:documentation>
|
|
|
fa2dd6 |
|
|
|
fa2dd6 |
From b967d10ca3af64539367c3c6280f6dbb9fc2fd64 Mon Sep 17 00:00:00 2001
|
|
|
fa2dd6 |
From: =?UTF-8?q?Jan=20=C4=8Cern=C3=BD?= <jcerny@redhat.com>
|
|
|
fa2dd6 |
Date: Thu, 9 May 2019 09:42:21 +0200
|
|
|
fa2dd6 |
Subject: [PATCH 5/9] Fix schematron-version attribute in test datastreams
|
|
|
fa2dd6 |
|
|
|
fa2dd6 |
The data-stream-collection@schematron-version attribute
|
|
|
fa2dd6 |
should conform to the SCAP version.
|
|
|
fa2dd6 |
---
|
|
|
fa2dd6 |
tests/API/XCCDF/tailoring/simple-ds.xml | 2 +-
|
|
|
fa2dd6 |
tests/API/XCCDF/unittests/test_xccdf_overrides.arf.xml | 2 +-
|
|
|
fa2dd6 |
tests/DS/cpe_in_ds/sds.xml | 2 +-
|
|
|
fa2dd6 |
tests/DS/ds_sds_index/sds.xml | 2 +-
|
|
|
fa2dd6 |
tests/DS/ds_sds_index/sds_multiple.xml | 2 +-
|
|
|
fa2dd6 |
tests/DS/eval_benchmark_id_conflict/sds.xml | 2 +-
|
|
|
fa2dd6 |
tests/DS/eval_cpe/sds.xml | 2 +-
|
|
|
fa2dd6 |
tests/DS/eval_invalid/sds-oval.xml | 2 +-
|
|
|
fa2dd6 |
tests/DS/eval_invalid/sds.xml | 2 +-
|
|
|
fa2dd6 |
tests/DS/eval_just_oval/sds.xml | 2 +-
|
|
|
fa2dd6 |
tests/DS/eval_oval_id/sds.xml | 2 +-
|
|
|
fa2dd6 |
tests/DS/eval_simple/sds.xml | 2 +-
|
|
|
fa2dd6 |
tests/DS/eval_xccdf_id/sds-complex.xml | 2 +-
|
|
|
fa2dd6 |
tests/DS/eval_xccdf_id/sds.xml | 2 +-
|
|
|
fa2dd6 |
tests/DS/rds_index_simple/arf.xml | 2 +-
|
|
|
fa2dd6 |
tests/DS/rds_simple/sds.xml | 2 +-
|
|
|
fa2dd6 |
tests/DS/rds_split_simple/report-request.xml | 2 +-
|
|
|
fa2dd6 |
tests/DS/rds_testresult/sds.xml | 2 +-
|
|
|
fa2dd6 |
tests/DS/sds_external_xccdf/sds.ds.xml | 2 +-
|
|
|
fa2dd6 |
tests/DS/sds_external_xccdf/xccdf.sds.xml | 2 +-
|
|
|
fa2dd6 |
tests/DS/sds_tailoring/sds.ds.xml | 2 +-
|
|
|
fa2dd6 |
tests/DS/signed/sds-signed-fake-x509.xml | 2 +-
|
|
|
fa2dd6 |
tests/DS/signed/sds-signed.xml | 2 +-
|
|
|
fa2dd6 |
tests/DS/validate/rds-invalid.xml | 2 +-
|
|
|
fa2dd6 |
tests/DS/validate/rds-valid.xml | 2 +-
|
|
|
fa2dd6 |
tests/DS/validate/sds-invalid-oval.xml | 2 +-
|
|
|
fa2dd6 |
tests/DS/validate/sds-invalid-xccdf.xml | 2 +-
|
|
|
fa2dd6 |
tests/DS/validate/sds-invalid.xml | 2 +-
|
|
|
fa2dd6 |
tests/DS/validate/sds-valid.xml | 2 +-
|
|
|
fa2dd6 |
tests/sce/test_sce_in_ds.xml | 2 +-
|
|
|
fa2dd6 |
30 files changed, 30 insertions(+), 30 deletions(-)
|
|
|
fa2dd6 |
|
|
|
fa2dd6 |
diff --git a/tests/API/XCCDF/tailoring/simple-ds.xml b/tests/API/XCCDF/tailoring/simple-ds.xml
|
|
|
fa2dd6 |
index a8092096c..e5e515a70 100644
|
|
|
fa2dd6 |
--- a/tests/API/XCCDF/tailoring/simple-ds.xml
|
|
|
fa2dd6 |
+++ b/tests/API/XCCDF/tailoring/simple-ds.xml
|
|
|
fa2dd6 |
@@ -1,5 +1,5 @@
|
|
|
fa2dd6 |
|
|
|
fa2dd6 |
-<ds:data-stream-collection xmlns:ds="http://scap.nist.gov/schema/scap/source/1.2" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:cat="urn:oasis:names:tc:entity:xmlns:xml:catalog" id="scap_org.open-scap_collection_from_xccdf_simple-xccdf.xml" schematron-version="1.0">
|
|
|
fa2dd6 |
+<ds:data-stream-collection xmlns:ds="http://scap.nist.gov/schema/scap/source/1.2" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:cat="urn:oasis:names:tc:entity:xmlns:xml:catalog" id="scap_org.open-scap_collection_from_xccdf_simple-xccdf.xml" schematron-version="1.2">
|
|
|
fa2dd6 |
<ds:data-stream id="scap_org.open-scap_datastream_from_xccdf_simple-xccdf.xml" scap-version="1.2" use-case="OTHER">
|
|
|
fa2dd6 |
<ds:checklists>
|
|
|
fa2dd6 |
<ds:component-ref id="scap_org.open-scap_cref_simple-xccdf.xml" xlink:href="#scap_org.open-scap_comp_simple-xccdf.xml">
|
|
|
fa2dd6 |
diff --git a/tests/API/XCCDF/unittests/test_xccdf_overrides.arf.xml b/tests/API/XCCDF/unittests/test_xccdf_overrides.arf.xml
|
|
|
fa2dd6 |
index 84dad69b9..3f0ca8ca8 100644
|
|
|
fa2dd6 |
--- a/tests/API/XCCDF/unittests/test_xccdf_overrides.arf.xml
|
|
|
fa2dd6 |
+++ b/tests/API/XCCDF/unittests/test_xccdf_overrides.arf.xml
|
|
|
fa2dd6 |
@@ -1,5 +1,5 @@
|
|
|
fa2dd6 |
|
|
|
fa2dd6 |
-<arf:asset-report-collection xmlns:arf="http://scap.nist.gov/schema/asset-reporting-format/1.1" xmlns:core="http://scap.nist.gov/schema/reporting-core/1.1" xmlns:ai="http://scap.nist.gov/schema/asset-identification/1.1"><core:relationships xmlns:arfvocab="http://scap.nist.gov/specifications/arf/vocabulary/relationships/1.0#" xmlns:arfrel="http://scap.nist.gov/vocabulary/arf/relationships/1.0#"><core:relationship type="arfvocab:createdFor" subject="xccdf1"><core:ref>collection1</core:ref></core:relationship><core:relationship type="arfrel:isAbout" subject="xccdf1"><core:ref>asset0</core:ref></core:relationship></core:relationships><arf:report-requests><arf:report-request id="collection1"><arf:content><ds:data-stream-collection xmlns:ds="http://scap.nist.gov/schema/scap/source/1.2" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:cat="urn:oasis:names:tc:entity:xmlns:xml:catalog" id="scap_org.open-scap_collection_from_xccdf_ssg-fedora-xccdf-1.2.xml" schematron-version="1.0"><ds:data-stream id="scap_org.open-scap_datastream_from_xccdf_ssg-fedora-xccdf-1.2.xml" scap-version="1.2" use-case="OTHER"><ds:dictionaries><ds:component-ref id="scap_org.open-scap_cref_output--ssg-fedora-cpe-dictionary.xml" xlink:href="#scap_org.open-scap_comp_output--ssg-fedora-cpe-dictionary.xml"><cat:catalog><cat:uri name="ssg-fedora-cpe-oval.xml" uri="#scap_org.open-scap_cref_output--ssg-fedora-cpe-oval.xml"/></cat:catalog></ds:component-ref></ds:dictionaries><ds:checklists><ds:component-ref id="scap_org.open-scap_cref_ssg-fedora-xccdf-1.2.xml" xlink:href="#scap_org.open-scap_comp_ssg-fedora-xccdf-1.2.xml"><cat:catalog><cat:uri name="ssg-fedora-oval.xml" uri="#scap_org.open-scap_cref_ssg-fedora-oval.xml"/></cat:catalog></ds:component-ref></ds:checklists><ds:checks><ds:component-ref id="scap_org.open-scap_cref_ssg-fedora-oval.xml" xlink:href="#scap_org.open-scap_comp_ssg-fedora-oval.xml"/><ds:component-ref id="scap_org.open-scap_cref_output--ssg-fedora-cpe-oval.xml" xlink:href="#scap_org.open-scap_comp_output--ssg-fedora-cpe-oval.xml"/><ds:component-ref id="scap_org.open-scap_cref_output--ssg-fedora-oval.xml" xlink:href="#scap_org.open-scap_comp_output--ssg-fedora-oval.xml"/></ds:checks></ds:data-stream><ds:component id="scap_org.open-scap_comp_ssg-fedora-oval.xml" timestamp="2014-07-01T11:31:05"><oval_definitions xmlns="http://oval.mitre.org/XMLSchema/oval-definitions-5" xmlns:oval="http://oval.mitre.org/XMLSchema/oval-common-5" xmlns:ind="http://oval.mitre.org/XMLSchema/oval-definitions-5#independent" xmlns:unix="http://oval.mitre.org/XMLSchema/oval-definitions-5#unix" xmlns:linux="http://oval.mitre.org/XMLSchema/oval-definitions-5#linux" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://oval.mitre.org/XMLSchema/oval-common-5 oval-common-schema.xsd http://oval.mitre.org/XMLSchema/oval-definitions-5 oval-definitions-schema.xsd http://oval.mitre.org/XMLSchema/oval-definitions-5#independent independent-definitions-schema.xsd http://oval.mitre.org/XMLSchema/oval-definitions-5#unix unix-definitions-schema.xsd http://oval.mitre.org/XMLSchema/oval-definitions-5#linux linux-definitions-schema.xsd">
|
|
|
fa2dd6 |
+<arf:asset-report-collection xmlns:arf="http://scap.nist.gov/schema/asset-reporting-format/1.1" xmlns:core="http://scap.nist.gov/schema/reporting-core/1.1" xmlns:ai="http://scap.nist.gov/schema/asset-identification/1.1"><core:relationships xmlns:arfvocab="http://scap.nist.gov/specifications/arf/vocabulary/relationships/1.0#" xmlns:arfrel="http://scap.nist.gov/vocabulary/arf/relationships/1.0#"><core:relationship type="arfvocab:createdFor" subject="xccdf1"><core:ref>collection1</core:ref></core:relationship><core:relationship type="arfrel:isAbout" subject="xccdf1"><core:ref>asset0</core:ref></core:relationship></core:relationships><arf:report-requests><arf:report-request id="collection1"><arf:content><ds:data-stream-collection xmlns:ds="http://scap.nist.gov/schema/scap/source/1.2" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:cat="urn:oasis:names:tc:entity:xmlns:xml:catalog" id="scap_org.open-scap_collection_from_xccdf_ssg-fedora-xccdf-1.2.xml" schematron-version="1.2"><ds:data-stream id="scap_org.open-scap_datastream_from_xccdf_ssg-fedora-xccdf-1.2.xml" scap-version="1.2" use-case="OTHER"><ds:dictionaries><ds:component-ref id="scap_org.open-scap_cref_output--ssg-fedora-cpe-dictionary.xml" xlink:href="#scap_org.open-scap_comp_output--ssg-fedora-cpe-dictionary.xml"><cat:catalog><cat:uri name="ssg-fedora-cpe-oval.xml" uri="#scap_org.open-scap_cref_output--ssg-fedora-cpe-oval.xml"/></cat:catalog></ds:component-ref></ds:dictionaries><ds:checklists><ds:component-ref id="scap_org.open-scap_cref_ssg-fedora-xccdf-1.2.xml" xlink:href="#scap_org.open-scap_comp_ssg-fedora-xccdf-1.2.xml"><cat:catalog><cat:uri name="ssg-fedora-oval.xml" uri="#scap_org.open-scap_cref_ssg-fedora-oval.xml"/></cat:catalog></ds:component-ref></ds:checklists><ds:checks><ds:component-ref id="scap_org.open-scap_cref_ssg-fedora-oval.xml" xlink:href="#scap_org.open-scap_comp_ssg-fedora-oval.xml"/><ds:component-ref id="scap_org.open-scap_cref_output--ssg-fedora-cpe-oval.xml" xlink:href="#scap_org.open-scap_comp_output--ssg-fedora-cpe-oval.xml"/><ds:component-ref id="scap_org.open-scap_cref_output--ssg-fedora-oval.xml" xlink:href="#scap_org.open-scap_comp_output--ssg-fedora-oval.xml"/></ds:checks></ds:data-stream><ds:component id="scap_org.open-scap_comp_ssg-fedora-oval.xml" timestamp="2014-07-01T11:31:05"><oval_definitions xmlns="http://oval.mitre.org/XMLSchema/oval-definitions-5" xmlns:oval="http://oval.mitre.org/XMLSchema/oval-common-5" xmlns:ind="http://oval.mitre.org/XMLSchema/oval-definitions-5#independent" xmlns:unix="http://oval.mitre.org/XMLSchema/oval-definitions-5#unix" xmlns:linux="http://oval.mitre.org/XMLSchema/oval-definitions-5#linux" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://oval.mitre.org/XMLSchema/oval-common-5 oval-common-schema.xsd http://oval.mitre.org/XMLSchema/oval-definitions-5 oval-definitions-schema.xsd http://oval.mitre.org/XMLSchema/oval-definitions-5#independent independent-definitions-schema.xsd http://oval.mitre.org/XMLSchema/oval-definitions-5#unix unix-definitions-schema.xsd http://oval.mitre.org/XMLSchema/oval-definitions-5#linux linux-definitions-schema.xsd">
|
|
|
fa2dd6 |
<generator>
|
|
|
fa2dd6 |
<oval:product_name>python</oval:product_name>
|
|
|
fa2dd6 |
<oval:product_version>2.6.6</oval:product_version>
|
|
|
fa2dd6 |
diff --git a/tests/DS/cpe_in_ds/sds.xml b/tests/DS/cpe_in_ds/sds.xml
|
|
|
fa2dd6 |
index dbc57605a..a77389703 100644
|
|
|
fa2dd6 |
--- a/tests/DS/cpe_in_ds/sds.xml
|
|
|
fa2dd6 |
+++ b/tests/DS/cpe_in_ds/sds.xml
|
|
|
fa2dd6 |
@@ -1,5 +1,5 @@
|
|
|
fa2dd6 |
|
|
|
fa2dd6 |
-<ds:data-stream-collection xmlns:ds="http://scap.nist.gov/schema/scap/source/1.2" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:cat="urn:oasis:names:tc:entity:xmlns:xml:catalog" id="scap_org.open-scap_collection_from_xccdf_ssg-fedora-xccdf-1.2.xml" schematron-version="1.0">
|
|
|
fa2dd6 |
+<ds:data-stream-collection xmlns:ds="http://scap.nist.gov/schema/scap/source/1.2" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:cat="urn:oasis:names:tc:entity:xmlns:xml:catalog" id="scap_org.open-scap_collection_from_xccdf_ssg-fedora-xccdf-1.2.xml" schematron-version="1.2">
|
|
|
fa2dd6 |
|
|
|
fa2dd6 |
<ds:data-stream id="scap_org.open-scap_datastream_from_xccdf_ssg-fedora-xccdf-1.2.xml" scap-version="1.2" use-case="OTHER">
|
|
|
fa2dd6 |
<ds:dictionaries>
|
|
|
fa2dd6 |
diff --git a/tests/DS/ds_sds_index/sds.xml b/tests/DS/ds_sds_index/sds.xml
|
|
|
fa2dd6 |
index 0e438a39d..574046d24 100644
|
|
|
fa2dd6 |
--- a/tests/DS/ds_sds_index/sds.xml
|
|
|
fa2dd6 |
+++ b/tests/DS/ds_sds_index/sds.xml
|
|
|
fa2dd6 |
@@ -1,5 +1,5 @@
|
|
|
fa2dd6 |
|
|
|
fa2dd6 |
-<ds:data-stream-collection xmlns:ds="http://scap.nist.gov/schema/scap/source/1.2" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:cat="urn:oasis:names:tc:entity:xmlns:xml:catalog" id="scap_org.open-scap_collection_from_xccdf_scap-fedora14-xccdf.xml" schematron-version="1.0">
|
|
|
fa2dd6 |
+<ds:data-stream-collection xmlns:ds="http://scap.nist.gov/schema/scap/source/1.2" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:cat="urn:oasis:names:tc:entity:xmlns:xml:catalog" id="scap_org.open-scap_collection_from_xccdf_scap-fedora14-xccdf.xml" schematron-version="1.2">
|
|
|
fa2dd6 |
<ds:data-stream id="scap_org.open-scap_datastream_from_xccdf_scap-fedora14-xccdf.xml" scap-version="1.2" use-case="OTHER" timestamp="2012-11-01T12:22:58">
|
|
|
fa2dd6 |
<ds:checklists>
|
|
|
fa2dd6 |
<ds:component-ref id="scap_org.open-scap_cref_scap-fedora14-xccdf.xml" xlink:href="#scap_org.open-scap_comp_scap-fedora14-xccdf.xml">
|
|
|
fa2dd6 |
diff --git a/tests/DS/ds_sds_index/sds_multiple.xml b/tests/DS/ds_sds_index/sds_multiple.xml
|
|
|
fa2dd6 |
index a24e6f385..069202331 100644
|
|
|
fa2dd6 |
--- a/tests/DS/ds_sds_index/sds_multiple.xml
|
|
|
fa2dd6 |
+++ b/tests/DS/ds_sds_index/sds_multiple.xml
|
|
|
fa2dd6 |
@@ -1,5 +1,5 @@
|
|
|
fa2dd6 |
|
|
|
fa2dd6 |
-<ds:data-stream-collection xmlns:ds="http://scap.nist.gov/schema/scap/source/1.2" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:cat="urn:oasis:names:tc:entity:xmlns:xml:catalog" id="scap_org.open-scap_collection_from_xccdf_scap-fedora14-xccdf.xml" schematron-version="1.0">
|
|
|
fa2dd6 |
+<ds:data-stream-collection xmlns:ds="http://scap.nist.gov/schema/scap/source/1.2" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:cat="urn:oasis:names:tc:entity:xmlns:xml:catalog" id="scap_org.open-scap_collection_from_xccdf_scap-fedora14-xccdf.xml" schematron-version="1.2">
|
|
|
fa2dd6 |
<ds:data-stream id="scap_org.open-scap_datastream_from_xccdf_scap-fedora14-xccdf.xml" scap-version="1.2" use-case="OTHER">
|
|
|
fa2dd6 |
<ds:checklists>
|
|
|
fa2dd6 |
<ds:component-ref id="scap_org.open-scap_cref_scap-fedora14-xccdf.xml" xlink:href="#scap_org.open-scap_comp_scap-fedora14-xccdf.xml">
|
|
|
fa2dd6 |
diff --git a/tests/DS/eval_benchmark_id_conflict/sds.xml b/tests/DS/eval_benchmark_id_conflict/sds.xml
|
|
|
fa2dd6 |
index f3a075615..612eecb0c 100644
|
|
|
fa2dd6 |
--- a/tests/DS/eval_benchmark_id_conflict/sds.xml
|
|
|
fa2dd6 |
+++ b/tests/DS/eval_benchmark_id_conflict/sds.xml
|
|
|
fa2dd6 |
@@ -1,5 +1,5 @@
|
|
|
fa2dd6 |
|
|
|
fa2dd6 |
-<ds:data-stream-collection xmlns:ds="http://scap.nist.gov/schema/scap/source/1.2" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:cat="urn:oasis:names:tc:entity:xmlns:xml:catalog" id="scap_org.open-scap_collection_from_xccdf_first-xccdf.xml" schematron-version="1.0">
|
|
|
fa2dd6 |
+<ds:data-stream-collection xmlns:ds="http://scap.nist.gov/schema/scap/source/1.2" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:cat="urn:oasis:names:tc:entity:xmlns:xml:catalog" id="scap_org.open-scap_collection_from_xccdf_first-xccdf.xml" schematron-version="1.2">
|
|
|
fa2dd6 |
<ds:data-stream id="scap_org.open-scap_datastream_tst" scap-version="1.2" use-case="OTHER">
|
|
|
fa2dd6 |
<ds:checklists>
|
|
|
fa2dd6 |
<ds:component-ref id="scap_org.open-scap_cref_first-xccdf.xml" xlink:href="#scap_org.open-scap_comp_first-xccdf.xml">
|
|
|
fa2dd6 |
diff --git a/tests/DS/eval_cpe/sds.xml b/tests/DS/eval_cpe/sds.xml
|
|
|
fa2dd6 |
index fa568690a..a73403f74 100644
|
|
|
fa2dd6 |
--- a/tests/DS/eval_cpe/sds.xml
|
|
|
fa2dd6 |
+++ b/tests/DS/eval_cpe/sds.xml
|
|
|
fa2dd6 |
@@ -1,5 +1,5 @@
|
|
|
fa2dd6 |
|
|
|
fa2dd6 |
-<ds:data-stream-collection xmlns:ds="http://scap.nist.gov/schema/scap/source/1.2" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:cat="urn:oasis:names:tc:entity:xmlns:xml:catalog" id="scap_org.open-scap_collection_from_xccdf_first-xccdf.xml" schematron-version="1.0">
|
|
|
fa2dd6 |
+<ds:data-stream-collection xmlns:ds="http://scap.nist.gov/schema/scap/source/1.2" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:cat="urn:oasis:names:tc:entity:xmlns:xml:catalog" id="scap_org.open-scap_collection_from_xccdf_first-xccdf.xml" schematron-version="1.2">
|
|
|
fa2dd6 |
<ds:data-stream id="scap_org.open-scap_datastream_tst" scap-version="1.2" use-case="OTHER">
|
|
|
fa2dd6 |
<ds:dictionaries>
|
|
|
fa2dd6 |
<ds:component-ref id="scap_org.open-scap_cref_stub-cpe.xml" xlink:href="#scap_org.open-scap_comp_stub-cpe.xml">
|
|
|
fa2dd6 |
diff --git a/tests/DS/eval_invalid/sds-oval.xml b/tests/DS/eval_invalid/sds-oval.xml
|
|
|
fa2dd6 |
index d4e1b2900..e77e1aaea 100644
|
|
|
fa2dd6 |
--- a/tests/DS/eval_invalid/sds-oval.xml
|
|
|
fa2dd6 |
+++ b/tests/DS/eval_invalid/sds-oval.xml
|
|
|
fa2dd6 |
@@ -1,5 +1,5 @@
|
|
|
fa2dd6 |
|
|
|
fa2dd6 |
-<ds:data-stream-collection xmlns:ds="http://scap.nist.gov/schema/scap/source/1.2" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:cat="urn:oasis:names:tc:entity:xmlns:xml:catalog" id="scap_org.open-scap_collection_just_oval" schematron-version="1.0">
|
|
|
fa2dd6 |
+<ds:data-stream-collection xmlns:ds="http://scap.nist.gov/schema/scap/source/1.2" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:cat="urn:oasis:names:tc:entity:xmlns:xml:catalog" id="scap_org.open-scap_collection_just_oval" schematron-version="1.2">
|
|
|
fa2dd6 |
<ds:data-stream id="scap_org.open-scap_datastream_just_oval" scap-version="1.2" use-case="OTHER">
|
|
|
fa2dd6 |
<ds:checks>
|
|
|
fa2dd6 |
<ds:component-ref id="scap_org.open-scap_cref_scap-oval.xml" xlink:href="#scap_org.open-scap_comp_scap-oval.xml"/>
|
|
|
fa2dd6 |
diff --git a/tests/DS/eval_invalid/sds.xml b/tests/DS/eval_invalid/sds.xml
|
|
|
fa2dd6 |
index f9be5cb0c..e97592354 100644
|
|
|
fa2dd6 |
--- a/tests/DS/eval_invalid/sds.xml
|
|
|
fa2dd6 |
+++ b/tests/DS/eval_invalid/sds.xml
|
|
|
fa2dd6 |
@@ -1,3 +1,3 @@
|
|
|
fa2dd6 |
|
|
|
fa2dd6 |
-<ds:data-stream-collection xmlns:ds="http://scap.nist.gov/schema/scap/source/1.2" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:cat="urn:oasis:names:tc:entity:xmlns:xml:catalog" id="scap_org.open-scap_collection_from_xccdf_invalid.xml" schematron-version="1.0">
|
|
|
fa2dd6 |
+<ds:data-stream-collection xmlns:ds="http://scap.nist.gov/schema/scap/source/1.2" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:cat="urn:oasis:names:tc:entity:xmlns:xml:catalog" id="scap_org.open-scap_collection_from_xccdf_invalid.xml" schematron-version="1.2">
|
|
|
fa2dd6 |
</ds:data-stream-collection>
|
|
|
fa2dd6 |
diff --git a/tests/DS/eval_just_oval/sds.xml b/tests/DS/eval_just_oval/sds.xml
|
|
|
fa2dd6 |
index 976c1d2ee..3093b1c4a 100644
|
|
|
fa2dd6 |
--- a/tests/DS/eval_just_oval/sds.xml
|
|
|
fa2dd6 |
+++ b/tests/DS/eval_just_oval/sds.xml
|
|
|
fa2dd6 |
@@ -1,5 +1,5 @@
|
|
|
fa2dd6 |
|
|
|
fa2dd6 |
-<ds:data-stream-collection xmlns:ds="http://scap.nist.gov/schema/scap/source/1.2" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:cat="urn:oasis:names:tc:entity:xmlns:xml:catalog" id="scap_org.open-scap_collection_just_oval" schematron-version="1.0">
|
|
|
fa2dd6 |
+<ds:data-stream-collection xmlns:ds="http://scap.nist.gov/schema/scap/source/1.2" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:cat="urn:oasis:names:tc:entity:xmlns:xml:catalog" id="scap_org.open-scap_collection_just_oval" schematron-version="1.2">
|
|
|
fa2dd6 |
<ds:data-stream id="scap_org.open-scap_datastream_just_oval" scap-version="1.2" use-case="OTHER">
|
|
|
fa2dd6 |
<ds:checks>
|
|
|
fa2dd6 |
<ds:component-ref id="scap_org.open-scap_cref_scap-oval.xml" xlink:href="#scap_org.open-scap_comp_scap-oval.xml"/>
|
|
|
fa2dd6 |
diff --git a/tests/DS/eval_oval_id/sds.xml b/tests/DS/eval_oval_id/sds.xml
|
|
|
fa2dd6 |
index 8380c68b8..ea72b4d3b 100644
|
|
|
fa2dd6 |
--- a/tests/DS/eval_oval_id/sds.xml
|
|
|
fa2dd6 |
+++ b/tests/DS/eval_oval_id/sds.xml
|
|
|
fa2dd6 |
@@ -1,5 +1,5 @@
|
|
|
fa2dd6 |
|
|
|
fa2dd6 |
-<ds:data-stream-collection xmlns:ds="http://scap.nist.gov/schema/scap/source/1.2" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:cat="urn:oasis:names:tc:entity:xmlns:xml:catalog" id="scap_org.open-scap_collection_tst" schematron-version="1.0">
|
|
|
fa2dd6 |
+<ds:data-stream-collection xmlns:ds="http://scap.nist.gov/schema/scap/source/1.2" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:cat="urn:oasis:names:tc:entity:xmlns:xml:catalog" id="scap_org.open-scap_collection_tst" schematron-version="1.2">
|
|
|
fa2dd6 |
<ds:data-stream id="scap_org.open-scap_datastream_just_oval" scap-version="1.2" use-case="OTHER">
|
|
|
fa2dd6 |
<ds:checks>
|
|
|
fa2dd6 |
<ds:component-ref id="scap_org.open-scap_cref_scap-oval1.xml" xlink:href="#scap_org.open-scap_comp_scap-oval1.xml"/>
|
|
|
fa2dd6 |
diff --git a/tests/DS/eval_simple/sds.xml b/tests/DS/eval_simple/sds.xml
|
|
|
fa2dd6 |
index d3c4a6a5d..826a72629 100644
|
|
|
fa2dd6 |
--- a/tests/DS/eval_simple/sds.xml
|
|
|
fa2dd6 |
+++ b/tests/DS/eval_simple/sds.xml
|
|
|
fa2dd6 |
@@ -1,5 +1,5 @@
|
|
|
fa2dd6 |
|
|
|
fa2dd6 |
-<ds:data-stream-collection xmlns:ds="http://scap.nist.gov/schema/scap/source/1.2" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:cat="urn:oasis:names:tc:entity:xmlns:xml:catalog" id="scap_org.open-scap_collection_from_xccdf_scap-fedora14-xccdf.xml" schematron-version="1.0"><ds:data-stream id="scap_org.open-scap_datastream_from_xccdf_scap-fedora14-xccdf.xml" scap-version="1.2" use-case="OTHER"><ds:checklists><ds:component-ref id="scap_org.open-scap_cref_scap-fedora14-xccdf.xml" xlink:href="#scap_org.open-scap_comp_scap-fedora14-xccdf.xml"><cat:catalog><cat:uri name="scap-fedora14-oval.xml" uri="#scap_org.open-scap_cref_scap-fedora14-oval.xml"/></cat:catalog></ds:component-ref></ds:checklists><ds:checks><ds:component-ref id="scap_org.open-scap_cref_scap-fedora14-oval.xml" xlink:href="#scap_org.open-scap_comp_scap-fedora14-oval.xml"/></ds:checks></ds:data-stream><ds:component id="scap_org.open-scap_comp_scap-fedora14-xccdf.xml" timestamp="2012-07-20T12:22:58"><xccdf:Benchmark xmlns:xccdf="http://checklists.nist.gov/xccdf/1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="xccdf_cdf_benchmark_scap-fedora14-xccdf.xml" resolved="1" style="SCAP_1.2" xml:lang="en" xsi:schemaLocation="http://checklists.nist.gov/xccdf/1.2 http://scap.nist.gov/schema/xccdf/1.2/xccdf_1.2.xsd http://cpe.mitre.org/dictionary/2.0 http://scap.nist.gov/schema/cpe/2.3/cpe-dictionary_2.3.xsd">
|
|
|
fa2dd6 |
+<ds:data-stream-collection xmlns:ds="http://scap.nist.gov/schema/scap/source/1.2" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:cat="urn:oasis:names:tc:entity:xmlns:xml:catalog" id="scap_org.open-scap_collection_from_xccdf_scap-fedora14-xccdf.xml" schematron-version="1.2"><ds:data-stream id="scap_org.open-scap_datastream_from_xccdf_scap-fedora14-xccdf.xml" scap-version="1.2" use-case="OTHER"><ds:checklists><ds:component-ref id="scap_org.open-scap_cref_scap-fedora14-xccdf.xml" xlink:href="#scap_org.open-scap_comp_scap-fedora14-xccdf.xml"><cat:catalog><cat:uri name="scap-fedora14-oval.xml" uri="#scap_org.open-scap_cref_scap-fedora14-oval.xml"/></cat:catalog></ds:component-ref></ds:checklists><ds:checks><ds:component-ref id="scap_org.open-scap_cref_scap-fedora14-oval.xml" xlink:href="#scap_org.open-scap_comp_scap-fedora14-oval.xml"/></ds:checks></ds:data-stream><ds:component id="scap_org.open-scap_comp_scap-fedora14-xccdf.xml" timestamp="2012-07-20T12:22:58"><xccdf:Benchmark xmlns:xccdf="http://checklists.nist.gov/xccdf/1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="xccdf_cdf_benchmark_scap-fedora14-xccdf.xml" resolved="1" style="SCAP_1.2" xml:lang="en" xsi:schemaLocation="http://checklists.nist.gov/xccdf/1.2 http://scap.nist.gov/schema/xccdf/1.2/xccdf_1.2.xsd http://cpe.mitre.org/dictionary/2.0 http://scap.nist.gov/schema/cpe/2.3/cpe-dictionary_2.3.xsd">
|
|
|
fa2dd6 |
<xccdf:status date="2011-10-12">draft</xccdf:status>
|
|
|
fa2dd6 |
<xccdf:title>Example of SCAP Security Guidance</xccdf:title>
|
|
|
fa2dd6 |
<xccdf:description>This example security guidance has been created to demonstrate SCAP functionality
|
|
|
fa2dd6 |
diff --git a/tests/DS/eval_xccdf_id/sds-complex.xml b/tests/DS/eval_xccdf_id/sds-complex.xml
|
|
|
fa2dd6 |
index 5b69cd765..9ef6170e4 100644
|
|
|
fa2dd6 |
--- a/tests/DS/eval_xccdf_id/sds-complex.xml
|
|
|
fa2dd6 |
+++ b/tests/DS/eval_xccdf_id/sds-complex.xml
|
|
|
fa2dd6 |
@@ -1,5 +1,5 @@
|
|
|
fa2dd6 |
|
|
|
fa2dd6 |
-<ds:data-stream-collection xmlns:ds="http://scap.nist.gov/schema/scap/source/1.2" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:cat="urn:oasis:names:tc:entity:xmlns:xml:catalog" id="scap_org.open-scap_collection_from_xccdf_first-xccdf.xml" schematron-version="1.0">
|
|
|
fa2dd6 |
+<ds:data-stream-collection xmlns:ds="http://scap.nist.gov/schema/scap/source/1.2" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:cat="urn:oasis:names:tc:entity:xmlns:xml:catalog" id="scap_org.open-scap_collection_from_xccdf_first-xccdf.xml" schematron-version="1.2">
|
|
|
fa2dd6 |
|
|
|
fa2dd6 |
* datastream-id scap_org.open-scap_datastream_tst2
|
|
|
fa2dd6 |
* xccdf-id scap_org.open-scap_cref_second-xccdf.xml2
|
|
|
fa2dd6 |
diff --git a/tests/DS/eval_xccdf_id/sds.xml b/tests/DS/eval_xccdf_id/sds.xml
|
|
|
fa2dd6 |
index 0fcff4481..40391264f 100644
|
|
|
fa2dd6 |
--- a/tests/DS/eval_xccdf_id/sds.xml
|
|
|
fa2dd6 |
+++ b/tests/DS/eval_xccdf_id/sds.xml
|
|
|
fa2dd6 |
@@ -1,5 +1,5 @@
|
|
|
fa2dd6 |
|
|
|
fa2dd6 |
-<ds:data-stream-collection xmlns:ds="http://scap.nist.gov/schema/scap/source/1.2" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:cat="urn:oasis:names:tc:entity:xmlns:xml:catalog" id="scap_org.open-scap_collection_from_xccdf_first-xccdf.xml" schematron-version="1.0">
|
|
|
fa2dd6 |
+<ds:data-stream-collection xmlns:ds="http://scap.nist.gov/schema/scap/source/1.2" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:cat="urn:oasis:names:tc:entity:xmlns:xml:catalog" id="scap_org.open-scap_collection_from_xccdf_first-xccdf.xml" schematron-version="1.2">
|
|
|
fa2dd6 |
<ds:data-stream id="scap_org.open-scap_datastream_tst" scap-version="1.2" use-case="OTHER">
|
|
|
fa2dd6 |
<ds:checklists>
|
|
|
fa2dd6 |
<ds:component-ref id="scap_org.open-scap_cref_first-xccdf.xml" xlink:href="#scap_org.open-scap_comp_first-xccdf.xml">
|
|
|
fa2dd6 |
diff --git a/tests/DS/rds_index_simple/arf.xml b/tests/DS/rds_index_simple/arf.xml
|
|
|
fa2dd6 |
index 71791c95c..d38ba05dc 100644
|
|
|
fa2dd6 |
--- a/tests/DS/rds_index_simple/arf.xml
|
|
|
fa2dd6 |
+++ b/tests/DS/rds_index_simple/arf.xml
|
|
|
fa2dd6 |
@@ -11,7 +11,7 @@
|
|
|
fa2dd6 |
<arf:report-requests>
|
|
|
fa2dd6 |
<arf:report-request id="collection1">
|
|
|
fa2dd6 |
<arf:content>
|
|
|
fa2dd6 |
- <data-stream-collection xmlns="http://scap.nist.gov/schema/scap/source/1.2" xmlns:cat="urn:oasis:names:tc:entity:xmlns:xml:catalog" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="scap_cdf_collection_fedora.zip" schematron-version="1.0" xsi:schemaLocation="http://scap.nist.gov/schema/scap/source/1.2 http://scap.nist.gov/schema/scap/1.2/scap-source-data-stream_1.2-draft.xsd">
|
|
|
fa2dd6 |
+ <data-stream-collection xmlns="http://scap.nist.gov/schema/scap/source/1.2" xmlns:cat="urn:oasis:names:tc:entity:xmlns:xml:catalog" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="scap_cdf_collection_fedora.zip" schematron-version="1.2" xsi:schemaLocation="http://scap.nist.gov/schema/scap/source/1.2 http://scap.nist.gov/schema/scap/1.2/scap-source-data-stream_1.2-draft.xsd">
|
|
|
fa2dd6 |
<data-stream id="scap_cdf_datastream_fedora.zip" scap-version="1.2" timestamp="2012-06-05T07:33:31" use-case="OVAL_ONLY">
|
|
|
fa2dd6 |
<checklists>
|
|
|
fa2dd6 |
<component-ref id="scap_cdf_cref_fedora14-xccdf.xml" xlink:href="#scap_cdf_comp_fedora14-xccdf.xml">
|
|
|
fa2dd6 |
diff --git a/tests/DS/rds_simple/sds.xml b/tests/DS/rds_simple/sds.xml
|
|
|
fa2dd6 |
index 961955f06..d264aab1b 100644
|
|
|
fa2dd6 |
--- a/tests/DS/rds_simple/sds.xml
|
|
|
fa2dd6 |
+++ b/tests/DS/rds_simple/sds.xml
|
|
|
fa2dd6 |
@@ -1,5 +1,5 @@
|
|
|
fa2dd6 |
|
|
|
fa2dd6 |
-<data-stream-collection xmlns="http://scap.nist.gov/schema/scap/source/1.2" xmlns:cat="urn:oasis:names:tc:entity:xmlns:xml:catalog" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="scap_cdf_collection_fedora.zip" schematron-version="1.0" xsi:schemaLocation="http://scap.nist.gov/schema/scap/source/1.2 http://scap.nist.gov/schema/scap/1.2/scap-source-data-stream_1.2-draft.xsd">
|
|
|
fa2dd6 |
+<data-stream-collection xmlns="http://scap.nist.gov/schema/scap/source/1.2" xmlns:cat="urn:oasis:names:tc:entity:xmlns:xml:catalog" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="scap_cdf_collection_fedora.zip" schematron-version="1.2" xsi:schemaLocation="http://scap.nist.gov/schema/scap/source/1.2 http://scap.nist.gov/schema/scap/1.2/scap-source-data-stream_1.2-draft.xsd">
|
|
|
fa2dd6 |
<data-stream id="scap_cdf_datastream_fedora.zip" scap-version="1.2" timestamp="2012-06-05T07:33:31" use-case="OVAL_ONLY">
|
|
|
fa2dd6 |
<checklists>
|
|
|
fa2dd6 |
<component-ref id="scap_cdf_cref_fedora14-xccdf.xml" xlink:href="#scap_cdf_comp_fedora14-xccdf.xml">
|
|
|
fa2dd6 |
diff --git a/tests/DS/rds_split_simple/report-request.xml b/tests/DS/rds_split_simple/report-request.xml
|
|
|
fa2dd6 |
index 8fb3bfb75..4eb9d7da1 100644
|
|
|
fa2dd6 |
--- a/tests/DS/rds_split_simple/report-request.xml
|
|
|
fa2dd6 |
+++ b/tests/DS/rds_split_simple/report-request.xml
|
|
|
fa2dd6 |
@@ -1,5 +1,5 @@
|
|
|
fa2dd6 |
|
|
|
fa2dd6 |
-<data-stream-collection xmlns="http://scap.nist.gov/schema/scap/source/1.2" xmlns:cat="urn:oasis:names:tc:entity:xmlns:xml:catalog" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="scap_cdf_collection_fedora.zip" schematron-version="1.0" xsi:schemaLocation="http://scap.nist.gov/schema/scap/source/1.2 http://scap.nist.gov/schema/scap/1.2/scap-source-data-stream_1.2-draft.xsd">
|
|
|
fa2dd6 |
+<data-stream-collection xmlns="http://scap.nist.gov/schema/scap/source/1.2" xmlns:cat="urn:oasis:names:tc:entity:xmlns:xml:catalog" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="scap_cdf_collection_fedora.zip" schematron-version="1.2" xsi:schemaLocation="http://scap.nist.gov/schema/scap/source/1.2 http://scap.nist.gov/schema/scap/1.2/scap-source-data-stream_1.2-draft.xsd">
|
|
|
fa2dd6 |
<data-stream id="scap_cdf_datastream_fedora.zip" scap-version="1.2" timestamp="2012-06-05T07:33:31" use-case="OVAL_ONLY">
|
|
|
fa2dd6 |
<checklists>
|
|
|
fa2dd6 |
<component-ref id="scap_cdf_cref_fedora14-xccdf.xml" xlink:href="#scap_cdf_comp_fedora14-xccdf.xml">
|
|
|
fa2dd6 |
diff --git a/tests/DS/rds_testresult/sds.xml b/tests/DS/rds_testresult/sds.xml
|
|
|
fa2dd6 |
index 961955f06..d264aab1b 100644
|
|
|
fa2dd6 |
--- a/tests/DS/rds_testresult/sds.xml
|
|
|
fa2dd6 |
+++ b/tests/DS/rds_testresult/sds.xml
|
|
|
fa2dd6 |
@@ -1,5 +1,5 @@
|
|
|
fa2dd6 |
|
|
|
fa2dd6 |
-<data-stream-collection xmlns="http://scap.nist.gov/schema/scap/source/1.2" xmlns:cat="urn:oasis:names:tc:entity:xmlns:xml:catalog" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="scap_cdf_collection_fedora.zip" schematron-version="1.0" xsi:schemaLocation="http://scap.nist.gov/schema/scap/source/1.2 http://scap.nist.gov/schema/scap/1.2/scap-source-data-stream_1.2-draft.xsd">
|
|
|
fa2dd6 |
+<data-stream-collection xmlns="http://scap.nist.gov/schema/scap/source/1.2" xmlns:cat="urn:oasis:names:tc:entity:xmlns:xml:catalog" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="scap_cdf_collection_fedora.zip" schematron-version="1.2" xsi:schemaLocation="http://scap.nist.gov/schema/scap/source/1.2 http://scap.nist.gov/schema/scap/1.2/scap-source-data-stream_1.2-draft.xsd">
|
|
|
fa2dd6 |
<data-stream id="scap_cdf_datastream_fedora.zip" scap-version="1.2" timestamp="2012-06-05T07:33:31" use-case="OVAL_ONLY">
|
|
|
fa2dd6 |
<checklists>
|
|
|
fa2dd6 |
<component-ref id="scap_cdf_cref_fedora14-xccdf.xml" xlink:href="#scap_cdf_comp_fedora14-xccdf.xml">
|
|
|
fa2dd6 |
diff --git a/tests/DS/sds_external_xccdf/sds.ds.xml b/tests/DS/sds_external_xccdf/sds.ds.xml
|
|
|
fa2dd6 |
index 4531749a0..f519147ac 100644
|
|
|
fa2dd6 |
--- a/tests/DS/sds_external_xccdf/sds.ds.xml
|
|
|
fa2dd6 |
+++ b/tests/DS/sds_external_xccdf/sds.ds.xml
|
|
|
fa2dd6 |
@@ -1,5 +1,5 @@
|
|
|
fa2dd6 |
|
|
|
fa2dd6 |
-<ds:data-stream-collection xmlns:ds="http://scap.nist.gov/schema/scap/source/1.2" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:cat="urn:oasis:names:tc:entity:xmlns:xml:catalog" id="scap_org.open-scap_collection_from_xccdf_test_deriving_xccdf_result_from_oval_pass.oval.xml" schematron-version="1.0">
|
|
|
fa2dd6 |
+<ds:data-stream-collection xmlns:ds="http://scap.nist.gov/schema/scap/source/1.2" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:cat="urn:oasis:names:tc:entity:xmlns:xml:catalog" id="scap_org.open-scap_collection_from_xccdf_test_deriving_xccdf_result_from_oval_pass.oval.xml" schematron-version="1.2">
|
|
|
fa2dd6 |
<ds:data-stream id="scap_org.open-scap_datastream_from_xccdf_test_deriving_xccdf_result_from_oval_pass.oval.xml" scap-version="1.2" use-case="OTHER">
|
|
|
fa2dd6 |
<ds:checklists>
|
|
|
fa2dd6 |
<ds:component-ref id="scap_org.open-scap_cref_xccdf.xml" xlink:href="file:xccdf.sds.xml#scap_1_comp_xccdf.xml">
|
|
|
fa2dd6 |
diff --git a/tests/DS/sds_external_xccdf/xccdf.sds.xml b/tests/DS/sds_external_xccdf/xccdf.sds.xml
|
|
|
fa2dd6 |
index 08f99a14d..ca6d946d5 100644
|
|
|
fa2dd6 |
--- a/tests/DS/sds_external_xccdf/xccdf.sds.xml
|
|
|
fa2dd6 |
+++ b/tests/DS/sds_external_xccdf/xccdf.sds.xml
|
|
|
fa2dd6 |
@@ -1,5 +1,5 @@
|
|
|
fa2dd6 |
|
|
|
fa2dd6 |
-<ds:data-stream-collection xmlns:ds="http://scap.nist.gov/schema/scap/source/1.2" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:cat="urn:oasis:names:tc:entity:xmlns:xml:catalog" id="scap_org.open-scap_collection_from_xccdf_test_deriving_xccdf_result_from_oval.xccdf.xml" schematron-version="1.0">
|
|
|
fa2dd6 |
+<ds:data-stream-collection xmlns:ds="http://scap.nist.gov/schema/scap/source/1.2" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:cat="urn:oasis:names:tc:entity:xmlns:xml:catalog" id="scap_org.open-scap_collection_from_xccdf_test_deriving_xccdf_result_from_oval.xccdf.xml" schematron-version="1.2">
|
|
|
fa2dd6 |
<ds:data-stream id="scap_org.open-scap_datastream_from_xccdf_test_deriving_xccdf_result_from_oval.xccdf.xml" scap-version="1.2" use-case="OTHER">
|
|
|
fa2dd6 |
<ds:checklists>
|
|
|
fa2dd6 |
<ds:component-ref id="scap_org.open-scap_cref_xccdf.xml" xlink:href="#scap_1_comp_xccdf.xml" />
|
|
|
fa2dd6 |
diff --git a/tests/DS/sds_tailoring/sds.ds.xml b/tests/DS/sds_tailoring/sds.ds.xml
|
|
|
fa2dd6 |
index 793f444c2..92763b63f 100644
|
|
|
fa2dd6 |
--- a/tests/DS/sds_tailoring/sds.ds.xml
|
|
|
fa2dd6 |
+++ b/tests/DS/sds_tailoring/sds.ds.xml
|
|
|
fa2dd6 |
@@ -1,6 +1,6 @@
|
|
|
fa2dd6 |
|
|
|
fa2dd6 |
|
|
|
fa2dd6 |
-<data-stream-collection xmlns="http://scap.nist.gov/schema/scap/source/1.2" xmlns:ds="http://scap.nist.gov/schema/scap/source/1.2" xmlns:cat="urn:oasis:names:tc:entity:xmlns:xml:catalog" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="scap_cdf_collection_fedora.zip" schematron-version="1.0" xsi:schemaLocation="http://scap.nist.gov/schema/scap/source/1.2 http://scap.nist.gov/schema/scap/1.2/scap-source-data-stream_1.2-draft.xsd">
|
|
|
fa2dd6 |
+<data-stream-collection xmlns="http://scap.nist.gov/schema/scap/source/1.2" xmlns:ds="http://scap.nist.gov/schema/scap/source/1.2" xmlns:cat="urn:oasis:names:tc:entity:xmlns:xml:catalog" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="scap_cdf_collection_fedora.zip" schematron-version="1.2" xsi:schemaLocation="http://scap.nist.gov/schema/scap/source/1.2 http://scap.nist.gov/schema/scap/1.2/scap-source-data-stream_1.2-draft.xsd">
|
|
|
fa2dd6 |
|
|
|
fa2dd6 |
|
|
|
fa2dd6 |
<data-stream id="scap_com.example_datastream_with_checklist" scap-version="1.2" timestamp="2016-09-26T15:00:00" use-case="CONFIGURATION">
|
|
|
fa2dd6 |
diff --git a/tests/DS/signed/sds-signed-fake-x509.xml b/tests/DS/signed/sds-signed-fake-x509.xml
|
|
|
fa2dd6 |
index 0431a42ca..592bfb3c2 100644
|
|
|
fa2dd6 |
--- a/tests/DS/signed/sds-signed-fake-x509.xml
|
|
|
fa2dd6 |
+++ b/tests/DS/signed/sds-signed-fake-x509.xml
|
|
|
fa2dd6 |
@@ -1,5 +1,5 @@
|
|
|
fa2dd6 |
|
|
|
fa2dd6 |
-<ds:data-stream-collection xmlns:ds="http://scap.nist.gov/schema/scap/source/1.2" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:cat="urn:oasis:names:tc:entity:xmlns:xml:catalog" id="scap_org.open-scap_collection_from_xccdf_scap-fedora14-xccdf.xml" schematron-version="1.0"><ds:data-stream id="scap_org.open-scap_datastream_from_xccdf_scap-fedora14-xccdf.xml" scap-version="1.2" use-case="OTHER"><ds:checklists><ds:component-ref id="scap_org.open-scap_cref_scap-fedora14-xccdf.xml" xlink:href="#scap_org.open-scap_comp_scap-fedora14-xccdf.xml"><cat:catalog><cat:uri name="scap-fedora14-oval.xml" uri="#scap_org.open-scap_cref_scap-fedora14-oval.xml"/></cat:catalog></ds:component-ref></ds:checklists><ds:checks><ds:component-ref id="scap_org.open-scap_cref_scap-fedora14-oval.xml" xlink:href="#scap_org.open-scap_comp_scap-fedora14-oval.xml"/></ds:checks></ds:data-stream><ds:component id="scap_org.open-scap_comp_scap-fedora14-xccdf.xml" timestamp="2012-07-20T12:22:58"><xccdf:Benchmark xmlns:xccdf="http://checklists.nist.gov/xccdf/1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="xccdf_cdf_benchmark_scap-fedora14-xccdf.xml" resolved="1" style="SCAP_1.2" xml:lang="en" xsi:schemaLocation="http://checklists.nist.gov/xccdf/1.2 http://scap.nist.gov/schema/xccdf/1.2/xccdf_1.2.xsd http://cpe.mitre.org/dictionary/2.0 http://scap.nist.gov/schema/cpe/2.3/cpe-dictionary_2.3.xsd">
|
|
|
fa2dd6 |
+<ds:data-stream-collection xmlns:ds="http://scap.nist.gov/schema/scap/source/1.2" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:cat="urn:oasis:names:tc:entity:xmlns:xml:catalog" id="scap_org.open-scap_collection_from_xccdf_scap-fedora14-xccdf.xml" schematron-version="1.2"><ds:data-stream id="scap_org.open-scap_datastream_from_xccdf_scap-fedora14-xccdf.xml" scap-version="1.2" use-case="OTHER"><ds:checklists><ds:component-ref id="scap_org.open-scap_cref_scap-fedora14-xccdf.xml" xlink:href="#scap_org.open-scap_comp_scap-fedora14-xccdf.xml"><cat:catalog><cat:uri name="scap-fedora14-oval.xml" uri="#scap_org.open-scap_cref_scap-fedora14-oval.xml"/></cat:catalog></ds:component-ref></ds:checklists><ds:checks><ds:component-ref id="scap_org.open-scap_cref_scap-fedora14-oval.xml" xlink:href="#scap_org.open-scap_comp_scap-fedora14-oval.xml"/></ds:checks></ds:data-stream><ds:component id="scap_org.open-scap_comp_scap-fedora14-xccdf.xml" timestamp="2012-07-20T12:22:58"><xccdf:Benchmark xmlns:xccdf="http://checklists.nist.gov/xccdf/1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="xccdf_cdf_benchmark_scap-fedora14-xccdf.xml" resolved="1" style="SCAP_1.2" xml:lang="en" xsi:schemaLocation="http://checklists.nist.gov/xccdf/1.2 http://scap.nist.gov/schema/xccdf/1.2/xccdf_1.2.xsd http://cpe.mitre.org/dictionary/2.0 http://scap.nist.gov/schema/cpe/2.3/cpe-dictionary_2.3.xsd">
|
|
|
fa2dd6 |
<xccdf:status date="2011-10-12">draft</xccdf:status>
|
|
|
fa2dd6 |
<xccdf:title>Example of SCAP Security Guidance</xccdf:title>
|
|
|
fa2dd6 |
<xccdf:description>This example security guidance has been created to demonstrate SCAP functionality
|
|
|
fa2dd6 |
diff --git a/tests/DS/signed/sds-signed.xml b/tests/DS/signed/sds-signed.xml
|
|
|
fa2dd6 |
index 1863e5f18..3e862dd82 100644
|
|
|
fa2dd6 |
--- a/tests/DS/signed/sds-signed.xml
|
|
|
fa2dd6 |
+++ b/tests/DS/signed/sds-signed.xml
|
|
|
fa2dd6 |
@@ -1,5 +1,5 @@
|
|
|
fa2dd6 |
|
|
|
fa2dd6 |
-<ds:data-stream-collection xmlns:ds="http://scap.nist.gov/schema/scap/source/1.2" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:cat="urn:oasis:names:tc:entity:xmlns:xml:catalog" id="scap_org.open-scap_collection_from_xccdf_scap-fedora14-xccdf.xml" schematron-version="1.0"><ds:data-stream id="scap_org.open-scap_datastream_from_xccdf_scap-fedora14-xccdf.xml" scap-version="1.2" use-case="OTHER"><ds:checklists><ds:component-ref id="scap_org.open-scap_cref_scap-fedora14-xccdf.xml" xlink:href="#scap_org.open-scap_comp_scap-fedora14-xccdf.xml"><cat:catalog><cat:uri name="scap-fedora14-oval.xml" uri="#scap_org.open-scap_cref_scap-fedora14-oval.xml"/></cat:catalog></ds:component-ref></ds:checklists><ds:checks><ds:component-ref id="scap_org.open-scap_cref_scap-fedora14-oval.xml" xlink:href="#scap_org.open-scap_comp_scap-fedora14-oval.xml"/></ds:checks></ds:data-stream><ds:component id="scap_org.open-scap_comp_scap-fedora14-xccdf.xml" timestamp="2012-07-20T12:22:58"><xccdf:Benchmark xmlns:xccdf="http://checklists.nist.gov/xccdf/1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="xccdf_cdf_benchmark_scap-fedora14-xccdf.xml" resolved="1" style="SCAP_1.2" xml:lang="en" xsi:schemaLocation="http://checklists.nist.gov/xccdf/1.2 http://scap.nist.gov/schema/xccdf/1.2/xccdf_1.2.xsd http://cpe.mitre.org/dictionary/2.0 http://scap.nist.gov/schema/cpe/2.3/cpe-dictionary_2.3.xsd">
|
|
|
fa2dd6 |
+<ds:data-stream-collection xmlns:ds="http://scap.nist.gov/schema/scap/source/1.2" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:cat="urn:oasis:names:tc:entity:xmlns:xml:catalog" id="scap_org.open-scap_collection_from_xccdf_scap-fedora14-xccdf.xml" schematron-version="1.2"><ds:data-stream id="scap_org.open-scap_datastream_from_xccdf_scap-fedora14-xccdf.xml" scap-version="1.2" use-case="OTHER"><ds:checklists><ds:component-ref id="scap_org.open-scap_cref_scap-fedora14-xccdf.xml" xlink:href="#scap_org.open-scap_comp_scap-fedora14-xccdf.xml"><cat:catalog><cat:uri name="scap-fedora14-oval.xml" uri="#scap_org.open-scap_cref_scap-fedora14-oval.xml"/></cat:catalog></ds:component-ref></ds:checklists><ds:checks><ds:component-ref id="scap_org.open-scap_cref_scap-fedora14-oval.xml" xlink:href="#scap_org.open-scap_comp_scap-fedora14-oval.xml"/></ds:checks></ds:data-stream><ds:component id="scap_org.open-scap_comp_scap-fedora14-xccdf.xml" timestamp="2012-07-20T12:22:58"><xccdf:Benchmark xmlns:xccdf="http://checklists.nist.gov/xccdf/1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="xccdf_cdf_benchmark_scap-fedora14-xccdf.xml" resolved="1" style="SCAP_1.2" xml:lang="en" xsi:schemaLocation="http://checklists.nist.gov/xccdf/1.2 http://scap.nist.gov/schema/xccdf/1.2/xccdf_1.2.xsd http://cpe.mitre.org/dictionary/2.0 http://scap.nist.gov/schema/cpe/2.3/cpe-dictionary_2.3.xsd">
|
|
|
fa2dd6 |
<xccdf:status date="2011-10-12">draft</xccdf:status>
|
|
|
fa2dd6 |
<xccdf:title>Example of SCAP Security Guidance</xccdf:title>
|
|
|
fa2dd6 |
<xccdf:description>This example security guidance has been created to demonstrate SCAP functionality
|
|
|
fa2dd6 |
diff --git a/tests/DS/validate/rds-invalid.xml b/tests/DS/validate/rds-invalid.xml
|
|
|
fa2dd6 |
index 7351e0cb2..f98d13ada 100644
|
|
|
fa2dd6 |
--- a/tests/DS/validate/rds-invalid.xml
|
|
|
fa2dd6 |
+++ b/tests/DS/validate/rds-invalid.xml
|
|
|
fa2dd6 |
@@ -19,7 +19,7 @@
|
|
|
fa2dd6 |
xmlns:cat="urn:oasis:names:tc:entity:xmlns:xml:catalog"
|
|
|
fa2dd6 |
xmlns:xlink="http://www.w3.org/1999/xlink"
|
|
|
fa2dd6 |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
|
|
fa2dd6 |
- id="scap_cdf_collection_fedora.zip" schematron-version="1.0"
|
|
|
fa2dd6 |
+ id="scap_cdf_collection_fedora.zip" schematron-version="1.2"
|
|
|
fa2dd6 |
xsi:schemaLocation="http://scap.nist.gov/schema/scap/source/1.2 http://scap.nist.gov/schema/scap/1.2/scap-source-data-stream_1.2-draft.xsd">
|
|
|
fa2dd6 |
<data-stream id="scap_cdf_datastream_fedora.zip" scap-version="1.2" timestamp="2012-06-05T07:33:31" use-case="OVAL_ONLY">
|
|
|
fa2dd6 |
<dictionaries>
|
|
|
fa2dd6 |
diff --git a/tests/DS/validate/rds-valid.xml b/tests/DS/validate/rds-valid.xml
|
|
|
fa2dd6 |
index e08672a3a..22dadccbf 100644
|
|
|
fa2dd6 |
--- a/tests/DS/validate/rds-valid.xml
|
|
|
fa2dd6 |
+++ b/tests/DS/validate/rds-valid.xml
|
|
|
fa2dd6 |
@@ -20,7 +20,7 @@
|
|
|
fa2dd6 |
xmlns:xlink="http://www.w3.org/1999/xlink"
|
|
|
fa2dd6 |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
|
|
fa2dd6 |
id="scap_cdf_collection_fedora.zip"
|
|
|
fa2dd6 |
- schematron-version="1.0"
|
|
|
fa2dd6 |
+ schematron-version="1.2"
|
|
|
fa2dd6 |
xsi:schemaLocation="http://scap.nist.gov/schema/scap/source/1.2 http://scap.nist.gov/schema/scap/1.2/scap-source-data-stream_1.2-draft.xsd">
|
|
|
fa2dd6 |
<data-stream id="scap_cdf_datastream_fedora.zip" scap-version="1.2" timestamp="2012-06-05T07:33:31" use-case="OVAL_ONLY">
|
|
|
fa2dd6 |
<dictionaries>
|
|
|
fa2dd6 |
diff --git a/tests/DS/validate/sds-invalid-oval.xml b/tests/DS/validate/sds-invalid-oval.xml
|
|
|
fa2dd6 |
index c9ac98b48..e8be9abcf 100644
|
|
|
fa2dd6 |
--- a/tests/DS/validate/sds-invalid-oval.xml
|
|
|
fa2dd6 |
+++ b/tests/DS/validate/sds-invalid-oval.xml
|
|
|
fa2dd6 |
@@ -1,5 +1,5 @@
|
|
|
fa2dd6 |
|
|
|
fa2dd6 |
-<ds:data-stream-collection xmlns:ds="http://scap.nist.gov/schema/scap/source/1.2" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:cat="urn:oasis:names:tc:entity:xmlns:xml:catalog" id="scap_org.open-scap_collection_from_xccdf_scap-fedora14-xccdf.xml" schematron-version="1.0"><ds:data-stream id="scap_org.open-scap_datastream_from_xccdf_scap-fedora14-xccdf.xml" scap-version="1.2" use-case="OTHER"><ds:checklists><ds:component-ref id="scap_org.open-scap_cref_scap-fedora14-xccdf.xml" xlink:href="#scap_org.open-scap_comp_scap-fedora14-xccdf.xml"><cat:catalog><cat:uri name="scap-fedora14-oval.xml" uri="#scap_org.open-scap_cref_scap-fedora14-oval.xml"/></cat:catalog></ds:component-ref></ds:checklists><ds:checks><ds:component-ref id="scap_org.open-scap_cref_scap-fedora14-oval.xml" xlink:href="#scap_org.open-scap_comp_scap-fedora14-oval.xml"/></ds:checks></ds:data-stream><ds:component id="scap_org.open-scap_comp_scap-fedora14-xccdf.xml" timestamp="2012-07-20T12:22:58"><xccdf:Benchmark xmlns:xccdf="http://checklists.nist.gov/xccdf/1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="xccdf_cdf_benchmark_scap-fedora14-xccdf.xml" resolved="1" style="SCAP_1.2" xml:lang="en" xsi:schemaLocation="http://checklists.nist.gov/xccdf/1.2 http://scap.nist.gov/schema/xccdf/1.2/xccdf_1.2.xsd http://cpe.mitre.org/dictionary/2.0 http://scap.nist.gov/schema/cpe/2.3/cpe-dictionary_2.3.xsd">
|
|
|
fa2dd6 |
+<ds:data-stream-collection xmlns:ds="http://scap.nist.gov/schema/scap/source/1.2" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:cat="urn:oasis:names:tc:entity:xmlns:xml:catalog" id="scap_org.open-scap_collection_from_xccdf_scap-fedora14-xccdf.xml" schematron-version="1.2"><ds:data-stream id="scap_org.open-scap_datastream_from_xccdf_scap-fedora14-xccdf.xml" scap-version="1.2" use-case="OTHER"><ds:checklists><ds:component-ref id="scap_org.open-scap_cref_scap-fedora14-xccdf.xml" xlink:href="#scap_org.open-scap_comp_scap-fedora14-xccdf.xml"><cat:catalog><cat:uri name="scap-fedora14-oval.xml" uri="#scap_org.open-scap_cref_scap-fedora14-oval.xml"/></cat:catalog></ds:component-ref></ds:checklists><ds:checks><ds:component-ref id="scap_org.open-scap_cref_scap-fedora14-oval.xml" xlink:href="#scap_org.open-scap_comp_scap-fedora14-oval.xml"/></ds:checks></ds:data-stream><ds:component id="scap_org.open-scap_comp_scap-fedora14-xccdf.xml" timestamp="2012-07-20T12:22:58"><xccdf:Benchmark xmlns:xccdf="http://checklists.nist.gov/xccdf/1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="xccdf_cdf_benchmark_scap-fedora14-xccdf.xml" resolved="1" style="SCAP_1.2" xml:lang="en" xsi:schemaLocation="http://checklists.nist.gov/xccdf/1.2 http://scap.nist.gov/schema/xccdf/1.2/xccdf_1.2.xsd http://cpe.mitre.org/dictionary/2.0 http://scap.nist.gov/schema/cpe/2.3/cpe-dictionary_2.3.xsd">
|
|
|
fa2dd6 |
<xccdf:status date="2011-10-12">draft</xccdf:status>
|
|
|
fa2dd6 |
<xccdf:title>Example of SCAP Security Guidance</xccdf:title>
|
|
|
fa2dd6 |
<xccdf:description>This example security guidance has been created to demonstrate SCAP functionality
|
|
|
fa2dd6 |
diff --git a/tests/DS/validate/sds-invalid-xccdf.xml b/tests/DS/validate/sds-invalid-xccdf.xml
|
|
|
fa2dd6 |
index 64df3a13d..cf3017070 100644
|
|
|
fa2dd6 |
--- a/tests/DS/validate/sds-invalid-xccdf.xml
|
|
|
fa2dd6 |
+++ b/tests/DS/validate/sds-invalid-xccdf.xml
|
|
|
fa2dd6 |
@@ -1,5 +1,5 @@
|
|
|
fa2dd6 |
|
|
|
fa2dd6 |
-<ds:data-stream-collection xmlns:ds="http://scap.nist.gov/schema/scap/source/1.2" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:cat="urn:oasis:names:tc:entity:xmlns:xml:catalog" id="scap_org.open-scap_collection_from_xccdf_scap-fedora14-xccdf.xml" schematron-version="1.0"><ds:data-stream id="scap_org.open-scap_datastream_from_xccdf_scap-fedora14-xccdf.xml" scap-version="1.2" use-case="OTHER"><ds:checklists><ds:component-ref id="scap_org.open-scap_cref_scap-fedora14-xccdf.xml" xlink:href="#scap_org.open-scap_comp_scap-fedora14-xccdf.xml"><cat:catalog><cat:uri name="scap-fedora14-oval.xml" uri="#scap_org.open-scap_cref_scap-fedora14-oval.xml"/></cat:catalog></ds:component-ref></ds:checklists><ds:checks><ds:component-ref id="scap_org.open-scap_cref_scap-fedora14-oval.xml" xlink:href="#scap_org.open-scap_comp_scap-fedora14-oval.xml"/></ds:checks></ds:data-stream><ds:component id="scap_org.open-scap_comp_scap-fedora14-xccdf.xml" timestamp="2012-07-20T12:22:58"><xccdf:Benchmark xmlns:xccdf="http://checklists.nist.gov/xccdf/1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="xccdf_cdf_benchmark_scap-fedora14-xccdf.xml" resolved="1" style="SCAP_1.2" xml:lang="en" xsi:schemaLocation="http://checklists.nist.gov/xccdf/1.2 http://scap.nist.gov/schema/xccdf/1.2/xccdf_1.2.xsd http://cpe.mitre.org/dictionary/2.0 http://scap.nist.gov/schema/cpe/2.3/cpe-dictionary_2.3.xsd">
|
|
|
fa2dd6 |
+<ds:data-stream-collection xmlns:ds="http://scap.nist.gov/schema/scap/source/1.2" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:cat="urn:oasis:names:tc:entity:xmlns:xml:catalog" id="scap_org.open-scap_collection_from_xccdf_scap-fedora14-xccdf.xml" schematron-version="1.2"><ds:data-stream id="scap_org.open-scap_datastream_from_xccdf_scap-fedora14-xccdf.xml" scap-version="1.2" use-case="OTHER"><ds:checklists><ds:component-ref id="scap_org.open-scap_cref_scap-fedora14-xccdf.xml" xlink:href="#scap_org.open-scap_comp_scap-fedora14-xccdf.xml"><cat:catalog><cat:uri name="scap-fedora14-oval.xml" uri="#scap_org.open-scap_cref_scap-fedora14-oval.xml"/></cat:catalog></ds:component-ref></ds:checklists><ds:checks><ds:component-ref id="scap_org.open-scap_cref_scap-fedora14-oval.xml" xlink:href="#scap_org.open-scap_comp_scap-fedora14-oval.xml"/></ds:checks></ds:data-stream><ds:component id="scap_org.open-scap_comp_scap-fedora14-xccdf.xml" timestamp="2012-07-20T12:22:58"><xccdf:Benchmark xmlns:xccdf="http://checklists.nist.gov/xccdf/1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="xccdf_cdf_benchmark_scap-fedora14-xccdf.xml" resolved="1" style="SCAP_1.2" xml:lang="en" xsi:schemaLocation="http://checklists.nist.gov/xccdf/1.2 http://scap.nist.gov/schema/xccdf/1.2/xccdf_1.2.xsd http://cpe.mitre.org/dictionary/2.0 http://scap.nist.gov/schema/cpe/2.3/cpe-dictionary_2.3.xsd">
|
|
|
fa2dd6 |
<xccdf:title>Example of SCAP Security Guidance</xccdf:title>
|
|
|
fa2dd6 |
<xccdf:description>This example security guidance has been created to demonstrate SCAP functionality
|
|
|
fa2dd6 |
on Linux.</xccdf:description>
|
|
|
fa2dd6 |
diff --git a/tests/DS/validate/sds-invalid.xml b/tests/DS/validate/sds-invalid.xml
|
|
|
fa2dd6 |
index 3a7d67ca6..51a2ed03a 100644
|
|
|
fa2dd6 |
--- a/tests/DS/validate/sds-invalid.xml
|
|
|
fa2dd6 |
+++ b/tests/DS/validate/sds-invalid.xml
|
|
|
fa2dd6 |
@@ -1,5 +1,5 @@
|
|
|
fa2dd6 |
|
|
|
fa2dd6 |
-<ds:data-stream-collection xmlns:ds="http://scap.nist.gov/schema/scap/source/1.2" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:cat="urn:oasis:names:tc:entity:xmlns:xml:catalog" id="scap_org.open-scap_collection_from_xccdf_scap-fedora14-xccdf.xml" schematron-version="1.0"><ds:data-stream id="scap_org.open-scap_datastream_from_xccdf_scap-fedora14-xccdf.xml" scap-version="1.2" use-case="OTHER"><ds:checklists><ds:component-ref id="scap_org.open-scap_cref_scap-fedora14-xccdf.xml" xlink:href="#scap_org.open-scap_comp_scap-fedora14-xccdf.xml"><cat:catalog><cat:uri name="scap-fedora14-oval.xml" uri="#scap_org.open-scap_cref_scap-fedora14-oval.xml"/></cat:catalog></ds:component-ref></ds:checklists></ds:data-stream><ds:component id="scap_org.open-scap_comp_scap-fedora14-xccdf.xml" timestamp="2012-07-20T12:22:58"><xccdf:Benchmark xmlns:xccdf="http://checklists.nist.gov/xccdf/1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="xccdf_cdf_benchmark_scap-fedora14-xccdf.xml" resolved="1" style="SCAP_1.2" xml:lang="en" xsi:schemaLocation="http://checklists.nist.gov/xccdf/1.2 http://scap.nist.gov/schema/xccdf/1.2/xccdf_1.2.xsd http://cpe.mitre.org/dictionary/2.0 http://scap.nist.gov/schema/cpe/2.3/cpe-dictionary_2.3.xsd">
|
|
|
fa2dd6 |
+<ds:data-stream-collection xmlns:ds="http://scap.nist.gov/schema/scap/source/1.2" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:cat="urn:oasis:names:tc:entity:xmlns:xml:catalog" id="scap_org.open-scap_collection_from_xccdf_scap-fedora14-xccdf.xml" schematron-version="1.2"><ds:data-stream id="scap_org.open-scap_datastream_from_xccdf_scap-fedora14-xccdf.xml" scap-version="1.2" use-case="OTHER"><ds:checklists><ds:component-ref id="scap_org.open-scap_cref_scap-fedora14-xccdf.xml" xlink:href="#scap_org.open-scap_comp_scap-fedora14-xccdf.xml"><cat:catalog><cat:uri name="scap-fedora14-oval.xml" uri="#scap_org.open-scap_cref_scap-fedora14-oval.xml"/></cat:catalog></ds:component-ref></ds:checklists></ds:data-stream><ds:component id="scap_org.open-scap_comp_scap-fedora14-xccdf.xml" timestamp="2012-07-20T12:22:58"><xccdf:Benchmark xmlns:xccdf="http://checklists.nist.gov/xccdf/1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="xccdf_cdf_benchmark_scap-fedora14-xccdf.xml" resolved="1" style="SCAP_1.2" xml:lang="en" xsi:schemaLocation="http://checklists.nist.gov/xccdf/1.2 http://scap.nist.gov/schema/xccdf/1.2/xccdf_1.2.xsd http://cpe.mitre.org/dictionary/2.0 http://scap.nist.gov/schema/cpe/2.3/cpe-dictionary_2.3.xsd">
|
|
|
fa2dd6 |
<xccdf:status date="2011-10-12">draft</xccdf:status>
|
|
|
fa2dd6 |
<xccdf:title>Example of SCAP Security Guidance</xccdf:title>
|
|
|
fa2dd6 |
<xccdf:description>This example security guidance has been created to demonstrate SCAP functionality
|
|
|
fa2dd6 |
diff --git a/tests/DS/validate/sds-valid.xml b/tests/DS/validate/sds-valid.xml
|
|
|
fa2dd6 |
index d3c4a6a5d..826a72629 100644
|
|
|
fa2dd6 |
--- a/tests/DS/validate/sds-valid.xml
|
|
|
fa2dd6 |
+++ b/tests/DS/validate/sds-valid.xml
|
|
|
fa2dd6 |
@@ -1,5 +1,5 @@
|
|
|
fa2dd6 |
|
|
|
fa2dd6 |
-<ds:data-stream-collection xmlns:ds="http://scap.nist.gov/schema/scap/source/1.2" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:cat="urn:oasis:names:tc:entity:xmlns:xml:catalog" id="scap_org.open-scap_collection_from_xccdf_scap-fedora14-xccdf.xml" schematron-version="1.0"><ds:data-stream id="scap_org.open-scap_datastream_from_xccdf_scap-fedora14-xccdf.xml" scap-version="1.2" use-case="OTHER"><ds:checklists><ds:component-ref id="scap_org.open-scap_cref_scap-fedora14-xccdf.xml" xlink:href="#scap_org.open-scap_comp_scap-fedora14-xccdf.xml"><cat:catalog><cat:uri name="scap-fedora14-oval.xml" uri="#scap_org.open-scap_cref_scap-fedora14-oval.xml"/></cat:catalog></ds:component-ref></ds:checklists><ds:checks><ds:component-ref id="scap_org.open-scap_cref_scap-fedora14-oval.xml" xlink:href="#scap_org.open-scap_comp_scap-fedora14-oval.xml"/></ds:checks></ds:data-stream><ds:component id="scap_org.open-scap_comp_scap-fedora14-xccdf.xml" timestamp="2012-07-20T12:22:58"><xccdf:Benchmark xmlns:xccdf="http://checklists.nist.gov/xccdf/1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="xccdf_cdf_benchmark_scap-fedora14-xccdf.xml" resolved="1" style="SCAP_1.2" xml:lang="en" xsi:schemaLocation="http://checklists.nist.gov/xccdf/1.2 http://scap.nist.gov/schema/xccdf/1.2/xccdf_1.2.xsd http://cpe.mitre.org/dictionary/2.0 http://scap.nist.gov/schema/cpe/2.3/cpe-dictionary_2.3.xsd">
|
|
|
fa2dd6 |
+<ds:data-stream-collection xmlns:ds="http://scap.nist.gov/schema/scap/source/1.2" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:cat="urn:oasis:names:tc:entity:xmlns:xml:catalog" id="scap_org.open-scap_collection_from_xccdf_scap-fedora14-xccdf.xml" schematron-version="1.2"><ds:data-stream id="scap_org.open-scap_datastream_from_xccdf_scap-fedora14-xccdf.xml" scap-version="1.2" use-case="OTHER"><ds:checklists><ds:component-ref id="scap_org.open-scap_cref_scap-fedora14-xccdf.xml" xlink:href="#scap_org.open-scap_comp_scap-fedora14-xccdf.xml"><cat:catalog><cat:uri name="scap-fedora14-oval.xml" uri="#scap_org.open-scap_cref_scap-fedora14-oval.xml"/></cat:catalog></ds:component-ref></ds:checklists><ds:checks><ds:component-ref id="scap_org.open-scap_cref_scap-fedora14-oval.xml" xlink:href="#scap_org.open-scap_comp_scap-fedora14-oval.xml"/></ds:checks></ds:data-stream><ds:component id="scap_org.open-scap_comp_scap-fedora14-xccdf.xml" timestamp="2012-07-20T12:22:58"><xccdf:Benchmark xmlns:xccdf="http://checklists.nist.gov/xccdf/1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="xccdf_cdf_benchmark_scap-fedora14-xccdf.xml" resolved="1" style="SCAP_1.2" xml:lang="en" xsi:schemaLocation="http://checklists.nist.gov/xccdf/1.2 http://scap.nist.gov/schema/xccdf/1.2/xccdf_1.2.xsd http://cpe.mitre.org/dictionary/2.0 http://scap.nist.gov/schema/cpe/2.3/cpe-dictionary_2.3.xsd">
|
|
|
fa2dd6 |
<xccdf:status date="2011-10-12">draft</xccdf:status>
|
|
|
fa2dd6 |
<xccdf:title>Example of SCAP Security Guidance</xccdf:title>
|
|
|
fa2dd6 |
<xccdf:description>This example security guidance has been created to demonstrate SCAP functionality
|
|
|
fa2dd6 |
diff --git a/tests/sce/test_sce_in_ds.xml b/tests/sce/test_sce_in_ds.xml
|
|
|
fa2dd6 |
index 14e0876e6..62c45781c 100644
|
|
|
fa2dd6 |
--- a/tests/sce/test_sce_in_ds.xml
|
|
|
fa2dd6 |
+++ b/tests/sce/test_sce_in_ds.xml
|
|
|
fa2dd6 |
@@ -1,5 +1,5 @@
|
|
|
fa2dd6 |
|
|
|
fa2dd6 |
-<ds:data-stream-collection xmlns:ds="http://scap.nist.gov/schema/scap/source/1.2" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:cat="urn:oasis:names:tc:entity:xmlns:xml:catalog" id="scap_org.open-scap_collection_from_xccdf_all-resolved-xccdf-dummyoval.xml" schematron-version="1.0">
|
|
|
fa2dd6 |
+<ds:data-stream-collection xmlns:ds="http://scap.nist.gov/schema/scap/source/1.2" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:cat="urn:oasis:names:tc:entity:xmlns:xml:catalog" id="scap_org.open-scap_collection_from_xccdf_all-resolved-xccdf-dummyoval.xml" schematron-version="1.2">
|
|
|
fa2dd6 |
<ds:data-stream id="scap_org.open-scap_datastream_from_xccdf_all-resolved-xccdf-dummyoval.xml" scap-version="1.2" use-case="OTHER">
|
|
|
fa2dd6 |
<ds:checklists>
|
|
|
fa2dd6 |
<ds:component-ref id="scap_org.open-scap_cref_all-resolved-xccdf-dummyoval.xml" xlink:href="#scap_org.open-scap_comp_all-resolved-xccdf-dummyoval.xml">
|
|
|
fa2dd6 |
|
|
|
fa2dd6 |
From 190ca9d3db7049879be4308c5194f2406cc5f70b Mon Sep 17 00:00:00 2001
|
|
|
fa2dd6 |
From: =?UTF-8?q?Jan=20=C4=8Cern=C3=BD?= <jcerny@redhat.com>
|
|
|
fa2dd6 |
Date: Thu, 9 May 2019 09:44:06 +0200
|
|
|
fa2dd6 |
Subject: [PATCH 6/9] Detect source datastream version
|
|
|
fa2dd6 |
|
|
|
fa2dd6 |
Instead of hard-coding SCAP 1.2, we will use
|
|
|
fa2dd6 |
data-stream-collection@schematron-version attribute to detect the SCAP
|
|
|
fa2dd6 |
version of datastream and we will choose the right XML schema
|
|
|
fa2dd6 |
accordingly. So far, only 1.2 and 1.3 datastreams are supported.
|
|
|
fa2dd6 |
---
|
|
|
fa2dd6 |
src/DS/sds.c | 26 ++++++++++++++++++++++++++
|
|
|
fa2dd6 |
src/DS/sds_priv.h | 4 ++++
|
|
|
fa2dd6 |
src/source/Makefile.am | 1 +
|
|
|
fa2dd6 |
src/source/oscap_source.c | 3 ++-
|
|
|
fa2dd6 |
src/source/validate.c | 1 +
|
|
|
fa2dd6 |
5 files changed, 34 insertions(+), 1 deletion(-)
|
|
|
fa2dd6 |
|
|
|
fa2dd6 |
diff --git a/src/DS/sds.c b/src/DS/sds.c
|
|
|
fa2dd6 |
index b7c33a2e5..c4271b26e 100644
|
|
|
fa2dd6 |
--- a/src/DS/sds.c
|
|
|
fa2dd6 |
+++ b/src/DS/sds.c
|
|
|
fa2dd6 |
@@ -1265,3 +1265,29 @@ int ds_sds_compose_from_xccdf(const char *xccdf_file, const char *target_datastr
|
|
|
fa2dd6 |
xmlFreeDoc(doc);
|
|
|
fa2dd6 |
return 0;
|
|
|
fa2dd6 |
}
|
|
|
fa2dd6 |
+
|
|
|
fa2dd6 |
+char *ds_sds_detect_version(xmlTextReader *reader)
|
|
|
fa2dd6 |
+{
|
|
|
fa2dd6 |
+ /* find root element */
|
|
|
fa2dd6 |
+ while (xmlTextReaderRead(reader) == 1 && xmlTextReaderNodeType(reader) != XML_READER_TYPE_ELEMENT)
|
|
|
fa2dd6 |
+ ;
|
|
|
fa2dd6 |
+
|
|
|
fa2dd6 |
+ char *element_name = (char *) xmlTextReaderConstLocalName(reader);
|
|
|
fa2dd6 |
+ if (!element_name) {
|
|
|
fa2dd6 |
+ oscap_setxmlerr(xmlGetLastError());
|
|
|
fa2dd6 |
+ return NULL;
|
|
|
fa2dd6 |
+ }
|
|
|
fa2dd6 |
+ if (strcmp(element_name, "data-stream-collection")) {
|
|
|
fa2dd6 |
+ oscap_seterr(OSCAP_EFAMILY_OSCAP,
|
|
|
fa2dd6 |
+ "Expected root element name for SCAP source datastream is" \
|
|
|
fa2dd6 |
+ "'data-stream-collection' but actual root element name is '%s'.",
|
|
|
fa2dd6 |
+ element_name);
|
|
|
fa2dd6 |
+ return NULL;
|
|
|
fa2dd6 |
+ }
|
|
|
fa2dd6 |
+ char *schematron_version = (char *) xmlTextReaderGetAttribute(reader, BAD_CAST "schematron-version");
|
|
|
fa2dd6 |
+ if (!schematron_version) {
|
|
|
fa2dd6 |
+ oscap_setxmlerr(xmlGetLastError());
|
|
|
fa2dd6 |
+ return NULL;
|
|
|
fa2dd6 |
+ }
|
|
|
fa2dd6 |
+ return schematron_version;
|
|
|
fa2dd6 |
+}
|
|
|
fa2dd6 |
diff --git a/src/DS/sds_priv.h b/src/DS/sds_priv.h
|
|
|
fa2dd6 |
index 0ba2e8cb7..39c36da9f 100644
|
|
|
fa2dd6 |
--- a/src/DS/sds_priv.h
|
|
|
fa2dd6 |
+++ b/src/DS/sds_priv.h
|
|
|
fa2dd6 |
@@ -26,6 +26,7 @@
|
|
|
fa2dd6 |
#endif
|
|
|
fa2dd6 |
|
|
|
fa2dd6 |
#include <libxml/tree.h>
|
|
|
fa2dd6 |
+#include <libxml/xmlreader.h>
|
|
|
fa2dd6 |
#include "common/public/oscap.h"
|
|
|
fa2dd6 |
#include "common/util.h"
|
|
|
fa2dd6 |
#include "ds_sds_session.h"
|
|
|
fa2dd6 |
@@ -45,5 +45,8 @@
|
|
|
fa2dd6 |
xmlDocPtr ds_sds_compose_xmlDoc_from_xccdf(const char *xccdf_file);
|
|
|
fa2dd6 |
xmlDocPtr ds_sds_compose_xmlDoc_from_xccdf_source(struct oscap_source *xccdf_source);
|
|
|
fa2dd6 |
|
|
|
fa2dd6 |
+char *ds_sds_detect_version(xmlTextReader *reader);
|
|
|
fa2dd6 |
+
|
|
|
fa2dd6 |
OSCAP_HIDDEN_END;
|
|
|
fa2dd6 |
+
|
|
|
fa2dd6 |
#endif
|
|
|
fa2dd6 |
diff --git a/src/source/Makefile.am b/src/source/Makefile.am
|
|
|
fa2dd6 |
index 446bf4596..ad37ba6f6 100644
|
|
|
fa2dd6 |
--- a/src/source/Makefile.am
|
|
|
fa2dd6 |
+++ b/src/source/Makefile.am
|
|
|
fa2dd6 |
@@ -19,6 +19,7 @@ liboscapsource_la_CPPFLAGS = \
|
|
|
fa2dd6 |
@xml2_CFLAGS@ @xslt_CFLAGS@ @exslt_CFLAGS@ \
|
|
|
fa2dd6 |
-I$(srcdir)/public \
|
|
|
fa2dd6 |
-I$(top_srcdir)/src \
|
|
|
fa2dd6 |
+ -I$(top_srcdir)/src/DS/public \
|
|
|
fa2dd6 |
-I$(top_srcdir)/src/CPE/public \
|
|
|
fa2dd6 |
-I$(top_srcdir)/src/OVAL/probes/SEAP/public \
|
|
|
fa2dd6 |
-I$(top_srcdir)/src/common/public
|
|
|
fa2dd6 |
diff --git a/src/source/oscap_source.c b/src/source/oscap_source.c
|
|
|
fa2dd6 |
index 3b7282ed3..228dc049b 100644
|
|
|
fa2dd6 |
--- a/src/source/oscap_source.c
|
|
|
fa2dd6 |
+++ b/src/source/oscap_source.c
|
|
|
fa2dd6 |
@@ -51,6 +51,7 @@
|
|
|
fa2dd6 |
#include "source/validate_priv.h"
|
|
|
fa2dd6 |
#include "XCCDF/elements.h"
|
|
|
fa2dd6 |
#include "XCCDF/public/xccdf_benchmark.h"
|
|
|
fa2dd6 |
+#include "DS/sds_priv.h"
|
|
|
fa2dd6 |
|
|
|
fa2dd6 |
typedef enum oscap_source_type {
|
|
|
fa2dd6 |
OSCAP_SRC_FROM_USER_XML_FILE = 1, ///< The source originated from XML file supplied by user
|
|
|
fa2dd6 |
@@ -360,7 +361,7 @@ const char *oscap_source_get_schema_version(struct oscap_source *source)
|
|
|
fa2dd6 |
}
|
|
|
fa2dd6 |
switch (oscap_source_get_scap_type(source)) {
|
|
|
fa2dd6 |
case OSCAP_DOCUMENT_SDS:
|
|
|
fa2dd6 |
- source->origin.version = oscap_strdup("1.2");
|
|
|
fa2dd6 |
+ source->origin.version = ds_sds_detect_version(reader);
|
|
|
fa2dd6 |
break;
|
|
|
fa2dd6 |
case OSCAP_DOCUMENT_ARF:
|
|
|
fa2dd6 |
source->origin.version = oscap_strdup("1.1");
|
|
|
fa2dd6 |
diff --git a/src/source/validate.c b/src/source/validate.c
|
|
|
fa2dd6 |
index 4c7aa98c4..730d44b2f 100644
|
|
|
fa2dd6 |
--- a/src/source/validate.c
|
|
|
fa2dd6 |
+++ b/src/source/validate.c
|
|
|
fa2dd6 |
@@ -220,6 +220,7 @@ struct oscap_schema_table_entry OSCAP_SCHEMAS_TABLE[] = {
|
|
|
fa2dd6 |
{OSCAP_DOCUMENT_XCCDF_TAILORING, "1.2", "xccdf/1.2/xccdf_1.2.xsd"},
|
|
|
fa2dd6 |
{OSCAP_DOCUMENT_XCCDF_TAILORING, "1.1", "xccdf/1.1-tailoring/xccdf-1.1-tailoring.xsd"}, // unofficial openscap extension!
|
|
|
fa2dd6 |
{OSCAP_DOCUMENT_SDS, "1.2", "sds/1.2/scap-source-data-stream_1.2.xsd"},
|
|
|
fa2dd6 |
+ {OSCAP_DOCUMENT_SDS, "1.3", "sds/1.3/scap-source-data-stream_1.3.xsd"},
|
|
|
fa2dd6 |
{OSCAP_DOCUMENT_ARF, "1.1", "arf/1.1/asset-reporting-format_1.1.0.xsd"},
|
|
|
fa2dd6 |
{OSCAP_DOCUMENT_CPE_DICTIONARY, "2.0", "cpe/2.0/cpe-dictionary_2.0.xsd"},
|
|
|
fa2dd6 |
{OSCAP_DOCUMENT_CPE_DICTIONARY, "2.1", "cpe/2.1/cpe-dictionary_2.1.xsd"},
|
|
|
fa2dd6 |
|
|
|
fa2dd6 |
From 8457c924957f16b43921ed488a0268d868d94ac4 Mon Sep 17 00:00:00 2001
|
|
|
fa2dd6 |
From: =?UTF-8?q?Jan=20=C4=8Cern=C3=BD?= <jcerny@redhat.com>
|
|
|
fa2dd6 |
Date: Fri, 10 May 2019 09:48:46 +0200
|
|
|
fa2dd6 |
Subject: [PATCH 7/9] Add a simple test for oscap info
|
|
|
fa2dd6 |
|
|
|
fa2dd6 |
This test tests if `oscap` is able to detect the version
|
|
|
fa2dd6 |
of SCAP source datastream (if DS is SCAP 1.2 or 1.3).
|
|
|
fa2dd6 |
---
|
|
|
fa2dd6 |
configure.ac | 1 +
|
|
|
fa2dd6 |
tests/DS/Makefile.am | 2 +-
|
|
|
fa2dd6 |
tests/DS/sds_detect_version/Makefile.am | 13 +++++
|
|
|
fa2dd6 |
tests/DS/sds_detect_version/scap-1.2-ds.xml | 51 +++++++++++++++++++
|
|
|
fa2dd6 |
tests/DS/sds_detect_version/scap-1.3-ds.xml | 51 +++++++++++++++++++
|
|
|
fa2dd6 |
.../sds_detect_version/test_detect_version.sh | 27 ++++++++++
|
|
|
fa2dd6 |
7 files changed, 145 insertions(+), 1 deletion(-)
|
|
|
fa2dd6 |
create mode 100644 tests/DS/sds_detect_version/Makefile.am
|
|
|
fa2dd6 |
create mode 100644 tests/DS/sds_detect_version/scap-1.2-ds.xml
|
|
|
fa2dd6 |
create mode 100644 tests/DS/sds_detect_version/scap-1.3-ds.xml
|
|
|
fa2dd6 |
create mode 100755 tests/DS/sds_detect_version/test_detect_version.sh
|
|
|
fa2dd6 |
|
|
|
fa2dd6 |
diff --git a/configure.ac b/configure.ac
|
|
|
fa2dd6 |
index dd02507da..91fba1390 100644
|
|
|
fa2dd6 |
--- a/configure.ac
|
|
|
fa2dd6 |
+++ b/configure.ac
|
|
|
fa2dd6 |
@@ -1548,6 +1548,7 @@ AC_CONFIG_FILES([Makefile
|
|
|
fa2dd6 |
src/DS/Makefile
|
|
|
fa2dd6 |
tests/DS/Makefile
|
|
|
fa2dd6 |
tests/DS/ds_sds_index/Makefile
|
|
|
fa2dd6 |
+ tests/DS/sds_detect_version/Makefile
|
|
|
fa2dd6 |
tests/DS/signed/Makefile
|
|
|
fa2dd6 |
tests/DS/validate/Makefile
|
|
|
fa2dd6 |
|
|
|
fa2dd6 |
diff --git a/tests/DS/Makefile.am b/tests/DS/Makefile.am
|
|
|
fa2dd6 |
index ea742386d..e0f63348c 100644
|
|
|
fa2dd6 |
--- a/tests/DS/Makefile.am
|
|
|
fa2dd6 |
+++ b/tests/DS/Makefile.am
|
|
|
fa2dd6 |
@@ -60,4 +60,4 @@ EXTRA_DIST = test_ds.sh \
|
|
|
fa2dd6 |
sds_subdir/subdir/scap-fedora14-xccdf.xml \
|
|
|
fa2dd6 |
sds_tailoring/sds.ds.xml
|
|
|
fa2dd6 |
|
|
|
fa2dd6 |
-SUBDIRS = ds_sds_index signed validate
|
|
|
fa2dd6 |
+SUBDIRS = ds_sds_index signed validate sds_detect_version
|
|
|
fa2dd6 |
diff --git a/tests/DS/sds_detect_version/Makefile.am b/tests/DS/sds_detect_version/Makefile.am
|
|
|
fa2dd6 |
new file mode 100644
|
|
|
fa2dd6 |
index 000000000..087888742
|
|
|
fa2dd6 |
--- /dev/null
|
|
|
fa2dd6 |
+++ b/tests/DS/sds_detect_version/Makefile.am
|
|
|
fa2dd6 |
@@ -0,0 +1,13 @@
|
|
|
fa2dd6 |
+DISTCLEANFILES = *.log *.results oscap_debug.log.*
|
|
|
fa2dd6 |
+CLEANFILES = *.log *.results oscap_debug.log.*
|
|
|
fa2dd6 |
+
|
|
|
fa2dd6 |
+TESTS_ENVIRONMENT= \
|
|
|
fa2dd6 |
+ builddir=$(top_builddir) \
|
|
|
fa2dd6 |
+ OSCAP_FULL_VALIDATION=1 \
|
|
|
fa2dd6 |
+ $(top_builddir)/run
|
|
|
fa2dd6 |
+
|
|
|
fa2dd6 |
+TESTS = test_detect_version.sh
|
|
|
fa2dd6 |
+
|
|
|
fa2dd6 |
+EXTRA_DIST = test_detect_version.sh \
|
|
|
fa2dd6 |
+ scap-1.2-ds.xml \
|
|
|
fa2dd6 |
+ scap-1.3-ds.xml
|
|
|
fa2dd6 |
diff --git a/tests/DS/sds_detect_version/scap-1.2-ds.xml b/tests/DS/sds_detect_version/scap-1.2-ds.xml
|
|
|
fa2dd6 |
new file mode 100644
|
|
|
fa2dd6 |
index 000000000..12e4954ae
|
|
|
fa2dd6 |
--- /dev/null
|
|
|
fa2dd6 |
+++ b/tests/DS/sds_detect_version/scap-1.2-ds.xml
|
|
|
fa2dd6 |
@@ -0,0 +1,51 @@
|
|
|
fa2dd6 |
+
|
|
|
fa2dd6 |
+<ns0:data-stream-collection xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:html="http://www.w3.org/1999/xhtml" xmlns:ns0="http://scap.nist.gov/schema/scap/source/1.2" xmlns:ns1="http://www.w3.org/1999/xlink" xmlns:ns10="http://checklists.nist.gov/xccdf/1.2" xmlns:ns13="http://cpe.mitre.org/dictionary/2.0" xmlns:ns2="urn:oasis:names:tc:entity:xmlns:xml:catalog" xmlns:ns3="http://scap.nist.gov/schema/ocil/2.0" xmlns:ns4="http://oval.mitre.org/XMLSchema/oval-definitions-5" xmlns:ns6="http://oval.mitre.org/XMLSchema/oval-common-5" xmlns:ns7="http://oval.mitre.org/XMLSchema/oval-definitions-5#independent" xmlns:ns8="http://oval.mitre.org/XMLSchema/oval-definitions-5#unix" xmlns:ns9="http://oval.mitre.org/XMLSchema/oval-definitions-5#linux" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="scap_org.open-scap_collection_from_xccdf_ssg-rhel8-xccdf-1.2.xml" schematron-version="1.2">
|
|
|
fa2dd6 |
+ <ns0:data-stream id="scap_org.open-scap_datastream_from_xccdf_ssg-rhel8-xccdf-1.2.xml" scap-version="1.2" use-case="OTHER">
|
|
|
fa2dd6 |
+ <ns0:checks>
|
|
|
fa2dd6 |
+ <ns0:component-ref id="scap_org.open-scap_cref_ssg-rhel8-oval.xml" ns1:href="#scap_org.open-scap_comp_ssg-rhel8-oval.xml"/>
|
|
|
fa2dd6 |
+ </ns0:checks>
|
|
|
fa2dd6 |
+ </ns0:data-stream>
|
|
|
fa2dd6 |
+ <ns0:component id="scap_org.open-scap_comp_ssg-rhel8-oval.xml" timestamp="2019-05-10T08:18:44">
|
|
|
fa2dd6 |
+ <ns4:oval_definitions xsi:schemaLocation="http://oval.mitre.org/XMLSchema/oval-common-5 oval-common-schema.xsd http://oval.mitre.org/XMLSchema/oval-definitions-5 oval-definitions-schema.xsd http://oval.mitre.org/XMLSchema/oval-definitions-5#independent independent-definitions-schema.xsd http://oval.mitre.org/XMLSchema/oval-definitions-5#unix unix-definitions-schema.xsd http://oval.mitre.org/XMLSchema/oval-definitions-5#linux linux-definitions-schema.xsd">
|
|
|
fa2dd6 |
+ <ns4:generator>
|
|
|
fa2dd6 |
+ <ns6:product_name>combine_ovals.py from SCAP Security Guide</ns6:product_name>
|
|
|
fa2dd6 |
+ <ns6:product_version>ssg: [0, 1, 44], python: 3.7.3</ns6:product_version>
|
|
|
fa2dd6 |
+ <ns6:schema_version>5.10</ns6:schema_version>
|
|
|
fa2dd6 |
+ <ns6:timestamp>2019-05-10T06:18:18</ns6:timestamp>
|
|
|
fa2dd6 |
+ </ns4:generator>
|
|
|
fa2dd6 |
+ <ns4:definitions>
|
|
|
fa2dd6 |
+ <ns4:definition class="inventory" id="oval:ssg-installed_OS_is_rhel8:def:1" version="1">
|
|
|
fa2dd6 |
+ <ns4:metadata>
|
|
|
fa2dd6 |
+ <ns4:title>Red Hat Enterprise Linux 8</ns4:title>
|
|
|
fa2dd6 |
+ <ns4:affected family="unix">
|
|
|
fa2dd6 |
+ <ns4:platform>Red Hat Enterprise Linux 8</ns4:platform>
|
|
|
fa2dd6 |
+ </ns4:affected>
|
|
|
fa2dd6 |
+ <ns4:reference ref_id="cpe:/o:redhat:enterprise_linux:8" source="CPE"/>
|
|
|
fa2dd6 |
+ <ns4:description>The operating system installed on the system is
|
|
|
fa2dd6 |
+ Red Hat Enterprise Linux 8</ns4:description>
|
|
|
fa2dd6 |
+ <ns4:reference ref_id="installed_OS_is_rhel8" source="ssg"/>
|
|
|
fa2dd6 |
+ </ns4:metadata>
|
|
|
fa2dd6 |
+ <ns4:criteria>
|
|
|
fa2dd6 |
+ <ns4:criterion comment="RHEL 8 is installed" test_ref="oval:ssg-test_rhel8:tst:1"/>
|
|
|
fa2dd6 |
+ </ns4:criteria>
|
|
|
fa2dd6 |
+ </ns4:definition>
|
|
|
fa2dd6 |
+ </ns4:definitions>
|
|
|
fa2dd6 |
+ <ns4:tests>
|
|
|
fa2dd6 |
+ <ns9:rpminfo_test check="all" check_existence="at_least_one_exists" comment="redhat-release is version 8" id="oval:ssg-test_rhel8:tst:1" version="1">
|
|
|
fa2dd6 |
+ <ns9:object object_ref="oval:ssg-obj_rhel8:obj:1"/>
|
|
|
fa2dd6 |
+ <ns9:state state_ref="oval:ssg-state_rhel8:ste:1"/>
|
|
|
fa2dd6 |
+ </ns9:rpminfo_test>
|
|
|
fa2dd6 |
+ </ns4:tests>
|
|
|
fa2dd6 |
+ <ns4:objects>
|
|
|
fa2dd6 |
+ <ns9:rpminfo_object id="oval:ssg-obj_rhel8:obj:1" version="1">
|
|
|
fa2dd6 |
+ <ns9:name>redhat-release</ns9:name>
|
|
|
fa2dd6 |
+ </ns9:rpminfo_object>
|
|
|
fa2dd6 |
+ </ns4:objects>
|
|
|
fa2dd6 |
+ <ns4:states>
|
|
|
fa2dd6 |
+ <ns9:rpminfo_state id="oval:ssg-state_rhel8:ste:1" version="1">
|
|
|
fa2dd6 |
+ <ns9:version operation="pattern match">^8.*$</ns9:version>
|
|
|
fa2dd6 |
+ </ns9:rpminfo_state>
|
|
|
fa2dd6 |
+ </ns4:states>
|
|
|
fa2dd6 |
+ </ns4:oval_definitions>
|
|
|
fa2dd6 |
+ </ns0:component>
|
|
|
fa2dd6 |
+</ns0:data-stream-collection>
|
|
|
fa2dd6 |
diff --git a/tests/DS/sds_detect_version/scap-1.3-ds.xml b/tests/DS/sds_detect_version/scap-1.3-ds.xml
|
|
|
fa2dd6 |
new file mode 100644
|
|
|
fa2dd6 |
index 000000000..5d4af29a3
|
|
|
fa2dd6 |
--- /dev/null
|
|
|
fa2dd6 |
+++ b/tests/DS/sds_detect_version/scap-1.3-ds.xml
|
|
|
fa2dd6 |
@@ -0,0 +1,51 @@
|
|
|
fa2dd6 |
+
|
|
|
fa2dd6 |
+<ns0:data-stream-collection xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:html="http://www.w3.org/1999/xhtml" xmlns:ns0="http://scap.nist.gov/schema/scap/source/1.2" xmlns:ns1="http://www.w3.org/1999/xlink" xmlns:ns10="http://checklists.nist.gov/xccdf/1.2" xmlns:ns13="http://cpe.mitre.org/dictionary/2.0" xmlns:ns2="urn:oasis:names:tc:entity:xmlns:xml:catalog" xmlns:ns3="http://scap.nist.gov/schema/ocil/2.0" xmlns:ns4="http://oval.mitre.org/XMLSchema/oval-definitions-5" xmlns:ns6="http://oval.mitre.org/XMLSchema/oval-common-5" xmlns:ns7="http://oval.mitre.org/XMLSchema/oval-definitions-5#independent" xmlns:ns8="http://oval.mitre.org/XMLSchema/oval-definitions-5#unix" xmlns:ns9="http://oval.mitre.org/XMLSchema/oval-definitions-5#linux" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="scap_org.open-scap_collection_from_xccdf_ssg-rhel8-xccdf-1.2.xml" schematron-version="1.3">
|
|
|
fa2dd6 |
+ <ns0:data-stream id="scap_org.open-scap_datastream_from_xccdf_ssg-rhel8-xccdf-1.2.xml" scap-version="1.3" use-case="OTHER">
|
|
|
fa2dd6 |
+ <ns0:checks>
|
|
|
fa2dd6 |
+ <ns0:component-ref id="scap_org.open-scap_cref_ssg-rhel8-oval.xml" ns1:href="#scap_org.open-scap_comp_ssg-rhel8-oval.xml"/>
|
|
|
fa2dd6 |
+ </ns0:checks>
|
|
|
fa2dd6 |
+ </ns0:data-stream>
|
|
|
fa2dd6 |
+ <ns0:component id="scap_org.open-scap_comp_ssg-rhel8-oval.xml" timestamp="2019-05-10T08:18:44">
|
|
|
fa2dd6 |
+ <ns4:oval_definitions xsi:schemaLocation="http://oval.mitre.org/XMLSchema/oval-common-5 oval-common-schema.xsd http://oval.mitre.org/XMLSchema/oval-definitions-5 oval-definitions-schema.xsd http://oval.mitre.org/XMLSchema/oval-definitions-5#independent independent-definitions-schema.xsd http://oval.mitre.org/XMLSchema/oval-definitions-5#unix unix-definitions-schema.xsd http://oval.mitre.org/XMLSchema/oval-definitions-5#linux linux-definitions-schema.xsd">
|
|
|
fa2dd6 |
+ <ns4:generator>
|
|
|
fa2dd6 |
+ <ns6:product_name>combine_ovals.py from SCAP Security Guide</ns6:product_name>
|
|
|
fa2dd6 |
+ <ns6:product_version>ssg: [0, 1, 44], python: 3.7.3</ns6:product_version>
|
|
|
fa2dd6 |
+ <ns6:schema_version>5.11</ns6:schema_version>
|
|
|
fa2dd6 |
+ <ns6:timestamp>2019-05-10T06:18:18</ns6:timestamp>
|
|
|
fa2dd6 |
+ </ns4:generator>
|
|
|
fa2dd6 |
+ <ns4:definitions>
|
|
|
fa2dd6 |
+ <ns4:definition class="inventory" id="oval:ssg-installed_OS_is_rhel8:def:1" version="1">
|
|
|
fa2dd6 |
+ <ns4:metadata>
|
|
|
fa2dd6 |
+ <ns4:title>Red Hat Enterprise Linux 8</ns4:title>
|
|
|
fa2dd6 |
+ <ns4:affected family="unix">
|
|
|
fa2dd6 |
+ <ns4:platform>Red Hat Enterprise Linux 8</ns4:platform>
|
|
|
fa2dd6 |
+ </ns4:affected>
|
|
|
fa2dd6 |
+ <ns4:reference ref_id="cpe:/o:redhat:enterprise_linux:8" source="CPE"/>
|
|
|
fa2dd6 |
+ <ns4:description>The operating system installed on the system is
|
|
|
fa2dd6 |
+ Red Hat Enterprise Linux 8</ns4:description>
|
|
|
fa2dd6 |
+ <ns4:reference ref_id="installed_OS_is_rhel8" source="ssg"/>
|
|
|
fa2dd6 |
+ </ns4:metadata>
|
|
|
fa2dd6 |
+ <ns4:criteria>
|
|
|
fa2dd6 |
+ <ns4:criterion comment="RHEL 8 is installed" test_ref="oval:ssg-test_rhel8:tst:1"/>
|
|
|
fa2dd6 |
+ </ns4:criteria>
|
|
|
fa2dd6 |
+ </ns4:definition>
|
|
|
fa2dd6 |
+ </ns4:definitions>
|
|
|
fa2dd6 |
+ <ns4:tests>
|
|
|
fa2dd6 |
+ <ns9:rpminfo_test check="all" check_existence="at_least_one_exists" comment="redhat-release is version 8" id="oval:ssg-test_rhel8:tst:1" version="1">
|
|
|
fa2dd6 |
+ <ns9:object object_ref="oval:ssg-obj_rhel8:obj:1"/>
|
|
|
fa2dd6 |
+ <ns9:state state_ref="oval:ssg-state_rhel8:ste:1"/>
|
|
|
fa2dd6 |
+ </ns9:rpminfo_test>
|
|
|
fa2dd6 |
+ </ns4:tests>
|
|
|
fa2dd6 |
+ <ns4:objects>
|
|
|
fa2dd6 |
+ <ns9:rpminfo_object id="oval:ssg-obj_rhel8:obj:1" version="1">
|
|
|
fa2dd6 |
+ <ns9:name>redhat-release</ns9:name>
|
|
|
fa2dd6 |
+ </ns9:rpminfo_object>
|
|
|
fa2dd6 |
+ </ns4:objects>
|
|
|
fa2dd6 |
+ <ns4:states>
|
|
|
fa2dd6 |
+ <ns9:rpminfo_state id="oval:ssg-state_rhel8:ste:1" version="1">
|
|
|
fa2dd6 |
+ <ns9:version operation="pattern match">^8.*$</ns9:version>
|
|
|
fa2dd6 |
+ </ns9:rpminfo_state>
|
|
|
fa2dd6 |
+ </ns4:states>
|
|
|
fa2dd6 |
+ </ns4:oval_definitions>
|
|
|
fa2dd6 |
+ </ns0:component>
|
|
|
fa2dd6 |
+</ns0:data-stream-collection>
|
|
|
fa2dd6 |
diff --git a/tests/DS/sds_detect_version/test_detect_version.sh b/tests/DS/sds_detect_version/test_detect_version.sh
|
|
|
fa2dd6 |
new file mode 100755
|
|
|
fa2dd6 |
index 000000000..607aac261
|
|
|
fa2dd6 |
--- /dev/null
|
|
|
fa2dd6 |
+++ b/tests/DS/sds_detect_version/test_detect_version.sh
|
|
|
fa2dd6 |
@@ -0,0 +1,27 @@
|
|
|
fa2dd6 |
+#!/bin/bash
|
|
|
fa2dd6 |
+
|
|
|
fa2dd6 |
+# Copyright 2019 Red Hat Inc., Durham, North Carolina.
|
|
|
fa2dd6 |
+# All Rights Reserved.
|
|
|
fa2dd6 |
+#
|
|
|
fa2dd6 |
+# OpenSCAP Test Suite
|
|
|
fa2dd6 |
+#
|
|
|
fa2dd6 |
+# Authors:
|
|
|
fa2dd6 |
+# Jan Černý <jcerny@redhat.com>
|
|
|
fa2dd6 |
+
|
|
|
fa2dd6 |
+. $builddir/tests/test_common.sh
|
|
|
fa2dd6 |
+
|
|
|
fa2dd6 |
+set -e -o pipefail
|
|
|
fa2dd6 |
+
|
|
|
fa2dd6 |
+function test_oscap_info {
|
|
|
fa2dd6 |
+ version="$1"
|
|
|
fa2dd6 |
+ stdout="$(mktemp)"
|
|
|
fa2dd6 |
+ stderr="$(mktemp)"
|
|
|
fa2dd6 |
+ $OSCAP info $srcdir/scap-$version-ds.xml > $stdout 2> $stderr
|
|
|
fa2dd6 |
+ [ ! -s $stderr ]
|
|
|
fa2dd6 |
+ grep -q "Version: $version" $stdout
|
|
|
fa2dd6 |
+ rm $stdout
|
|
|
fa2dd6 |
+ rm $stderr
|
|
|
fa2dd6 |
+}
|
|
|
fa2dd6 |
+
|
|
|
fa2dd6 |
+test_oscap_info "1.2"
|
|
|
fa2dd6 |
+test_oscap_info "1.3"
|
|
|
fa2dd6 |
|
|
|
fa2dd6 |
From 475b387ad359549645b9d7595eefdeea104cdf81 Mon Sep 17 00:00:00 2001
|
|
|
fa2dd6 |
From: =?UTF-8?q?Jan=20=C4=8Cern=C3=BD?= <jcerny@redhat.com>
|
|
|
fa2dd6 |
Date: Fri, 10 May 2019 10:11:59 +0200
|
|
|
fa2dd6 |
Subject: [PATCH 8/9] Add simple tests for validating SCAP 1.3 datastreams
|
|
|
fa2dd6 |
|
|
|
fa2dd6 |
Tests if `oscap ds sds-validate` can validate SCAP 1.3 datastreams
|
|
|
fa2dd6 |
against XML schema. The test uses a simple valid datastream and
|
|
|
fa2dd6 |
a simple invalid datastream.
|
|
|
fa2dd6 |
---
|
|
|
fa2dd6 |
tests/DS/validate/Makefile.am | 14 ++++----
|
|
|
fa2dd6 |
tests/DS/validate/all.sh | 2 ++
|
|
|
fa2dd6 |
tests/DS/validate/sds-1.3-invalid.xml | 48 +++++++++++++++++++++++++
|
|
|
fa2dd6 |
tests/DS/validate/sds-1.3-valid.xml | 51 +++++++++++++++++++++++++++
|
|
|
fa2dd6 |
4 files changed, 109 insertions(+), 6 deletions(-)
|
|
|
fa2dd6 |
create mode 100644 tests/DS/validate/sds-1.3-invalid.xml
|
|
|
fa2dd6 |
create mode 100644 tests/DS/validate/sds-1.3-valid.xml
|
|
|
fa2dd6 |
|
|
|
fa2dd6 |
diff --git a/tests/DS/validate/Makefile.am b/tests/DS/validate/Makefile.am
|
|
|
fa2dd6 |
index 0ebe28559..6cca84f98 100644
|
|
|
fa2dd6 |
--- a/tests/DS/validate/Makefile.am
|
|
|
fa2dd6 |
+++ b/tests/DS/validate/Makefile.am
|
|
|
fa2dd6 |
@@ -9,9 +9,11 @@ TESTS_ENVIRONMENT= \
|
|
|
fa2dd6 |
TESTS = all.sh
|
|
|
fa2dd6 |
|
|
|
fa2dd6 |
EXTRA_DIST = all.sh \
|
|
|
fa2dd6 |
- sds-valid.xml \
|
|
|
fa2dd6 |
- sds-invalid.xml \
|
|
|
fa2dd6 |
- sds-invalid-xccdf.xml \
|
|
|
fa2dd6 |
- sds-invalid-oval.xml \
|
|
|
fa2dd6 |
- rds-valid.xml \
|
|
|
fa2dd6 |
- rds-invalid.xml
|
|
|
fa2dd6 |
+ rds-invalid.xml \
|
|
|
fa2dd6 |
+ rds-valid.xml \
|
|
|
fa2dd6 |
+ sds-1.3-invalid.xml \
|
|
|
fa2dd6 |
+ sds-1.3-valid.xml \
|
|
|
fa2dd6 |
+ sds-invalid-oval.xml \
|
|
|
fa2dd6 |
+ sds-invalid-xccdf.xml \
|
|
|
fa2dd6 |
+ sds-invalid.xml \
|
|
|
fa2dd6 |
+ sds-valid.xml
|
|
|
fa2dd6 |
diff --git a/tests/DS/validate/all.sh b/tests/DS/validate/all.sh
|
|
|
fa2dd6 |
index b6c2de011..8d5845dff 100755
|
|
|
fa2dd6 |
--- a/tests/DS/validate/all.sh
|
|
|
fa2dd6 |
+++ b/tests/DS/validate/all.sh
|
|
|
fa2dd6 |
@@ -18,7 +18,9 @@ function test_validation {
|
|
|
fa2dd6 |
|
|
|
fa2dd6 |
test_init test_validation.log
|
|
|
fa2dd6 |
test_run "valid-sds" test_validation sds sds-valid.xml 0
|
|
|
fa2dd6 |
+test_run "valid-1.3-sds" test_validation sds sds-1.3-valid.xml 0
|
|
|
fa2dd6 |
test_run "invalid-sds" test_validation sds sds-invalid.xml 1
|
|
|
fa2dd6 |
+test_run "invalid-1.3-sds" test_validation sds sds-1.3-invalid.xml 1
|
|
|
fa2dd6 |
test_run "invalid-xccdf-sds" test_validation sds sds-invalid-xccdf.xml 1
|
|
|
fa2dd6 |
test_run "invalid-oval-sds" test_validation sds sds-invalid-oval.xml 1
|
|
|
fa2dd6 |
|
|
|
fa2dd6 |
diff --git a/tests/DS/validate/sds-1.3-invalid.xml b/tests/DS/validate/sds-1.3-invalid.xml
|
|
|
fa2dd6 |
new file mode 100644
|
|
|
fa2dd6 |
index 000000000..0f540925f
|
|
|
fa2dd6 |
--- /dev/null
|
|
|
fa2dd6 |
+++ b/tests/DS/validate/sds-1.3-invalid.xml
|
|
|
fa2dd6 |
@@ -0,0 +1,48 @@
|
|
|
fa2dd6 |
+
|
|
|
fa2dd6 |
+<ns0:data-stream-collection xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:html="http://www.w3.org/1999/xhtml" xmlns:ns0="http://scap.nist.gov/schema/scap/source/1.2" xmlns:ns1="http://www.w3.org/1999/xlink" xmlns:ns10="http://checklists.nist.gov/xccdf/1.2" xmlns:ns13="http://cpe.mitre.org/dictionary/2.0" xmlns:ns2="urn:oasis:names:tc:entity:xmlns:xml:catalog" xmlns:ns3="http://scap.nist.gov/schema/ocil/2.0" xmlns:ns4="http://oval.mitre.org/XMLSchema/oval-definitions-5" xmlns:ns6="http://oval.mitre.org/XMLSchema/oval-common-5" xmlns:ns7="http://oval.mitre.org/XMLSchema/oval-definitions-5#independent" xmlns:ns8="http://oval.mitre.org/XMLSchema/oval-definitions-5#unix" xmlns:ns9="http://oval.mitre.org/XMLSchema/oval-definitions-5#linux" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="scap_org.open-scap_collection_from_xccdf_ssg-rhel8-xccdf-1.2.xml" schematron-version="1.3">
|
|
|
fa2dd6 |
+ <ns0:data-stream id="scap_org.open-scap_datastream_from_xccdf_ssg-rhel8-xccdf-1.2.xml" scap-version="1.3" use-case="OTHER">
|
|
|
fa2dd6 |
+ </ns0:data-stream>
|
|
|
fa2dd6 |
+ <ns0:component id="scap_org.open-scap_comp_ssg-rhel8-oval.xml" timestamp="2019-05-10T08:18:44">
|
|
|
fa2dd6 |
+ <ns4:oval_definitions xsi:schemaLocation="http://oval.mitre.org/XMLSchema/oval-common-5 oval-common-schema.xsd http://oval.mitre.org/XMLSchema/oval-definitions-5 oval-definitions-schema.xsd http://oval.mitre.org/XMLSchema/oval-definitions-5#independent independent-definitions-schema.xsd http://oval.mitre.org/XMLSchema/oval-definitions-5#unix unix-definitions-schema.xsd http://oval.mitre.org/XMLSchema/oval-definitions-5#linux linux-definitions-schema.xsd">
|
|
|
fa2dd6 |
+ <ns4:generator>
|
|
|
fa2dd6 |
+ <ns6:product_name>combine_ovals.py from SCAP Security Guide</ns6:product_name>
|
|
|
fa2dd6 |
+ <ns6:product_version>ssg: [0, 1, 44], python: 3.7.3</ns6:product_version>
|
|
|
fa2dd6 |
+ <ns6:schema_version>5.11</ns6:schema_version>
|
|
|
fa2dd6 |
+ <ns6:timestamp>2019-05-10T06:18:18</ns6:timestamp>
|
|
|
fa2dd6 |
+ </ns4:generator>
|
|
|
fa2dd6 |
+ <ns4:definitions>
|
|
|
fa2dd6 |
+ <ns4:definition class="inventory" id="oval:ssg-installed_OS_is_rhel8:def:1" version="1">
|
|
|
fa2dd6 |
+ <ns4:metadata>
|
|
|
fa2dd6 |
+ <ns4:title>Red Hat Enterprise Linux 8</ns4:title>
|
|
|
fa2dd6 |
+ <ns4:affected family="unix">
|
|
|
fa2dd6 |
+ <ns4:platform>Red Hat Enterprise Linux 8</ns4:platform>
|
|
|
fa2dd6 |
+ </ns4:affected>
|
|
|
fa2dd6 |
+ <ns4:reference ref_id="cpe:/o:redhat:enterprise_linux:8" source="CPE"/>
|
|
|
fa2dd6 |
+ <ns4:description>The operating system installed on the system is
|
|
|
fa2dd6 |
+ Red Hat Enterprise Linux 8</ns4:description>
|
|
|
fa2dd6 |
+ <ns4:reference ref_id="installed_OS_is_rhel8" source="ssg"/>
|
|
|
fa2dd6 |
+ </ns4:metadata>
|
|
|
fa2dd6 |
+ <ns4:criteria>
|
|
|
fa2dd6 |
+ <ns4:criterion comment="RHEL 8 is installed" test_ref="oval:ssg-test_rhel8:tst:1"/>
|
|
|
fa2dd6 |
+ </ns4:criteria>
|
|
|
fa2dd6 |
+ </ns4:definition>
|
|
|
fa2dd6 |
+ </ns4:definitions>
|
|
|
fa2dd6 |
+ <ns4:tests>
|
|
|
fa2dd6 |
+ <ns9:rpminfo_test check="all" check_existence="at_least_one_exists" comment="redhat-release is version 8" id="oval:ssg-test_rhel8:tst:1" version="1">
|
|
|
fa2dd6 |
+ <ns9:object object_ref="oval:ssg-obj_rhel8:obj:1"/>
|
|
|
fa2dd6 |
+ <ns9:state state_ref="oval:ssg-state_rhel8:ste:1"/>
|
|
|
fa2dd6 |
+ </ns9:rpminfo_test>
|
|
|
fa2dd6 |
+ </ns4:tests>
|
|
|
fa2dd6 |
+ <ns4:objects>
|
|
|
fa2dd6 |
+ <ns9:rpminfo_object id="oval:ssg-obj_rhel8:obj:1" version="1">
|
|
|
fa2dd6 |
+ <ns9:name>redhat-release</ns9:name>
|
|
|
fa2dd6 |
+ </ns9:rpminfo_object>
|
|
|
fa2dd6 |
+ </ns4:objects>
|
|
|
fa2dd6 |
+ <ns4:states>
|
|
|
fa2dd6 |
+ <ns9:rpminfo_state id="oval:ssg-state_rhel8:ste:1" version="1">
|
|
|
fa2dd6 |
+ <ns9:version operation="pattern match">^8.*$</ns9:version>
|
|
|
fa2dd6 |
+ </ns9:rpminfo_state>
|
|
|
fa2dd6 |
+ </ns4:states>
|
|
|
fa2dd6 |
+ </ns4:oval_definitions>
|
|
|
fa2dd6 |
+ </ns0:component>
|
|
|
fa2dd6 |
+</ns0:data-stream-collection>
|
|
|
fa2dd6 |
diff --git a/tests/DS/validate/sds-1.3-valid.xml b/tests/DS/validate/sds-1.3-valid.xml
|
|
|
fa2dd6 |
new file mode 100644
|
|
|
fa2dd6 |
index 000000000..5d4af29a3
|
|
|
fa2dd6 |
--- /dev/null
|
|
|
fa2dd6 |
+++ b/tests/DS/validate/sds-1.3-valid.xml
|
|
|
fa2dd6 |
@@ -0,0 +1,51 @@
|
|
|
fa2dd6 |
+
|
|
|
fa2dd6 |
+<ns0:data-stream-collection xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:html="http://www.w3.org/1999/xhtml" xmlns:ns0="http://scap.nist.gov/schema/scap/source/1.2" xmlns:ns1="http://www.w3.org/1999/xlink" xmlns:ns10="http://checklists.nist.gov/xccdf/1.2" xmlns:ns13="http://cpe.mitre.org/dictionary/2.0" xmlns:ns2="urn:oasis:names:tc:entity:xmlns:xml:catalog" xmlns:ns3="http://scap.nist.gov/schema/ocil/2.0" xmlns:ns4="http://oval.mitre.org/XMLSchema/oval-definitions-5" xmlns:ns6="http://oval.mitre.org/XMLSchema/oval-common-5" xmlns:ns7="http://oval.mitre.org/XMLSchema/oval-definitions-5#independent" xmlns:ns8="http://oval.mitre.org/XMLSchema/oval-definitions-5#unix" xmlns:ns9="http://oval.mitre.org/XMLSchema/oval-definitions-5#linux" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="scap_org.open-scap_collection_from_xccdf_ssg-rhel8-xccdf-1.2.xml" schematron-version="1.3">
|
|
|
fa2dd6 |
+ <ns0:data-stream id="scap_org.open-scap_datastream_from_xccdf_ssg-rhel8-xccdf-1.2.xml" scap-version="1.3" use-case="OTHER">
|
|
|
fa2dd6 |
+ <ns0:checks>
|
|
|
fa2dd6 |
+ <ns0:component-ref id="scap_org.open-scap_cref_ssg-rhel8-oval.xml" ns1:href="#scap_org.open-scap_comp_ssg-rhel8-oval.xml"/>
|
|
|
fa2dd6 |
+ </ns0:checks>
|
|
|
fa2dd6 |
+ </ns0:data-stream>
|
|
|
fa2dd6 |
+ <ns0:component id="scap_org.open-scap_comp_ssg-rhel8-oval.xml" timestamp="2019-05-10T08:18:44">
|
|
|
fa2dd6 |
+ <ns4:oval_definitions xsi:schemaLocation="http://oval.mitre.org/XMLSchema/oval-common-5 oval-common-schema.xsd http://oval.mitre.org/XMLSchema/oval-definitions-5 oval-definitions-schema.xsd http://oval.mitre.org/XMLSchema/oval-definitions-5#independent independent-definitions-schema.xsd http://oval.mitre.org/XMLSchema/oval-definitions-5#unix unix-definitions-schema.xsd http://oval.mitre.org/XMLSchema/oval-definitions-5#linux linux-definitions-schema.xsd">
|
|
|
fa2dd6 |
+ <ns4:generator>
|
|
|
fa2dd6 |
+ <ns6:product_name>combine_ovals.py from SCAP Security Guide</ns6:product_name>
|
|
|
fa2dd6 |
+ <ns6:product_version>ssg: [0, 1, 44], python: 3.7.3</ns6:product_version>
|
|
|
fa2dd6 |
+ <ns6:schema_version>5.11</ns6:schema_version>
|
|
|
fa2dd6 |
+ <ns6:timestamp>2019-05-10T06:18:18</ns6:timestamp>
|
|
|
fa2dd6 |
+ </ns4:generator>
|
|
|
fa2dd6 |
+ <ns4:definitions>
|
|
|
fa2dd6 |
+ <ns4:definition class="inventory" id="oval:ssg-installed_OS_is_rhel8:def:1" version="1">
|
|
|
fa2dd6 |
+ <ns4:metadata>
|
|
|
fa2dd6 |
+ <ns4:title>Red Hat Enterprise Linux 8</ns4:title>
|
|
|
fa2dd6 |
+ <ns4:affected family="unix">
|
|
|
fa2dd6 |
+ <ns4:platform>Red Hat Enterprise Linux 8</ns4:platform>
|
|
|
fa2dd6 |
+ </ns4:affected>
|
|
|
fa2dd6 |
+ <ns4:reference ref_id="cpe:/o:redhat:enterprise_linux:8" source="CPE"/>
|
|
|
fa2dd6 |
+ <ns4:description>The operating system installed on the system is
|
|
|
fa2dd6 |
+ Red Hat Enterprise Linux 8</ns4:description>
|
|
|
fa2dd6 |
+ <ns4:reference ref_id="installed_OS_is_rhel8" source="ssg"/>
|
|
|
fa2dd6 |
+ </ns4:metadata>
|
|
|
fa2dd6 |
+ <ns4:criteria>
|
|
|
fa2dd6 |
+ <ns4:criterion comment="RHEL 8 is installed" test_ref="oval:ssg-test_rhel8:tst:1"/>
|
|
|
fa2dd6 |
+ </ns4:criteria>
|
|
|
fa2dd6 |
+ </ns4:definition>
|
|
|
fa2dd6 |
+ </ns4:definitions>
|
|
|
fa2dd6 |
+ <ns4:tests>
|
|
|
fa2dd6 |
+ <ns9:rpminfo_test check="all" check_existence="at_least_one_exists" comment="redhat-release is version 8" id="oval:ssg-test_rhel8:tst:1" version="1">
|
|
|
fa2dd6 |
+ <ns9:object object_ref="oval:ssg-obj_rhel8:obj:1"/>
|
|
|
fa2dd6 |
+ <ns9:state state_ref="oval:ssg-state_rhel8:ste:1"/>
|
|
|
fa2dd6 |
+ </ns9:rpminfo_test>
|
|
|
fa2dd6 |
+ </ns4:tests>
|
|
|
fa2dd6 |
+ <ns4:objects>
|
|
|
fa2dd6 |
+ <ns9:rpminfo_object id="oval:ssg-obj_rhel8:obj:1" version="1">
|
|
|
fa2dd6 |
+ <ns9:name>redhat-release</ns9:name>
|
|
|
fa2dd6 |
+ </ns9:rpminfo_object>
|
|
|
fa2dd6 |
+ </ns4:objects>
|
|
|
fa2dd6 |
+ <ns4:states>
|
|
|
fa2dd6 |
+ <ns9:rpminfo_state id="oval:ssg-state_rhel8:ste:1" version="1">
|
|
|
fa2dd6 |
+ <ns9:version operation="pattern match">^8.*$</ns9:version>
|
|
|
fa2dd6 |
+ </ns9:rpminfo_state>
|
|
|
fa2dd6 |
+ </ns4:states>
|
|
|
fa2dd6 |
+ </ns4:oval_definitions>
|
|
|
fa2dd6 |
+ </ns0:component>
|
|
|
fa2dd6 |
+</ns0:data-stream-collection>
|
|
|
fa2dd6 |
|
|
|
fa2dd6 |
From 09d00acda9153c4012dca5a05ee226fc05ba2080 Mon Sep 17 00:00:00 2001
|
|
|
fa2dd6 |
From: =?UTF-8?q?Jan=20=C4=8Cern=C3=BD?= <jcerny@redhat.com>
|
|
|
fa2dd6 |
Date: Mon, 27 May 2019 10:58:47 +0200
|
|
|
fa2dd6 |
Subject: [PATCH 9/9] Change OVAL version to 5.11.2
|
|
|
fa2dd6 |
|
|
|
fa2dd6 |
The SCAP 1.3 source datastream schema imports OVAL 5.11.2.
|
|
|
fa2dd6 |
---
|
|
|
fa2dd6 |
tests/DS/sds_detect_version/scap-1.3-ds.xml | 2 +-
|
|
|
fa2dd6 |
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
fa2dd6 |
|
|
|
fa2dd6 |
diff --git a/tests/DS/sds_detect_version/scap-1.3-ds.xml b/tests/DS/sds_detect_version/scap-1.3-ds.xml
|
|
|
fa2dd6 |
index 5d4af29a3..2e4ff31b0 100644
|
|
|
fa2dd6 |
--- a/tests/DS/sds_detect_version/scap-1.3-ds.xml
|
|
|
fa2dd6 |
+++ b/tests/DS/sds_detect_version/scap-1.3-ds.xml
|
|
|
fa2dd6 |
@@ -10,7 +10,7 @@
|
|
|
fa2dd6 |
<ns4:generator>
|
|
|
fa2dd6 |
<ns6:product_name>combine_ovals.py from SCAP Security Guide</ns6:product_name>
|
|
|
fa2dd6 |
<ns6:product_version>ssg: [0, 1, 44], python: 3.7.3</ns6:product_version>
|
|
|
fa2dd6 |
- <ns6:schema_version>5.11</ns6:schema_version>
|
|
|
fa2dd6 |
+ <ns6:schema_version>5.11.2</ns6:schema_version>
|
|
|
fa2dd6 |
<ns6:timestamp>2019-05-10T06:18:18</ns6:timestamp>
|
|
|
fa2dd6 |
</ns4:generator>
|
|
|
fa2dd6 |
<ns4:definitions>
|