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 8 in SPECS #2302

Merged
merged 2 commits into from
Jan 15, 2024

Conversation

vikman90
Copy link
Member

Related issue
Closes #2283

Description

This PR adds the necessary modifications to the SPECS to include the new Alma Linux 8 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

@vikman90 vikman90 linked an issue Jul 20, 2023 that may be closed by this pull request
@mjcr99 mjcr99 linked an issue Jan 8, 2024 that may be closed by this pull request
@mjcr99 mjcr99 changed the base branch from 4.5.1 to 4.8.1 January 8, 2024 06:41
@mjcr99 mjcr99 force-pushed the create-sca-policy-for-alma-linux-os-8 branch from 7628c5d to 550b4ed Compare January 8, 2024 08:15
@mjcr99
Copy link
Member

mjcr99 commented Jan 8, 2024

Issue updates

(08/01/2024) - Updated PR with the requested changes to add Almalinux 8 SCA files. The PR has been tested, the resulting packages contain the new files as expected:

Manager

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

Package installation:

[root@almalinux8 vagrant]# yum install https://packages-dev.wazuh.com/warehouse/test/4.8/rpm/var/wazuh-manager-4.8.1-1.x86_64.rpm -y 
Failed to set locale, defaulting to C.UTF-8
AlmaLinux 8 - BaseOS                            3.1 MB/s | 4.0 MB     00:01    
AlmaLinux 8 - AppStream                         8.8 MB/s |  11 MB     00:01    
AlmaLinux 8 - Extras                             40 kB/s |  20 kB     00:00    
wazuh-manager-4.8.1-1.x86_64.rpm                 19 MB/s | 187 MB     00:09    
Dependencies resolved.
================================================================================
 Package              Architecture  Version           Repository           Size
================================================================================
Installing:
 wazuh-manager        x86_64        4.8.1-1           @commandline        187 M

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

Total size: 187 M
Installed size: 672 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-1.x86_64                           1/1 
  Installing       : wazuh-manager-4.8.1-1.x86_64                           1/1 
  Running scriptlet: wazuh-manager-4.8.1-1.x86_64                           1/1 
  Verifying        : wazuh-manager-4.8.1-1.x86_64                           1/1 

Installed:
  wazuh-manager-4.8.1-1.x86_64                                                  

Complete!

SCA file found:

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

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

Package installation:

[root@almalinux8 vagrant]# yum install https://packages-dev.wazuh.com/warehouse/test/4.8/rpm/var/wazuh-agent-4.8.1-1.x86_64.rpm -y
Failed to set locale, defaulting to C.UTF-8
AlmaLinux 8 - BaseOS                            2.5 MB/s | 4.0 MB     00:01    
AlmaLinux 8 - AppStream                         8.9 MB/s |  11 MB     00:01    
AlmaLinux 8 - Extras                             35 kB/s |  20 kB     00:00    
wazuh-agent-4.8.1-1.x86_64.rpm                  4.1 MB/s | 9.3 MB     00:02    
Dependencies resolved.
================================================================================
 Package             Architecture   Version          Repository            Size
================================================================================
Installing:
 wazuh-agent         x86_64         4.8.1-1          @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-1.x86_64                             1/1 
  Installing       : wazuh-agent-4.8.1-1.x86_64                             1/1 
  Running scriptlet: wazuh-agent-4.8.1-1.x86_64                             1/1 
  Verifying        : wazuh-agent-4.8.1-1.x86_64                             1/1 

Installed:
  wazuh-agent-4.8.1-1.x86_64                                                    

Complete!

SCA file found:

[root@almalinux8 vagrant]# ls /var/ossec/ruleset/sca
cis_alma_linux_8.yml

@mjcr99 mjcr99 requested review from lchico and ncvicchi January 8, 2024 09:05
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.

Great Job, @mjcr99.
I have left some comments. Please take a look.

rpms/SPECS/wazuh-agent.spec Show resolved Hide resolved
rpms/SPECS/wazuh-manager.spec Outdated Show resolved Hide resolved
rpms/SPECS/wazuh-manager.spec Outdated Show resolved Hide resolved
@ncvicchi
Copy link
Contributor

ncvicchi commented Jan 9, 2024

LGTM!

@ncvicchi ncvicchi requested a review from lchico January 9, 2024 17:18
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.

Looks great. Thanks @mjcr99. LGTM!

@vikman90 vikman90 merged commit 449fef0 into 4.8.1 Jan 15, 2024
52 checks passed
@vikman90 vikman90 deleted the create-sca-policy-for-alma-linux-os-8 branch January 15, 2024 15:29
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 8
5 participants