Skip to content

Commit 0af5978

Browse files
committed
Merge branch 'maint-1.3'
Conflicts: CMakeLists.txt release_tools/versions.sh
2 parents 4e6e686 + e4f4599 commit 0af5978

File tree

218 files changed

+2361
-1145
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

218 files changed

+2361
-1145
lines changed

.travis.yml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,8 @@ matrix:
3333
- export CC=gcc-7 GCOV=gcov-7
3434
- cd build
3535
script:
36-
- CFLAGS="--coverage -ftest-coverage -fprofile-arcs" LDFLAGS=-lgcov cmake -DCMAKE_BUILD_TYPE=Debug ../
36+
- cmake -DCMAKE_BUILD_TYPE=Debug ../
3737
- build-wrapper-linux-x86-64 --out-dir bw-output make all || true # Will always fail builds on forked repositories.
38-
- make all
39-
- CTEST_OUTPUT_ON_FAILURE=1 ctest || { test "$SEND_COVERAGE_EVEN_IF_TESTS_FAIL" = yes && curl -s https://codecov.io/bash > cov.sh && bash cov.sh -x "$GCOV"; }
40-
- bash ../tests/recursively_generate_gcov.sh . || true # Failures that occur here are harmless
4138
- cd .. && sonar-scanner || true # Will always fail builds on forked repositories.
4239
after_success:
4340
- curl -s https://codecov.io/bash > cov.sh && bash cov.sh -x "$GCOV"
@@ -46,7 +43,7 @@ matrix:
4643
before_install:
4744
- brew update
4845
- brew upgrade python
49-
- brew install doxygen --with-graphviz
46+
- brew install doxygen
5047
- brew install opendbx
5148
- brew install popt
5249
- brew install swig

CMakeLists.txt

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ endif()
2626
set(LT_CURRENT 25)
2727

2828
## increment any time the source changes; set 0 to if you increment CURRENT
29-
set(LT_REVISION 0)
29+
set(LT_REVISION 1)
3030

3131
## increment if any interfaces have been added; set to 0
3232
## if any interfaces have been changed or removed. removal has
@@ -123,6 +123,9 @@ endif()
123123
find_package(PythonInterp 3)
124124
find_package(PythonLibs 3)
125125

126+
set(PREFERRED_PYTHON_PATH "${PYTHON_EXECUTABLE}")
127+
set(PYTHON3_PATH "${PYTHON_EXECUTABLE}")
128+
126129
find_package(RPM)
127130
if(RPM_FOUND)
128131
check_library_exists("${RPM_LIBRARY}" rpmReadConfigFiles "" HAVE_RPMREADCONFIGFILES)
@@ -286,6 +289,7 @@ endif()
286289
cmake_dependent_option(ENABLE_OSCAP_UTIL_AS_RPM "enable the scap-as-rpm utility, this lets you package SCAP data as RPMs" ON "NOT WIN32" OFF)
287290
cmake_dependent_option(ENABLE_OSCAP_UTIL_SSH "enables the oscap-ssh utility, this lets you scan remote machines over ssh" ON "NOT WIN32" OFF)
288291
cmake_dependent_option(ENABLE_OSCAP_UTIL_VM "enables the oscap-vm utility, this lets you scan VMs and VM storage images" ON "NOT WIN32" OFF)
292+
cmake_dependent_option(ENABLE_OSCAP_UTIL_PODMAN "enables the oscap-podman utility, this lets you scan Podman containers and container images" ON "NOT WIN32" OFF)
289293
cmake_dependent_option(ENABLE_OSCAP_UTIL_CHROOT "enables the oscap-chroot utility, this lets you scan entire chroots using offline scanning" ON "NOT WIN32" OFF)
290294

291295
# ---------- TEST-SUITE SWITCHES
@@ -352,6 +356,7 @@ message(STATUS "oscap-docker: ${ENABLE_OSCAP_UTIL_DOCKER}")
352356
message(STATUS "scap-as-rpm: ${ENABLE_OSCAP_UTIL_AS_RPM}")
353357
message(STATUS "oscap-ssh: ${ENABLE_OSCAP_UTIL_SSH}")
354358
message(STATUS "oscap-vm: ${ENABLE_OSCAP_UTIL_VM}")
359+
message(STATUS "oscap-podman: ${ENABLE_OSCAP_UTIL_PODMAN}")
355360
message(STATUS "oscap-chroot: ${ENABLE_OSCAP_UTIL_CHROOT}")
356361
message(STATUS " ")
357362

@@ -491,7 +496,13 @@ add_subdirectory("schemas")
491496
add_subdirectory("xsl")
492497
add_subdirectory("cpe")
493498
add_subdirectory("swig")
494-
configure_file("run.in" "run" @ONLY)
499+
configure_file("run.in" ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/run @ONLY)
500+
configure_file("oscap_wrapper.in" ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/oscap_wrapper @ONLY)
501+
file(
502+
COPY "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/run" "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/oscap_wrapper"
503+
DESTINATION ${CMAKE_BINARY_DIR}
504+
FILE_PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE
505+
)
495506

496507
if(NOT WIN32)
497508
# pkgconfig file
@@ -526,14 +537,16 @@ set(CPACK_SOURCE_IGNORE_FILES
526537
"~$"
527538
"\\\\CMakeLists.txt.user"
528539
)
529-
set(CPACK_GENERATOR WIX)
540+
if(WIN32)
541+
set(CPACK_GENERATOR WIX)
542+
set(CPACK_WIX_PATCH_FILE "${CMAKE_SOURCE_DIR}/wix_patch.xml")
543+
endif()
530544
set(CPACK_PACKAGE_NAME "OpenSCAP")
531545
set(CPACK_PACKAGE_VENDOR "OpenSCAP Project")
532546
set(CPACK_PACKAGE_VERSION_MAJOR "${OPENSCAP_VERSION_MAJOR}")
533547
set(CPACK_PACKAGE_VERSION_MINOR "${OPENSCAP_VERSION_MINOR}")
534548
set(CPACK_PACKAGE_VERSION_PATCH "${OPENSCAP_VERSION_PATCH}")
535549
set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_SOURCE_DIR}/lgpl-2.1.rtf")
536-
set(CPACK_WIX_PATCH_FILE "${CMAKE_SOURCE_DIR}/wix_patch.xml")
537550
set(CPACK_PACKAGE_CHECKSUM SHA512)
538551

