8.4.2. Displaying SCAP Content
SCAP standard defines numerous file formats. The oscap utility can process or create files conforming to many of the formats. In order to further process the given file with SCAP content, you need to understand how to use oscap with the given file type. If you are unsure how to use a particular file, you can either open and read the file, or you can use the
info
module of oscap which parses the file and extracts relevant information in human-readable format.
Run the following command to examine the internal structure of a SCAP document and display useful information such as the document type, specification version, a status of the document, the date the document was published, and the date the document was copied to a file system:
oscap info file
oscap info file
where file is the full path to the security content file being examined. The following example better illustrates the usage of the
oscap info
command:
Example 8.5. Displaying Information About SCAP Content
~]$ oscap info /usr/share/xml/scap/ssg/content/ssg-rhel6-ds.xml Document type: Source Data Stream Imported: 2014-08-28T15:41:34 Stream: scap_org.open-scap_datastream_from_xccdf_ssg-rhel6-xccdf-1.2.xml Generated: (null) Version: 1.2 Checklists: Ref-Id: scap_org.open-scap_cref_ssg-rhel6-xccdf-1.2.xml Profiles: xccdf_org.ssgproject.content_profile_test xccdf_org.ssgproject.content_profile_CS2 xccdf_org.ssgproject.content_profile_common xccdf_org.ssgproject.content_profile_server xccdf_org.ssgproject.content_profile_stig-rhel6-server-upstream xccdf_org.ssgproject.content_profile_usgcb-rhel6-server xccdf_org.ssgproject.content_profile_rht-ccp xccdf_org.ssgproject.content_profile_CSCF-RHEL6-MLS xccdf_org.ssgproject.content_profile_C2S Referenced check files: ssg-rhel6-oval.xml system: http://oval.mitre.org/XMLSchema/oval-definitions-5 Checks: Ref-Id: scap_org.open-scap_cref_ssg-rhel6-oval.xml Ref-Id: scap_org.open-scap_cref_output--ssg-rhel6-cpe-oval.xml Ref-Id: scap_org.open-scap_cref_output--ssg-rhel6-oval.xml Dictionaries: Ref-Id: scap_org.open-scap_cref_output--ssg-rhel6-cpe-dictionary.xml
~]$ oscap info /usr/share/xml/scap/ssg/content/ssg-rhel6-ds.xml
Document type: Source Data Stream
Imported: 2014-08-28T15:41:34
Stream: scap_org.open-scap_datastream_from_xccdf_ssg-rhel6-xccdf-1.2.xml
Generated: (null)
Version: 1.2
Checklists:
Ref-Id: scap_org.open-scap_cref_ssg-rhel6-xccdf-1.2.xml
Profiles:
xccdf_org.ssgproject.content_profile_test
xccdf_org.ssgproject.content_profile_CS2
xccdf_org.ssgproject.content_profile_common
xccdf_org.ssgproject.content_profile_server
xccdf_org.ssgproject.content_profile_stig-rhel6-server-upstream
xccdf_org.ssgproject.content_profile_usgcb-rhel6-server
xccdf_org.ssgproject.content_profile_rht-ccp
xccdf_org.ssgproject.content_profile_CSCF-RHEL6-MLS
xccdf_org.ssgproject.content_profile_C2S
Referenced check files:
ssg-rhel6-oval.xml
system: http://oval.mitre.org/XMLSchema/oval-definitions-5
Checks:
Ref-Id: scap_org.open-scap_cref_ssg-rhel6-oval.xml
Ref-Id: scap_org.open-scap_cref_output--ssg-rhel6-cpe-oval.xml
Ref-Id: scap_org.open-scap_cref_output--ssg-rhel6-oval.xml
Dictionaries:
Ref-Id: scap_org.open-scap_cref_output--ssg-rhel6-cpe-dictionary.xml