Blame README.md

Packit 517ee8
# OpenSCAP
Packit 517ee8
Packit Bot 61bab5
[![Build status](https://github.com/OpenSCAP/openscap/workflows/CI/badge.svg)](https://github.com/OpenSCAP/openscap/actions)
Packit Bot 61bab5
[![Build status](https://ci.appveyor.com/api/projects/status/3o5fnld1m98bo0so/branch/maint-1.3?svg=true)](https://ci.appveyor.com/project/OpenSCAP/openscap)
Packit Bot 61bab5
[![Build Status](https://travis-ci.org/OpenSCAP/openscap.svg?branch=maint-1.3)](https://travis-ci.org/OpenSCAP/openscap)
Packit Service deda86
[![Language grade: C/C++](https://img.shields.io/lgtm/grade/cpp/g/OpenSCAP/openscap.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/OpenSCAP/openscap/context:cpp)
Packit Service deda86
[![Total alerts](https://img.shields.io/lgtm/alerts/g/OpenSCAP/openscap.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/OpenSCAP/openscap/alerts/)
Packit 517ee8
Packit 517ee8
Open Source Security Compliance Solution
Packit 517ee8
Packit 517ee8
## About
Packit 517ee8
Packit 517ee8
The oscap program is a command line tool that allows users to load, scan,
Packit 517ee8
validate, edit, and export SCAP documents.
Packit 517ee8
Packit 517ee8
 * Homepage of the project: [www.open-scap.org](http://www.open-scap.org)
Packit 517ee8
 * User Manual: [OpenSCAP User Manual](docs/manual/manual.adoc)
Packit 517ee8
 * Compilation, testing and debugging: [OpenSCAP Developer Manual](docs/developer/developer.adoc)
Packit 517ee8
 * For new contributors: [How to contribute](docs/contribute/contribute.adoc)
Packit 517ee8
Packit 517ee8
## Contributing
Packit 517ee8
Packit 517ee8
We welcome all contributions to the OpenSCAP project. If you would like to contribute, either by fixing existing issues or adding new features, please check out our [contribution guide](docs/contribute/contribute.adoc) to get started. If you would like to discuss anything, ask questions, or if you need additional help getting started, you can either send a message to our FreeNode IRC channel, **#openscap**, or to our [mailing list](https://www.redhat.com/mailman/listinfo/open-scap-list).
Packit 517ee8
Packit 517ee8
Packit 517ee8
## Use cases
Packit 517ee8
Packit 517ee8
### SCAP Content Validation
Packit 517ee8
Packit 517ee8
 * The following example shows how to validate a given source data stream; all components within the data stream are validated (XCCDF, OVAL, OCIL, CPE, and possibly other components):
Packit 517ee8
```
Packit 517ee8
oscap ds sds-validate scap-ds.xml
Packit 517ee8
```
Packit 517ee8
Packit 517ee8
Packit 517ee8
### Scanning
Packit 517ee8
Packit 517ee8
 * To evaluate all definitions within the given OVAL Definition file, run the following command:
Packit 517ee8
```
Packit 517ee8
oscap oval eval --results oval-results.xml scap-oval.xml
Packit 517ee8
```
Packit 517ee8
*where scap-oval.xml is the OVAL Definition file and oval-results.xml is the OVAL Result file.*
Packit 517ee8
Packit 517ee8
 * To evaluate all definitions from the OVAL component that are part of a particular data stream within a SCAP data stream collection, run the following command:
Packit 517ee8
```
Packit 517ee8
oscap oval eval --datastream-id ds.xml --oval-id xccdf.xml --results oval-results.xml scap-ds.xml
Packit 517ee8
```
Packit 517ee8
*where ds.xml is the given data stream, xccdf.xml is an XCCDF file specifying the OVAL component, oval-results.xml is the OVAL Result file, and scap-ds.xml is a file representing the SCAP data stream collection.*
Packit 517ee8
Packit 517ee8
 * To evaluate a specific profile in an XCCDF file run this command:
Packit 517ee8
```
Packit 517ee8
oscap xccdf eval --profile Desktop --results xccdf-results.xml --cpe cpe-dictionary.xml scap-xccdf.xml
Packit 517ee8
```
Packit 517ee8
*where scap-xccdf.xml is the XCCDF document, Desktop is the selected profile from the XCCDF document, xccdf-results.xml is a file storing the scan results, and cpe-dictionary.xml is the CPE dictionary.*
Packit 517ee8
Packit 517ee8
 * To evaluate a specific XCCDF benchmark that is part of a data stream within a SCAP data stream collection run the following command:
Packit 517ee8
```
Packit 517ee8
oscap xccdf eval --datastream-id ds.xml --xccdf-id xccdf.xml --results xccdf-results.xml scap-ds.xml
Packit 517ee8
```
Packit 517ee8
*where scap-ds.xml is a file representing the SCAP data stream collection, ds.xml is the particular data stream, xccdf.xml is ID of the component-ref pointing to the desired XCCDF document, and xccdf-results.xml is a file containing the scan results.*
Packit 517ee8
Packit 517ee8
Packit 517ee8
### Document generation
Packit 517ee8
Packit 517ee8
 * without XCCDF rules
Packit 517ee8
```
Packit 517ee8
oscap xccdf generate guide XCCDF-FILE > XCCDF-GUIDE-FILE
Packit 517ee8
```
Packit 517ee8
Packit 517ee8
 * with XCCDF rules
Packit 517ee8
```
Packit 517ee8
oscap xccdf generate guide --profile PROFILE XCCDF-FILE > XCCDF-GUIDE-FILE
Packit 517ee8
```
Packit 517ee8
Packit 517ee8
 *  generate report from scanning
Packit 517ee8
```
Packit 517ee8
oscap xccdf generate report XCCDF-RESULT-FILE > XCCDF-REPORT-FILE
Packit 517ee8
```