[packit] 0.2.5 upstream release

Upstream tag: v0.2.5
Upstream commit: 961a0636

If you need to do any change in this pull request, you need to locally fetch the source branch of it and push it (with a fix) to your fork (as it is not possible to push to the branch created in the Packit’s fork):
```
git fetch https://src.fedoraproject.org/forks/packit/rpms/openscap-report.git refs/heads/*:refs/remotes/packit/*
git checkout packit/0.2.5-rawhide-update-propose_downstream
```
This commit is contained in:
Packit 2023-09-11 08:50:00 +00:00
parent f4a0b1cf97
commit 0478061f62
6 changed files with 78 additions and 46 deletions

1
.gitignore vendored
View File

@ -5,3 +5,4 @@
/openscap-report-0.2.2.tar.gz /openscap-report-0.2.2.tar.gz
/openscap-report-0.2.3.tar.gz /openscap-report-0.2.3.tar.gz
/openscap-report-0.2.4.tar.gz /openscap-report-0.2.4.tar.gz
/openscap-report-0.2.5.tar.gz

View File

@ -1,3 +1,3 @@
This repository is maintained by packit. This repository is maintained by packit.
https://packit.dev/ https://packit.dev/
The file was generated using packit 0.77.0.post2+g06f877b. The file was generated using packit 0.79.1.post14+g9e876412.

View File

@ -1,5 +1,9 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# This script generate ARF results. # This script generates ARF results.
# Supported OS:
# - Fedora
# - RHEL8/9
# - Centos8/9
# Requirements: # Requirements:
# - cmake # - cmake
# - make # - make
@ -12,8 +16,7 @@
# - scap-security-guide # - scap-security-guide
# Usage: ./generate_arf MODE FETCH PRODUCT ARF_FILE SKIP_BUILD # Usage: ./generate_arf MODE FETCH PRODUCT ARF_FILE SKIP_BUILD
# MODE [latest, ssg] use scap-security-guide or latest content from github # MODE [latest, ssg] use scap-security-guide or latest content from github
# FETCH [yes, no] scanner fetch remote resources # FETCH [yes, no] scanner fetch remote resources
# PRODUCT build or use security content for one specific product
# ARF_FILE Writes results to a given ARF_FILE. # ARF_FILE Writes results to a given ARF_FILE.
# SKIP_BUILD [yes] Skip build of latest content(Have affect with mode latest). # SKIP_BUILD [yes] Skip build of latest content(Have affect with mode latest).
@ -25,13 +28,16 @@ build_content() {
product=$1 product=$1
echo "Build - Start" echo "Build - Start"
git clone https://github.com/ComplianceAsCode/content.git git clone https://github.com/ComplianceAsCode/content.git
cd content/ cd content/
git checkout master git checkout master
./build_product "${product}" cd build/
cd .. cmake ../
make -j4 "${product}"
cd ../../
echo "Build - Done" echo "Build - Done"
} }
@ -48,6 +54,24 @@ run_oscap_scan() {
fi fi
} }
get_product() {
cpe_name=$(grep "CPE_NAME=" < /etc/os-release | sed 's/CPE_NAME=//g' | sed 's/["]//g')
if [[ "${cpe_name}" =~ fedora ]]; then
echo "fedora"
elif [[ "${cpe_name}" =~ redhat.*8 ]]; then
echo "rhel8"
elif [[ "${cpe_name}" =~ redhat.*9 ]]; then
echo "rhel9"
elif [[ "${cpe_name}" =~ centos.*8 ]]; then
echo "centos8"
elif [[ "${cpe_name}" =~ centos.*9 ]]; then
echo "cs9"
else
echo $cpe_name
echo "ERROR: Not supported OS!"
exit 1
fi
}
if [ "$1" = "" ]; then if [ "$1" = "" ]; then
echo "ERROR: Missing MODE parameter!" echo "ERROR: Missing MODE parameter!"
@ -62,17 +86,12 @@ fi
if [ "$3" = "" ]; then if [ "$3" = "" ]; then
echo "ERROR: Missing PRODUCT parameter!" echo "ERROR: Missing ARF_FILE parameter!"
exit 1 exit 1
fi fi
file=$3
if [ "$4" = "" ]; then product=$(get_product)
echo "ERROR: Missing PRODUCT parameter!"
exit 1
fi
file=$4
product=$3
fetch="--fetch-remote-resources" fetch="--fetch-remote-resources"
if [ "$2" = "no" ]; then if [ "$2" = "no" ]; then
@ -81,7 +100,7 @@ fi
if [ "$1" = "latest" ]; then if [ "$1" = "latest" ]; then
if [ "$5" != "yes" ]; then if [ "$4" != "yes" ]; then
build_content "${product}" build_content "${product}"
fi fi
run_oscap_scan "./content/build/ssg-${product}-ds.xml" "${fetch}" "${file}" run_oscap_scan "./content/build/ssg-${product}-ds.xml" "${fetch}" "${file}"

View File