539552
include(CPack)

NEWS

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,49 @@
1+
openscap-1.3.1 12-06-2018
2+
- New features
3+
- Support for SCAP 1.3 Source Datastreams (evaluating, XML schemas,
4+
validation)
5+
- Introduced `oscap-podman` -- a tool for SCAP evaluation of Podman
6+
images and containers (rhbz#1642373)
7+
- Tailoring files are included in ARF result files (#902)
8+
- OVAL details are always shown in HTML report, users do not have to
9+
provide `--oval-results` on command line
10+
- HTML report displays OVAL test details also for OVAL tests included
11+
from other OVAL definitions using `extend_definition` (#916, #954)
12+
- OVAL test IDs are shown in HTML report
13+
- Rule IDs are shown in HTML guide (#1293)
14+
- Added `block_size` in Linux `partition_state` defined in OVAL 5.11.2
15+
- Added `oscap_wrapper` that can be used to comfortably execute custom
16+
compiled oscap tool
17+
- Maintenance, bug fixes
18+
- Remote filesystems mounted using `autofs` direct maps are not
19+
recognized as local filesystems (rhbz#1655943)
20+
- SCAP source datastreams containing remote components can be
21+
evaluated without downloading remote data (rhbz#1709423)
22+
- Fixed duplicated variables in generated Ansible Playbooks
23+
- Fixed trailing whitespace characters in Ansible Playbooks
24+
- Correctly handle multiline profile titles and profile descriptions
25+
in generated Ansible Playbooks (#1112)
26+
- Fixed STIG Viewer output (--stig-viewer) to handle multiple rules
27+
that have the same STIG ID
28+
- Fixed incorrect displaying of OVAL test results in HTML report
29+
- Fixed segmentation fault in offline mode caused by usage of `chroot`
30+
file descriptor after closing (rhbz#1636431)
31+
- Fixed textfilecontent54 probe to not ignore `max_depth`, `recurse`,
32+
`recurse_direction` and `recurse_file_system` attributes of
33+
`behaviors` element when `filepath` element is given (rhbz#1655943)
34+
- Added CMake policies (CMP0078 and CMP0086) related to UseSWIG
35+
- Added RHEL 8 CPE, Fedora 31 CPE, Oracle Linux 8 CPE
36+
- Fedora CPEs fixed to work also on Fedora >= 30
37+
- Fixed segmentation fault in CVRF module (rhbz#1642283)
38+
- Fixed unresolved symbols in libopenscap_sce.so
39+
- Fixed memory leaks in Windows registry probe (#1269)
40+
- Fixed many GCC compiler warnings
41+
- Removed dead code from `fsdev` module
42+
- Many new test cases in upstream test suite
43+
- Refactoring
44+
- Updated Developer Guide
45+
- Updated manual pages
46+
147
openscap-1.3.0 09-10-2018
248
- New features
349
- Introduced a virtual '(all)' profile selecting all rules

appveyor.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ version: master-{build}
22
branches:
33
only:
44
- master
5+
- maint-1.3
56
image: Visual Studio 2017
67
configuration: Release
78
clone_folder: c:\projects\openscap

config.h.in

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,10 @@
126126
#cmakedefine OPENSCAP_PROBE_WINDOWS_REGISTRY
127127
#cmakedefine OPENSCAP_PROBE_WINDOWS_WMI57
128128

129+
#cmakedefine PREFERRED_PYTHON_PATH "@PREFERRED_PYTHON_PATH@"
130+
#cmakedefine PYTHON2_PATH "@PYTHON2_PATH@"
131+
#cmakedefine PYTHON3_PATH "@PYTHON3_PATH@"
132+
129133
#include "oscap_platforms.h"
130134
#include "compat.h"
131135

cpe/openscap-cpe-dict.xml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,10 @@
1717
<title xml:lang="en-us">Red Hat Enterprise Linux 7</title>
1818
<check system="http://oval.mitre.org/XMLSchema/oval-definitions-5" href="openscap-cpe-oval.xml">oval:org.open-scap.cpe.rhel:def:7</check>
1919
</cpe-item>
20+
<cpe-item name="cpe:/o:redhat:enterprise_linux:8">
21+
<title xml:lang="en-us">Red Hat Enterprise Linux 8</title>
22+
<check system="http://oval.mitre.org/XMLSchema/oval-definitions-5" href="openscap-cpe-oval.xml">oval:org.open-scap.cpe.rhel:def:8</check>
23+
</cpe-item>
2024
<cpe-item name="cpe:/o:oracle:linux:5">
2125
<title xml:lang="en-us">Oracle Linux 5</title>
2226
<check system="http://oval.mitre.org/XMLSchema/oval-definitions-5" href="openscap-cpe-oval.xml">oval:org.open-scap.cpe.ol:def:5</check>
@@ -29,6 +33,10 @@
2933
<title xml:lang="en-us">Oracle Linux 7</title>
3034
<check system="http://oval.mitre.org/XMLSchema/oval-definitions-5" href="openscap-cpe-oval.xml">oval:org.open-scap.cpe.ol:def:7</check>
3135
</cpe-item>
36+
<cpe-item name="cpe:/o:oracle:linux:8">
37+
<title xml:lang="en-us">Oracle Linux 8</title>
38+
<check system="http://oval.mitre.org/XMLSchema/oval-definitions-5" href="openscap-cpe-oval.xml">oval:org.open-scap.cpe.ol:def:8</check>
39+
</cpe-item>
3240
<cpe-item name="cpe:/o:centos:centos:5">
3341
<title xml:lang="en-us">Community Enterprise Operating System 5</title>
3442
<check system="http://oval.mitre.org/XMLSchema/oval-definitions-5" href="openscap-cpe-oval.xml">oval:org.open-scap.cpe.rhel:def:1005</check>
@@ -113,6 +121,10 @@
113121
<title xml:lang="en-us">Fedora 30</title>
114122
<check system="http://oval.mitre.org/XMLSchema/oval-definitions-5" href="openscap-cpe-oval.xml">oval:org.open-scap.cpe.fedora:def:30</check>
115123
</cpe-item>
124+
<cpe-item name="cpe:/o:fedoraproject:fedora:31">
125+
<title xml:lang="en-us">Fedora 31</title>
126+
<check system="http://oval.mitre.org/XMLSchema/oval-definitions-5" href="openscap-cpe-oval.xml">oval:org.open-scap.cpe.fedora:def:31</check>
127+
</cpe-item>
116128
<cpe-item name="cpe:/o:suse:sle">
117129
<title xml:lang="en-us">SUSE Linux Enterprise all versions</title>
118130
<check system="http://oval.mitre.org/XMLSchema/oval-definitions-5" href="openscap-cpe-oval.xml">oval:org.open-scap.cpe.sle:def:1</check>

cpe/openscap-cpe-oval.xml

Lines changed: 67 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,19 @@
6868
</criteria>
6969
</criteria>
7070
</definition>
71+
<definition class="inventory" id="oval:org.open-scap.cpe.rhel:def:8" version="1">
72+
<metadata>
73+
<title>Red Hat Enterprise Linux 8</title>
74+
<affected family="unix">
75+
<platform>Red Hat Enterprise Linux 8</platform>
76+
</affected>
77+
<reference ref_id="cpe:/o:redhat:enterprise_linux:8" source="CPE"/>
78+
<description>The operating system installed on the system is Red Hat Enterprise Linux 8</description>
79+
</metadata>
80+
<criteria>
81+
<criterion comment="Red Hat Enterprise Linux 8 is installed" test_ref="oval:org.open-scap.cpe.rhel:tst:8"/>
82+
</criteria>
83+
</definition>
7184
<definition class="inventory" id="oval:org.open-scap.cpe.ol:def:5" version="1">
7285
<metadata>
7386
<title>Oracle Linux 5</title>
@@ -107,6 +120,19 @@
107120
<criterion comment="Oracle Linux 7 is installed" test_ref="oval:org.open-scap.cpe.ol:tst:7"/>
108121
</criteria>
109122
</definition>
123+
<definition class="inventory" id="oval:org.open-scap.cpe.ol:def:8" version="1">
124+
<metadata>
125+
<title>Oracle Linux 8</title>
126+
<affected family="unix">
127+
<platform>Oracle Linux 8</platform>
128+
</affected>
129+
<reference ref_id="cpe:/o:oracle:linux:8" source="CPE"/>
130+
<description>The operating system installed on the system is Oracle Linux 8</description>
131+
</metadata>
132+
<criteria>
133+
<criterion comment="Oracle Linux 8 is installed" test_ref="oval:org.open-scap.cpe.ol:tst:8"/>
134+
</criteria>
135+
</definition>
110136
<definition class="inventory" id="oval:org.open-scap.cpe.rhel:def:1005" version="1">
111137
<metadata>
112138
<title>Community Enterprise Operating System 5</title>
@@ -380,6 +406,20 @@
380406
<criterion comment="Fedora 30 is installed" test_ref="oval:org.open-scap.cpe.fedora:tst:30"/>
381407
</criteria>
382408
</definition>
409+
<definition class="inventory" id="oval:org.open-scap.cpe.fedora:def:31" version="1">
410+
<metadata>
411+
<title>Fedora 31</title>
412+
<affected family="unix">
413+
<platform>Fedora 31</platform>
414+
</affected>
415+
<reference ref_id="cpe:/o:fedoraproject:fedora:31" source="CPE"/>
416+
<description>The operating system installed on the system is Fedora 31</description>
417+
</metadata>
418+
<criteria>
419+
<criterion comment="Fedora 31 is installed" test_ref="oval:org.open-scap.cpe.fedora:tst:31"/>
420+
</criteria>
421+
</definition>
422+
383423

384424
<definition class="inventory" id="oval:org.open-scap.cpe.sle:def:1" version="1">
385425
<metadata>
@@ -724,6 +764,11 @@
724764
<object object_ref="oval:org.open-scap.cpe.redhat-release:obj:3"/>
725765
<state state_ref="oval:org.open-scap.cpe.rhel:ste:7"/>
726766
</rpmverifyfile_test>
767+
<rpmverifyfile_test check_existence="at_least_one_exists" id="oval:org.open-scap.cpe.rhel:tst:8" version="1" check="at least one" comment="redhat-release is version 8"
768+
xmlns="http://oval.mitre.org/XMLSchema/oval-definitions-5#linux">
769+
<object object_ref="oval:org.open-scap.cpe.redhat-release:obj:3"/>
770+
<state state_ref="oval:org.open-scap.cpe.rhel:ste:8"/>
771+
</rpmverifyfile_test>
727772
<rpminfo_test check_existence="at_least_one_exists" id="oval:org.open-scap.cpe.ol:tst:5" version="1" check="at least one" comment="oraclelinux-release is version 5"
728773
xmlns="http://oval.mitre.org/XMLSchema/oval-definitions-5#linux">
729774
<object object_ref="oval:org.open-scap.cpe.oraclelinux-release:obj:1"/>
@@ -739,6 +784,11 @@
739784
<object object_ref="oval:org.open-scap.cpe.oraclelinux-release:obj:1"/>
740785
<state state_ref="oval:org.open-scap.cpe.ol:ste:7"/>
741786
</rpminfo_test>
787+
<rpminfo_test check_existence="at_least_one_exists" id="oval:org.open-scap.cpe.ol:tst:8" version="1" check="at least one" comment="oraclelinux-release is version 8"
788+
xmlns="http://oval.mitre.org/XMLSchema/oval-definitions-5#linux">
789+
<object object_ref="oval:org.open-scap.cpe.oraclelinux-release:obj:1"/>
790+
<state state_ref="oval:org.open-scap.cpe.ol:ste:8"/>
791+
</rpminfo_test>
742792
<rpmverifyfile_test check_existence="at_least_one_exists" id="oval:org.open-scap.cpe.rhel:tst:1005" version="1" check="at least one" comment="centos-release is version 5"
743793
xmlns="http://oval.mitre.org/XMLSchema/oval-definitions-5#linux">
744794
<object object_ref="oval:org.open-scap.cpe.redhat-release:obj:3"/>
@@ -844,6 +894,11 @@
844894
<object object_ref="oval:org.open-scap.cpe.fedora-release:obj:2"/>
845895
<state state_ref="oval:org.open-scap.cpe.fedora:ste:30"/>
846896
</rpminfo_test>
897+
<rpminfo_test check_existence="at_least_one_exists" id="oval:org.open-scap.cpe.fedora:tst:31" version="1" check="at least one" comment="fedora-release is version Fedora 31"
898+
xmlns="http://oval.mitre.org/XMLSchema/oval-definitions-5#linux">
899+
<object object_ref="oval:org.open-scap.cpe.fedora-release:obj:2"/>
900+
<state state_ref="oval:org.open-scap.cpe.fedora:ste:31"/>
901+
</rpminfo_test>
847902
<rpminfo_test check_existence="at_least_one_exists" id="oval:org.open-scap.cpe.sles:tst:1" version="1" check="at least one" comment="/etc/sles-release is provided by sles-release package"
848903
xmlns="http://oval.mitre.org/XMLSchema/oval-definitions-5#linux">
849904
<object object_ref="oval:org.open-scap.cpe.sles-release:obj:1"/>
@@ -993,7 +1048,7 @@
9931048
<lin-def:name>redhat-release</lin-def:name>
9941049
</lin-def:rpminfo_object>
9951050
<lin-def:rpminfo_object id="oval:org.open-scap.cpe.fedora-release:obj:2" version="1" xmlns="http://oval.mitre.org/XMLSchema/oval-definitions-5#linux">
996-
<lin-def:name>fedora-release</lin-def:name>
1051+
<lin-def:name operation="pattern match">^fedora-release.*</lin-def:name>
9971052
</lin-def:rpminfo_object>
9981053
<lin-def:rpmverifyfile_object id="oval:org.open-scap.cpe.redhat-release:obj:3" version="1" xmlns="http://oval.mitre.org/XMLSchema/oval-definitions-5#linux">
9991054
<!-- Sadly, OVAL cannot do the right query (rpm -q -whatprovides system-release). Let's check the filename instead. -->
@@ -1063,6 +1118,10 @@
10631118
<name operation="pattern match">^redhat-release</name>
10641119
<version operation="pattern match">^7[^\d]</version>
10651120
</rpmverifyfile_state>
1121+
<rpmverifyfile_state id="oval:org.open-scap.cpe.rhel:ste:8" version="1" xmlns="http://oval.mitre.org/XMLSchema/oval-definitions-5#linux">
1122+
<name operation="pattern match">^redhat-release</name>
1123+
<version operation="pattern match">^8[^\d]</version>
1124+
</rpmverifyfile_state>
10661125
<rpmverifyfile_state id="oval:org.open-scap.cpe.rhel:ste:1005" version="1" xmlns="http://oval.mitre.org/XMLSchema/oval-definitions-5#linux">
10671126
<name operation="pattern match">^centos-release</name>
10681127
<version operation="pattern match">^5</version>
@@ -1099,6 +1158,10 @@
10991158
<name operation="pattern match">^oraclelinux-release</name>
11001159
<version operation="pattern match">^7</version>
11011160
</rpminfo_state>
1161+
<rpminfo_state id="oval:org.open-scap.cpe.ol:ste:8" version="1" xmlns="http://oval.mitre.org/XMLSchema/oval-definitions-5#linux">
1162+
<name operation="pattern match">^oraclelinux-release</name>
1163+
<version operation="pattern match">^8</version>
1164+
</rpminfo_state>
11021165
<rpminfo_state id="oval:org.open-scap.cpe.fedora:ste:16" version="1" xmlns="http://oval.mitre.org/XMLSchema/oval-definitions-5#linux">
11031166
<version operation="pattern match">^16$</version>
11041167
</rpminfo_state>
@@ -1144,6 +1207,9 @@
11441207
<rpminfo_state id="oval:org.open-scap.cpe.fedora:ste:30" version="1" xmlns="http://oval.mitre.org/XMLSchema/oval-definitions-5#linux">
11451208
<version operation="pattern match">^30$</version>
11461209
</rpminfo_state>
1210+
<rpminfo_state id="oval:org.open-scap.cpe.fedora:ste:31" version="1" xmlns="http://oval.mitre.org/XMLSchema/oval-definitions-5#linux">
1211+
<version operation="pattern match">^31$</version>
1212+
</rpminfo_state>
11471213
<rpminfo_state id="oval:org.open-scap.cpe.sles:ste:1" version="1" xmlns="http://oval.mitre.org/XMLSchema/oval-definitions-5#linux">
11481214
<name operation="pattern match">^sles-release</name>
11491215
</rpminfo_state>

docs/developer/developer.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ After building the library you might want to run library self-checks. To do
111111
that you need to have these additional packages installed:
112112

113113
----
114-
wget lua which procps-ng initscripts chkconfig sendmail
114+
wget lua which procps-ng initscripts chkconfig sendmail bzip2
115115
----
116116

117117
and it is also required to have `sendmail` service running on the system:

0 commit comments

Comments
 (0)