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

Version file standardization #526

Open
2 of 4 tasks
rauldpm opened this issue Feb 14, 2025 · 0 comments · Fixed by #529 · May be fixed by #536
Open
2 of 4 tasks

Version file standardization #526

rauldpm opened this issue Feb 14, 2025 · 0 comments · Fixed by #529 · May be fixed by #536
Assignees
Labels
level/task Task issue type/enhancement New feature or request

Comments

@rauldpm
Copy link
Member

rauldpm commented Feb 14, 2025

Description

As part of the standardization process, all XDR-SIEM repositories will use a consistent identification method. Each repository will include a standardized VERSION.json file containing necessary data to identify the origin branch and release stage. This file should be included in the installer's installation directory and indicate the short commit used to create it.

Requirements

GitHub
  1. Each repository must include a VERSION.json file in the root directory.
  2. The file must be named VERSION.json.
  3. It should follow the specified JSON format (with required keys).
  4. The version key value must follow the MAJOR.MINOR.PATCH format.
  5. The stage key value must indicate the release stage, using lowercase and no spaces.
  6. Numeric revisions (e.g., 41200) should be replaced by the stage value from the version file.
  7. References to the version and stage (revision) should be fetched from this JSON file.

[NOTE]
References such as Jenkinsfile shared libraries or uses: repo/workflow@main are exempted from this change (7).
Hard-coded values should not be modified, processes using an older version/release file should change to use the new VERSION.json file instead
However, procedures like package generation should be adapted accordingly.

Installers
  1. Installers should install the VERSION.json file in the installation directory:
    1. Wazuh manager and Wazuh agent: /var/ossec (or equivalent)
    2. Wazuh dashboard and Wazuh indexer: /usr/share/wazuh-{dashboard/indexer}
  2. The version and stage (revision) should be fetched from the VERSION.json file.
  3. The VERSION.json provided in the installer package should include the short commit used to create the it. If the repository requires a compound commit due to dependencies, use it instead of a short commit.
  4. Installer nomenclature and metadata must remain unchanged.
  5. File Permissions and Ownership for VERSION.json:
    1. Ownership: Subsystem user and group
    2. Permissions: 440
Documentation
  1. Documentation must be modified to reflect the changes.

Resources

VERSION.json file content and structure
  • GitHub repository
{
    "version": "4.12.0",
    "stage": "alpha0"
}
  • Installers
{
    "version": "4.12.0",
    "stage": "alpha0",
    "commit": "short_commit_value"
}

Tasks

  • Create and add the new version file to the repository
  • Update relevant processes to utilize the new version file
  • Modify installers to support the new version file
  • Conduct thorough testing to ensure compatibility and functionality

Note

Once completed, changes should be ported to main (5.0.0), as there are new repositories introduced in 5.0.0 that are not present in 4.12.0

@rauldpm rauldpm added level/task Task issue type/enhancement New feature or request labels Feb 14, 2025
@wazuhci wazuhci moved this to Triage in XDR+SIEM/Release 4.12.0 Feb 14, 2025
@guidomodarelli guidomodarelli self-assigned this Feb 14, 2025
@wazuhci wazuhci moved this from Triage to In progress in XDR+SIEM/Release 4.12.0 Feb 14, 2025
@yenienserrano yenienserrano linked a pull request Feb 17, 2025 that will close this issue
7 tasks
@wazuhci wazuhci moved this from In progress to Pending review in XDR+SIEM/Release 4.12.0 Feb 19, 2025
@guidomodarelli guidomodarelli linked a pull request Feb 19, 2025 that will close this issue
7 tasks
@guidomodarelli guidomodarelli linked a pull request Feb 19, 2025 that will close this issue
7 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
level/task Task issue type/enhancement New feature or request
Projects
Status: Pending review
2 participants