@ -1,8 +1,8 @@
%global pymodule_name openscap_report %global pymodule_name openscap_report
Name: openscap-report Name: openscap-report
Version: 0.2.4 Version: 0.2.5
Release: 3%{?dist} Release: 1%{?dist}
Summary: A tool for generating human-readable reports from (SCAP) XCCDF and ARF results Summary: A tool for generating human-readable reports from (SCAP) XCCDF and ARF results
# The entire source code is LGPL-2.1+ and GPL-2.0+ and MIT except schemas/ and assets/, which are Public Domain # The entire source code is LGPL-2.1+ and GPL-2.0+ and MIT except schemas/ and assets/, which are Public Domain
@ -60,6 +60,36 @@ install -m 0644 -Dt %{buildroot}%{_mandir}/man1 _build_docs/oscap-report.1
%changelog %changelog
* Mon Sep 11 2023 Packit <hello@packit.dev> - 0.2.5-1
- 0.2.5 (Jan Rodak)
- Show referenced OVAL State (Jan Rodak)
- Parse reference in filter (Jan Rodak)
- Show OVAL Variables and referenced OVAL endpoints in report (Jan Rodak)
- Remove UUID from headings (Jan Rodak)
- Move function (Jan Rodak)
- Display in report OVAL object that references to other OVAL Objects (Jan Rodak)
- Resolve parsing of referenced OVAL Objects and OVAL Variables (Jan Rodak)
- Add OVAL Variable structure and parser (Jan Rodak)
- Rework OVAL Object and State (Jan Rodak)
- Parse mapping between OVAL var and values and propagate them (Jan Rodak)
- Remove namesapace for attributes (Jan Rodak)
- Show OVAL states in report (Jan Rodak)
- Parse attributes of elements in OVAL state and Parse all OVAL states in OVAL test (Jan Rodak)
- Show OVAL objects in report (Jan Rodak)
- Parse attributes of elements in OVAL object (Jan Rodak)
- Removing the processing of collected objects (Jan Rodak)
- Use an empty string instead of None when the text of the set-value element is empty (Jan Rodak)
- Fix deprecation warning (Jan Rodak)
- Remove product detection from the tmt plan (Jan Rodak)
- Increase vm memory (Jan Rodak)
- Add python3 dependency (Jan Rodak)
- Adjust the build of content (Jan Rodak)
- Automatic product detection to build content by CPE identifier (Jan Rodak)
- Remove whitespaces (Jan Rodak)
- Show explanation of score computation in report (Jan Rodak)
- Add explanation of score computation (Jan Rodak)
- Parse system attribute from score element (Jan Rodak)
* Thu Jul 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 0.2.4-3 * Thu Jul 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 0.2.4-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild - Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild

View File

@ -1,27 +1,8 @@
summary: Test integration with latest versions of content summary: Test integration with latest versions of content
discover+: discover+:
filter: tag:integration filter: tag:integration
adjust: provision:
- when: distro == fedora memory: 4096
environment:
PRODUCT: fedora
TO_BUILD_PRODUCT: fedora
- when: distro == rhel-9
environment:
PRODUCT: rhel9
TO_BUILD_PRODUCT: rhel9
- when: distro == rhel-8
environment:
PRODUCT: rhel8
TO_BUILD_PRODUCT: rhel8
- when: distro == centos-8
environment:
PRODUCT: centos8
TO_BUILD_PRODUCT: rhel8
- when: distro == centos-9 or distro == centos-stream-9
environment:
PRODUCT: cs9
TO_BUILD_PRODUCT: rhel9
prepare: prepare:
- name: Install packages require for generation ARF files - name: Install packages require for generation ARF files
how: install how: install
@ -30,6 +11,7 @@ prepare:
- make - make
- openscap-utils - openscap-utils
- openscap-scanner - openscap-scanner
- python3
- python3-pyyaml - python3-pyyaml
- python3-jinja2 - python3-jinja2
- python3-setuptools - python3-setuptools
@ -37,11 +19,11 @@ prepare:
- scap-security-guide - scap-security-guide
- name: Generate ARF files - name: Generate ARF files
how: shell how: shell
script: script:
- ./generate_arf.sh ssg no ${PRODUCT} ${TMT_PLAN_DATA}/arf.xml - ./generate_arf.sh ssg no ${TMT_PLAN_DATA}/arf.xml
- ./generate_arf.sh ssg yes ${PRODUCT} ${TMT_PLAN_DATA}/arf_fetch-remote-resources.xml - ./generate_arf.sh ssg yes ${TMT_PLAN_DATA}/arf_fetch-remote-resources.xml
- ./generate_arf.sh latest no ${TO_BUILD_PRODUCT} ${TMT_PLAN_DATA}/arf-latest.xml - ./generate_arf.sh latest no ${TMT_PLAN_DATA}/arf-latest.xml
- ./generate_arf.sh latest yes ${TO_BUILD_PRODUCT} ${TMT_PLAN_DATA}/arf_fetch-remote-resources-latest.xml yes - ./generate_arf.sh latest yes ${TMT_PLAN_DATA}/arf_fetch-remote-resources-latest.xml yes
execute: execute:
how: tmt how: tmt

View File

@ -1 +1 @@
SHA512 (openscap-report-0.2.4.tar.gz) = 4a09baaf544dec37b697b4a94c50b33176e4992f0af7d0a83a52ed14fc7d3878007f19cfe5b0f7b152fda5e6a4a4d001b3f2e7a11321e2ce656020383db23654 SHA512 (openscap-report-0.2.5.tar.gz) = 6a13f5f18cd6b52016d7d04f6d1db37e5506cc90ae6adf75ff431e89bcacec5b081baf1dfb7cd7fdcd90827615b325976950149af051d074a8247fbe62a0f43d