https://github.com/openscap/ruby-openscap
A FFI wrapper around the OpenSCAP library
https://github.com/openscap/ruby-openscap
Last synced: about 2 months ago
JSON representation
A FFI wrapper around the OpenSCAP library
- Host: GitHub
- URL: https://github.com/openscap/ruby-openscap
- Owner: OpenSCAP
- License: gpl-2.0
- Created: 2014-04-17T09:32:10.000Z (about 11 years ago)
- Default Branch: master
- Last Pushed: 2023-05-24T13:33:37.000Z (almost 2 years ago)
- Last Synced: 2024-03-25T21:17:57.549Z (about 1 year ago)
- Language: Ruby
- Size: 1.93 MB
- Stars: 16
- Watchers: 16
- Forks: 8
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: COPYING
Awesome Lists containing this project
README
 ruby-OpenSCAP
=============Description
-------------
A FFI wrapper around the OpenSCAP library.Features/problems
-------------
Current version supports minimal set of functions needed to build own scanner. This module
is self documented by its test suite.Sample Scanner Implementation
-------------require 'openscap'
s = OpenSCAP::Xccdf::Session.new("ssg-fedora-ds.xml")
s.load
s.profile = "xccdf_org.ssgproject.content_profile_common"
s.evaluate
s.export_results(:rds_file => "results.rds.xml")
s.destroyDevelopment Requirements
-------------
On Fedora, command isdnf install ruby-devel rubygem-rake rubygem-ffi rubygem-bundler openscap
On RHEL you can install requirements by issuing
yum install ruby-devel rubygem-rake rubygem-bundler openscap
gem install ffi # or install rubygem-ffi RPM package from EPELTest Requirements
-------------
On Fedora, more packages are necessary, but rubocop can be of the latest versiondnf install rubygem-minitest rubygem-test-unit rubygems-devel bzip2
gem install rubocopFor tests on RHEL7, you need minitest package and specific older version of rubocop.
Newer versions of rubocop requires Ruby >= 2.1.0yum install rubygem-minitest bzip2
gem install rubocop -v 0.50.0Tests are then performed using script
./runtest.sh