Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Include SCA policy for Alma Linux 9 in SPECS #2298

Merged
merged 4 commits into from
Jan 18, 2024
Merged

Conversation

DFolchA
Copy link
Contributor

@DFolchA DFolchA commented Jul 19, 2023

Related issue
Closes #2284

Description

This PR adds the necessary modifications to the SPECS to include the new Alma Linux 9 SCA policy.

Logs example

Tests

  • Build the package in any supported platform
    • Linux
    • Windows
    • macOS
    • Solaris
    • AIX
    • HP-UX
  • Package installation
  • Package upgrade
  • Package downgrade
  • Package remove
  • Package install/remove/install
  • Change added to CHANGELOG.md
  • Tests for Linux RPM
    • Build the package for x86_64
    • Build the package for i386
    • Build the package for armhf
    • Build the package for aarch64
    • %files section is correctly updated if necessary
  • Tests for Linux deb
    • Build the package for x86_64
    • Build the package for i386
    • Build the package for armhf
    • Build the package for aarch64
    • Package install/remove/install
    • Package install/purge/install
    • Check file permissions after installing the package
  • Tests for macOS
    • Test the package from macOS Sierra to Mojave
  • Tests for Solaris
    • Test the package on Solaris 10
    • Test the package on Solaris 11
    • Check file permissions on Solaris 11 template
  • Tests for IBM AIX
    • %files section is correctly updated if necessary
    • Check the changes from IBM AIX 5 to 7
Manager

Manager package build: https://ci.wazuh.info/job/Packages_builder/180487

Package installation:

[root@localhost vagrant]# yum install -y https://packages-dev.wazuh.com/warehouse/test/4.8/rpm/var/wazuh-manager-4.8.1-al9.x86_64.rpm
AlmaLinux 9 - AppStream                                                                                 4.6 MB/s | 8.1 MB     00:01    
AlmaLinux 9 - BaseOS                                                                                    4.1 MB/s | 3.5 MB     00:00    
AlmaLinux 9 - Extras                                                                                     27 kB/s |  17 kB     00:00    
wazuh-manager-4.8.1-al9.x86_64.rpm                                                                       20 MB/s | 351 MB     00:17    
Dependencies resolved.
========================================================================================================================================
 Package                            Architecture                Version                         Repository                         Size
========================================================================================================================================
Installing:
 wazuh-manager                      x86_64                      4.8.1-al9                       @commandline                      351 M

Transaction Summary
========================================================================================================================================
Install  1 Package

Total size: 351 M
Installed size: 856 M
Downloading Packages:
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                                                                                1/1 
  Running scriptlet: wazuh-manager-4.8.1-al9.x86_64                                                                                 1/1 
  Installing       : wazuh-manager-4.8.1-al9.x86_64                                                                                 1/1 
  Running scriptlet: wazuh-manager-4.8.1-al9.x86_64                                                                                 1/1 
  Verifying        : wazuh-manager-4.8.1-al9.x86_64                                                                                 1/1 

Installed:
  wazuh-manager-4.8.1-al9.x86_64                                                                                                        

Complete!

SCA file found:

[root@localhost vagrant]# ls /var/ossec/ruleset/sca
[root@localhost vagrant]# ls /var/ossec/ruleset/sca
cis_alma_linux_8.yml.disabled       cis_debian12.yml.disabled             cis_solaris11.4.yml.disabled
cis_alma_linux_9.yml                cis_debian7.yml.disabled              cis_solaris11.yml.disabled
cis_amazon_linux_1.yml.disabled     cis_debian8.yml.disabled              cis_sqlserver_2012.yml.disabled
cis_amazon_linux_2.yml.disabled     cis_debian9.yml.disabled              cis_sqlserver_2014.yml.disabled
cis_amazon_linux_2023.yml.disabled  cis_iis_10.yml.disabled               cis_sqlserver_2016.yml.disabled
cis_apache_24.yml.disabled          cis_mongodb_36.yml.disabled           cis_sqlserver_2017.yml.disabled
cis_apple_macOS_10.11.yml.disabled  cis_mysql5-6_community.yml.disabled   cis_sqlserver_2019.yml.disabled
cis_apple_macOS_10.12.yml.disabled  cis_mysql5-6_enterprise.yml.disabled  cis_ubuntu14-04.yml.disabled
cis_apple_macOS_10.13.yml.disabled  cis_nginx_1.yml.disabled              cis_ubuntu16-04.yml.disabled
cis_apple_macOS_10.14.yml.disabled  cis_oracle_database_19c.yml.disabled  cis_ubuntu18-04.yml.disabled
cis_apple_macOS_10.15.yml.disabled  cis_postgre-sql-13.yml.disabled       cis_ubuntu20-04.yml.disabled
cis_apple_macOS_11.1.yml.disabled   cis_rhel5_linux.yml.disabled          cis_ubuntu22-04.yml.disabled
cis_apple_macOS_12.0.yml.disabled   cis_rhel6_linux.yml.disabled          cis_win10_enterprise.yml.disabled
cis_apple_macOS_13.x.yml.disabled   cis_rhel7_linux.yml.disabled          cis_win11_enterprise.yml.disabled
cis_apple_macOS_14.0.yml.disabled   cis_rhel8_linux.yml.disabled          cis_win2012r2.yml.disabled
cis_centos6_linux.yml.disabled      cis_rhel9_linux.yml.disabled          cis_win2016.yml.disabled
cis_centos7_linux.yml.disabled      cis_rocky_linux_8.yml.disabled        cis_win2019.yml.disabled
cis_centos8_linux.yml.disabled      cis_sles11_linux.yml.disabled         cis_win2022.yml.disabled
cis_debian10.yml.disabled           cis_sles12_linux.yml.disabled         sca_unix_audit.yml.disabled
cis_debian11.yml.disabled           cis_sles15_linux.yml.disabled         web_vulnerabilities.yml.disabled
Agent

