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

feat: Update MariaDB RPM links #14

Merged
merged 1 commit into from
Jan 7, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions docker/script/bootstrap.sh
Original file line number Diff line number Diff line change
Expand Up @@ -53,13 +53,13 @@ sudo mkdir mariadb_rpm
sudo chown airflow /mariadb_rpm

if [[ $(uname -p) == "aarch64" ]]; then
wget https://mirror.mariadb.org/yum/11.1/fedora38-aarch64/rpms/MariaDB-common-11.1.2-1.fc38.$(uname -p).rpm -P /mariadb_rpm
wget https://mirror.mariadb.org/yum/11.1/fedora38-aarch64/rpms/MariaDB-shared-11.1.2-1.fc38.$(uname -p).rpm -P /mariadb_rpm
wget https://mirror.mariadb.org/yum/11.1/fedora38-aarch64/rpms/MariaDB-devel-11.1.2-1.fc38.$(uname -p).rpm -P /mariadb_rpm
wget https://mirror.mariadb.org/yum/11.4/fedora38-aarch64/rpms/MariaDB-common-11.4.2-1.fc38.$(uname -p).rpm -P /mariadb_rpm
wget https://mirror.mariadb.org/yum/11.4/fedora38-aarch64/rpms/MariaDB-shared-11.4.2-1.fc38.$(uname -p).rpm -P /mariadb_rpm
wget https://mirror.mariadb.org/yum/11.4/fedora38-aarch64/rpms/MariaDB-devel-11.4.2-1.fc38.$(uname -p).rpm -P /mariadb_rpm
else
wget https://mirror.mariadb.org/yum/11.1/fedora38-amd64/rpms/MariaDB-common-11.1.2-1.fc38.$(uname -p).rpm -P /mariadb_rpm
wget https://mirror.mariadb.org/yum/11.1/fedora38-amd64/rpms/MariaDB-shared-11.1.2-1.fc38.$(uname -p).rpm -P /mariadb_rpm
wget https://mirror.mariadb.org/yum/11.1/fedora38-amd64/rpms/MariaDB-devel-11.1.2-1.fc38.$(uname -p).rpm -P /mariadb_rpm
wget https://mirror.mariadb.org/yum/11.4/fedora38-amd64/rpms/MariaDB-common-11.4.2-1.fc38.$(uname -p).rpm -P /mariadb_rpm
wget https://mirror.mariadb.org/yum/11.4/fedora38-amd64/rpms/MariaDB-shared-11.4.2-1.fc38.$(uname -p).rpm -P /mariadb_rpm
wget https://mirror.mariadb.org/yum/11.4/fedora38-amd64/rpms/MariaDB-devel-11.4.2-1.fc38.$(uname -p).rpm -P /mariadb_rpm
Comment on lines +56 to +62
Copy link

Choose a reason for hiding this comment

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

💡 Codebase verification

Update MariaDB version to 11.4.3

The code currently uses MariaDB 11.4.2, but version 11.4.3 is available in the same repository. For security best practices, it's recommended to use the latest stable version within the same major release.

  • Update the version number from 11.4.2 to 11.4.3 in all wget commands in docker/script/bootstrap.sh
🔗 Analysis chain

Verify MariaDB version security status

While upgrading to 11.4.2 is good, let's verify it's the latest stable version and check for any known security vulnerabilities.


Let me try a different approach to verify the MariaDB version information.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Check latest MariaDB version and security advisories

# Get latest version from MariaDB repository
curl -s "https://downloads.mariadb.org/rest-api/mariadb/" | jq -r '.[] | select(.release_status=="stable") | .release_id' | sort -V | tail -n1

# Check for CVEs
gh api graphql -f query='
{
  securityVulnerabilities(first: 5, ecosystem: MAVEN, package: "mariadb-java-client") {
    nodes {
      advisory {
        summary
        severity
        publishedAt
      }
      vulnerableVersionRange
      firstPatchedVersion {
        identifier
      }
    }
  }
}'

Length of output: 571


Script:

#!/bin/bash
# Check MariaDB version availability and related files
# First, verify if this version exists in the mirror
curl -s -I "https://mirror.mariadb.org/yum/11.4/fedora38-amd64/rpms/MariaDB-common-11.4.2-1.fc38.x86_64.rpm" | head -n 1

# Check if there's a newer version in the same series
curl -s "https://mirror.mariadb.org/yum/11.4/fedora38-amd64/rpms/" | grep -o 'MariaDB-common-11.4.[0-9]*-[0-9].fc38' | sort -V | tail -n 1

# Look for any version-related comments or documentation in the repository
rg -i "mariadb.*version|mariadb.*security" --type sh

Length of output: 363

🧰 Tools
🪛 Shellcheck (0.10.0)

[warning] 56-56: Quote this to prevent word splitting.

(SC2046)


[warning] 57-57: Quote this to prevent word splitting.

(SC2046)


[warning] 58-58: Quote this to prevent word splitting.

(SC2046)


[warning] 60-60: Quote this to prevent word splitting.

(SC2046)


[warning] 61-61: Quote this to prevent word splitting.

(SC2046)


[warning] 62-62: Quote this to prevent word splitting.

(SC2046)

fi

# install mariadb_devel and its dependencies
Expand Down