6.2. OpenSCAP in RHN Satellite
6.2.1. Prerequisites
SCAP requires these packages:
- For the Server: RHN Satellite 5.5
- For the Client: spacewalk-oscap package (available from the RHN Tools Child Channel)
A Management entitlement is required for scheduling scans.
For the Client: Distributing the XCCDF content to client machines
- Traditional Methods (CD, USB, nfs, scp, ftp)
- Satellite Scripts
- RPMsCustom RPMs are the recommended way to distribute SCAP content to other machines. RPM packages can be signed and verified to ensure their integrity. Installation, removal, and verification of RPM packages can be managed from the user interface.
6.2.2. Performing Audit Scans
Procedure 6.1. Scans via the Web Interface
- Log in to the Satellite web interface.
- Click on → .
- Click on →
- Fill in the
Schedule New XCCDF Scanform:- Command-line Arguments: Additional arguments for the oscap tool can be added into this field. There are only two command line arguments that are permitted. These are:
--profile PROFILE— Selects a particular profile from the XCCDF document. Profiles are determined by the XCCDF xml file and can be checked using theProfile idtag. For example:Profile id="RHEL6-Default"
Note
Certain versions of OpenSCAP need the --profile command-line argument or the scan will fail.--skip-valid— Do not validate input/output files. Users without a well-formed XCCDF content may choose to use this to bypass the file validation process.If no command-line argument is passed, it will use the default profile. - Path to XCCDF Document: This is a required field. The
pathparameter points to the content location on the client system. For example:/usr/local/scap/dist_rhel6_scap-rhel6-oval.xmlWarning
The xccdf content is validated before it is run on the remote system. Specifying invalid arguments can make spacewalk-oscap fail to validate or run. Due to security concerns the 'osccap xccdf eval' command only accepts a limited set of parameters.
- Run the
rhn_checkto ensure that the action is being picked up by the client system.rhn_check -vv
Note
Alternatively, ifrhnsdorosadare running on the client system, the action will be picked up by these services. To check if they are running:service rhnsd start
orservice osad start

Figure 6.1. Scheduling a Scan via Web UI
Procedure 6.2. Scans via API
- Choose an existing script or create a script for scheduling a system scan through
system.scap.scheduleXccdfScan, the front end API.Example Script:#!/usr/bin/python client = xmlrpclib.Server('https://spacewalk.example.com/rpc/api') key = client.auth.login('username', 'password') client.system.scap.scheduleXccdfScan(key, 1000010001, '/usr/local/share/scap/usgcb-rhel5desktop-xccdf.xml', '--profile united_states_government_configuration_baseline')Where:- 1000010001 is the
system ID (sid). /usr/local/share/scap/usgcb-rhel5desktop-xccdf.xmlis the path parameter that points to the content location on the client system. In this case, it assumes USGSB content in the/usr/local/share/scapdirectory.--profile united_states_government_configuration_baselinerepresents the additional argument for the oscap tool. In this case, it is using the USCFGB.
- Run the script on the command-line interface of any system. The system needs the appropriate python and xmlrpc libraries installed.
- Run the
rhn_checkto ensure that the action is being picked up by the client system.rhn_check -vv
Note
Alternatively, ifrhnsdorosadare running on the client system, the action will be picked up by these services. To check if they are running:service rhnsd start
orservice osad start
6.2.3. How to View SCAP Results
- Via the web interface. Once the action has been executed, the results should show up on the system's Tab. This page is discussed in Section 6.2.4, “OpenSCAP Satellite Pages”.
- Via the API functions in handler
system.scap. - Via the Satellite's
spacewalk-reportstool by running these commands:# /usr/bin/spacewalk-reports system-history-scap # /usr/bin/spacewalk-reports scap-scan # /usr/bin/spacewalk-reports scap-scan-results
6.2.4. OpenSCAP Satellite Pages
6.2.4.1. Audit
- →
- All Scans is the default page that appears when the Audit tab is chosen. This page displays all completed OpenSCAP scans which the viewer has permission to see. Permissions for scans derive from system permissions.

