Giter Site home page Giter Site logo

antonini / openscap Goto Github PK

View Code? Open in Web Editor NEW

This project forked from openscap/openscap

0.0 1.0 0.0 23.74 MB

NIST Certified SCAP 1.2 toolkit

Home Page: http://www.open-scap.org/tools/openscap-base

License: GNU Lesser General Public License v2.1

Makefile 0.73% Shell 4.91% M4 1.88% C 24.38% C++ 0.63% XSLT 66.60% Objective-C 0.06% Python 0.36% Smarty 0.02% Lua 0.01% Perl 0.08% Groff 0.19% CSS 0.01% JavaScript 0.13%

openscap's Introduction

OpenSCAP

Open Source Security Compliance Solution

About

The oscap program is a command line tool that allows users to load, scan, validate, edit, and export SCAP documents.

Compilation

Choose 1a or 1b depending on whether you want sources from a release tarball or the git repository.

1a) Get a release tarball

# replace ${version} with the desired version
wget https://fedorahosted.org/releases/o/p/openscap/openscap-${version}.tar.gz
tar -xzpf openscap-${version}.tar.gz
cd openscap-${version}.tar.gz

OR

1b) Get fresh sources from git repository and run ./autogen.sh

git clone https://github.com/OpenSCAP/openscap.git
cd openscap
./autogen.sh

The autoconf, automake, and libtool tools are required to be installed on your system.

  1. Run the following commands to build the library:
./configure
make

Build dependencies: (some of these are optional, if they are not detected, openscap will be compiled without respective optional features)

  • dbus-devel
  • GConf2-devel
  • libacl-devel
  • libblkid-devel
  • libcap-devel
  • libcurl-devel
  • libgcrypt-devel
  • libselinux-devel
  • libxml2-devel
  • libxslt-devel
  • make
  • openldap-devel
  • pcre-devel
  • perl-XML-Parser
  • perl-XML-XPath
  • perl-devel
  • python-devel
  • rpm-devel
  • swig
  • bzip2-devel
  1. Run library self-checks by executing the following command:
make check
  1. Run the installation procedure by executing the following command:
make install

Use cases

SCAP Content Validation

  • 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):
oscap ds sds-validate scap-ds.xml

Scanning

  • To evaluate all definitions within the given OVAL Definition file, run the following command:
oscap oval eval --results oval-results.xml scap-oval.xml

where scap-oval.xml is the OVAL Definition file and oval-results.xml is the OVAL Result file.

  • 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:
oscap oval eval --datastream-id ds.xml --oval-id xccdf.xml --results oval-results.xml scap-ds.xml

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.

  • To evaluate a specific profile in an XCCDF file run this command:
oscap xccdf eval --profile Desktop --results xccdf-results.xml --cpe cpe-dictionary.xml scap-xccdf.xml

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.

  • To evaluate a specific XCCDF benchmark that is part of a data stream within a SCAP data stream collection run the following command:
oscap xccdf eval --datastream-id ds.xml --xccdf-id xccdf.xml --results xccdf-results.xml scap-ds.xml

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.

Document generation

  • without XCCDF rules
oscap xccdf generate guide XCCDF-FILE > XCCDF-GUIDE-FILE
  • with XCCDF rules
oscap xccdf generate guide --profile PROFILE XCCDF-FILE > XCCDF-GUIDE-FILE
  • generate report from scanning
oscap xccdf generate report XCCDF-RESULT-FILE > XCCDF-REPORT-FILE

openscap's People

Contributors

bachradsusi avatar baude avatar bushong1 avatar chifflier avatar dahaic avatar fslavin avatar gautamsatish avatar iljakuklic avatar isimluk avatar jacobvar avatar jadams-tresys avatar jakuje avatar jan-cerny avatar mpreisler avatar msmeissn avatar mtrmac avatar nevion avatar nonerkao avatar openprivacy avatar pvrabec avatar redhatrises avatar rh-steve-grubb avatar rwmjones avatar shawndwells avatar sshimko avatar terwilligergreen avatar the-mule avatar theinric avatar ybznek avatar yuumasato avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.