Agent package build: https://ci.wazuh.info/job/Packages_builder/180488

Package installation:

[root@localhost vagrant]# yum install -y https://packages-dev.wazuh.com/warehouse/test/4.8/rpm/var/wazuh-agent-4.8.1-al9.x86_64.rpm
AlmaLinux 9 - AppStream                                                                                 4.7 MB/s | 8.1 MB     00:01    
AlmaLinux 9 - BaseOS                                                                                    3.7 MB/s | 3.5 MB     00:00    
AlmaLinux 9 - Extras                                                                                     32 kB/s |  17 kB     00:00    
wazuh-agent-4.8.1-al9.x86_64.rpm                                                                        3.7 MB/s | 9.3 MB     00:02    
Dependencies resolved.
========================================================================================================================================
 Package                          Architecture                Version                           Repository                         Size
========================================================================================================================================
Installing:
 wazuh-agent                      x86_64                      4.8.1-al9                         @commandline                      9.3 M

Transaction Summary
========================================================================================================================================
Install  1 Package

Total size: 9.3 M
Installed size: 28 M
Downloading Packages:
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                                                                                1/1 
  Running scriptlet: wazuh-agent-4.8.1-al9.x86_64                                                                                   1/1 
  Installing       : wazuh-agent-4.8.1-al9.x86_64                                                                                   1/1 
  Running scriptlet: wazuh-agent-4.8.1-al9.x86_64                                                                                   1/1 
  Verifying        : wazuh-agent-4.8.1-al9.x86_64                                                                                   1/1 

Installed:
  wazuh-agent-4.8.1-al9.x86_64                                                                                                          

Complete!

SCA file found:

[root@localhost vagrant]# ls /var/ossec/ruleset/sca
cis_alma_linux_9.yml

@DFolchA DFolchA linked an issue Jul 19, 2023 that may be closed by this pull request
vikman90
vikman90 previously approved these changes Jul 20, 2023
@mjcr99 mjcr99 changed the base branch from 4.5.1 to 4.8.1 January 11, 2024 17:47
@mjcr99 mjcr99 dismissed vikman90’s stale review January 11, 2024 17:47

The base branch was changed.

Copy link
Member

@jotacarma90 jotacarma90 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

cp etc/templates/config/rocky/8/sca.files ${RPM_BUILD_ROOT}%{_localstatedir}/tmp/sca-%{version}-%{release}-tmp/rocky/8
cp etc/templates/config/rocky/9/sca.files ${RPM_BUILD_ROOT}%{_localstatedir}/tmp/sca-%{version}-%{release}-tmp/rocky/9

cp etc/templates/config/almalinux/8/sca.files ${RPM_BUILD_ROOT}%{_localstatedir}/tmp/sca-%{version}-%{release}-tmp/almalinux/8


Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: This empty line is not necessary.

Copy link
Member

@lchico lchico left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@vikman90 vikman90 merged commit fcca0c0 into 4.8.1 Jan 18, 2024
52 checks passed
@vikman90 vikman90 deleted the SCA-Alma-Linux-9 branch January 18, 2024 15:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

SPECS for new SCA Alma Linux 9
6 participants