Figure 6.2. Audit ⇒ All Scans
For each scan, the following information is displayed:- System
- the scan's targeted system
- XCCDF Profile
- the evaluated profile
- Completed
- time of completion
- Satisfied
- number of rules satisfied/passed. A rule is considered to be satisfied if the result is the evaluation is either Pass or Fixed.
- Dissatisfied
- number of rules dissatisfied/failed. A rule is considered to be dissatisfied if the result of the evaluation is a Fail.
- Unknown
- number of rules which failed to evaluate. A rule is considered to be Unknown if the result of the evaluation is an Error, Unknown or Not Checked.
The evaluation of XCCDF rules may also return statuses like Informational, Not Applicable, or not Selected. In such cases, the given rule is not included in the statistics on this page. See → for information on those. - →
- XCCDF Diff is an application which visualizes the comparison of two XCCDF scans. It shows metadata for two scans as well as the lists of results.

Figure 6.3. Audit ⇒ XCCDF Diff
You can access thediffof similar scans directly by clicking on icon at the List Scans page or you candiffarbitrary scans by specifying their id.Items that show up in only one of the compared scans are considered to be "varying". Varying items are always highlighted in beige. There are three possible comparison modes: Full Comparison which shows all the scan items, Only Changed Items which shows items that have changed, and finally Only Invariant Items which shows unchanged or similar items. - →
- The Search page allows you to search through your scans according to specified criteria, including:
- rule results
- targeted machine
- time frame of the scan

Figure 6.4. Audit ⇒ Advanced Search
The search either returns a list of results or list of scans which are included in the results.
6.2.4.2. → →
- → → →

Figure 6.5. Systems ⇒ System Details ⇒ Audit ⇒ List Scans Scan Results
This subtab lists a summary of all scans completed on the system. The columns are as follows:Table 6.1. OpenSCAP Scan Labels
Column Label Definition XCCDF Test Result The scanned test result name which provides a link to the detailed results of the scan. Completed The exact time the scan finished Compliance The unweighted pass/fail ratio of compliance based on the Standard used P Number of Checks that Passed F Number of Checks that Failed E Errors experienced in the Scan U Unknown N Not applicable to the machine K Not checked S Not Selected I Informational X Fixed Total Total number of checks Each line starts with an icon indicating the results of a comparison to a previous similar scan. The icons indicate that in the newer scan there is either:
— no difference compared to the previous scan
— arbitrary differences
— major differences, either there are more failures than the previous scan or less passes
— no comparable scan was found, therefore, no comparison was made.
- → → →
- This page contains the results of a single scanning. It can be divided into two parts:
- Details of the XCCDF ScanThe details of the scan gives you:
- the general information of the file path
- what command-line arguments were used
- who scheduled it
- what is the benchmark identifier and version
- the Profile Identifier
- the Profile Title
- when it was started and completed
- any error output.
- XCCDF Rule ResultsThe rule results provide the full list of XCCDF rule identifiers, identifying tags and the result for each of these rule results. This list can be filtered by a specific result.
- → → →
- This subtab is where new scans can be scheduled. Additional command line arguments can be provided, along with the path to the XCCDF document on the system which is being scanned. Based on the "
Schedule no sooner than" parameter, the scan will be performed at the system's next scheduled check-in with the Satellite Server. For more information about how to schedule via the Satellite web interface, refer to Procedure 6.1, “Scans via the Web Interface” in this chapter.

Where did the comment section go?
Red Hat's documentation publication system recently went through an upgrade to enable speedier, more mobile-friendly content. We decided to re-evaluate our commenting platform to ensure that it meets your expectations and serves as an optimal feedback mechanism. During this redesign, we invite your input on providing feedback on Red Hat documentation via the discussion platform.