Red Hat Training

A Red Hat training course is available for Red Hat Enterprise Linux

8.4.2. SCAP コンテンツの表示

SCAP 標準は、多数のファイル形式を定義します。oscap ユーティリティーは、多くの形式に準拠するファイルを処理または作成できます。SCAP コンテンツで指定のファイルをさらに処理するには、指定のファイルタイプとともに oscap を使用する方法を理解する必要があります。特定のファイルの使用方法が分からない場合は、ファイルを開くか、oscapinfo モジュールを使用できます。これらを使用すると、ファイルを解析して、関連情報を人間が判読できる形式で抽出することができます。
以下のコマンドを実行して SCAP ドキュメントの内部構造を確認し、ドキュメントタイプ、仕様バージョン、ドキュメントのステータス、ドキュメントが公開された日付、ドキュメントが公開された日付、ドキュメントがファイルシステムにコピーされた日付などの役立つ情報を表示します。
oscap info file
file は、確認するセキュリティーコンテンツファイルのフルパスになります。以下の例は、oscap info コマンドの使用例を示しています。

例8.5 SCAP コンテンツに関する情報の表示

~]$ 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