AUR AI Reviewer

Review Results

Version #1809 of mailspring-bin · commit 2c57472d1d6e · status Reviewed

Risk 0/5 · Safe .SRCINFO
Result #1131

Comment

The only change in this .SRCINFO hunk is a version bump from 1.22.0 to 1.23.0. There are no changes to source URLs, checksums, build steps, install scripts, dependencies, or packaging permissions in the provided diff, so this specific change does not introduce an obvious security issue. Any risk would depend on the corresponding PKGBUILD/source update, which is outside the reviewed hunk.

@@ -1,6 +1,6 @@
 pkgbase = mailspring-bin
 	pkgdesc = A beautiful, fast and fully open source mail client.(Prebuilt version.Use system-wide electron)
-	pkgver = 1.22.0
+	pkgver = 1.23.0
 	pkgrel = 1
 	url = https://getmailspring.com/
 	arch = x86_64
Risk 0/5 · Safe .SRCINFO
Result #1132

Comment

The .SRCINFO change is a straightforward version bump for a binary package: it updates the provided package version, the upstream GitHub release RPM URL, and the corresponding checksum. The source remains on HTTPS and points to the official upstream release asset, with no new scripts, build steps, privilege changes, or suspicious dependencies introduced in this diff. Based on the provided hunk alone, this appears low risk.

@@ -9,11 +9,11 @@ pkgbase = mailspring-bin
 	depends = krb5
 	depends = db5.3
 	depends = tidy
-	provides = mailspring=1.22.0
+	provides = mailspring=1.23.0
 	conflicts = mailspring
-	source = mailspring-1.22.0.rpm::https://github.com/Foundry376/Mailspring/releases/download/1.22.0/mailspring-1.22.0-0.1.x86_64.rpm
+	source = mailspring-1.23.0.rpm::https://github.com/Foundry376/Mailspring/releases/download/1.23.0/mailspring-1.23.0-0.1.x86_64.rpm
 	source = mailspring.sh
-	sha256sums = 733010db4d3bb62547203531831bd9c0237de60583ab43ff5ac8962c1f1ef378
+	sha256sums = b99be331fb4144b7556edb8e11cd854464cd3e8f3716527171da7c3c8fbb16ba
 	sha256sums = a774c2f54fbbeeaac3cefc0f7250796d30c86d27f0fd40b7eaf9c0fdb021623d
 
 pkgname = mailspring-bin
Risk 0/5 · Safe PKGBUILD
Result #1133

Comment

The change is low risk. It only bumps pkgver from 1.22.0 to 1.23.0 and adjusts packaging logic to locate the app directory via a helper, copy resources with a glob, and install the renamed metainfo XML file. I do not see any new network fetches, privilege escalation, persistence mechanisms, or suspicious execution paths introduced by this diff. The only minor concern is that the new unquoted glob in cp -a could fail if the resources directory is unexpectedly empty, but that is a packaging robustness issue rather than a security problem.

@@ -1,7 +1,7 @@
 # Maintainer: zxp19821005 <zxp19821005 at 163 dot com>
 pkgname=mailspring-bin
 _pkgname=Mailspring
-pkgver=1.22.0
+pkgver=1.23.0
 _electronversion=41
 pkgrel=1
 pkgdesc="A beautiful, fast and fully open source mail client.(Prebuilt version.Use system-wide electron)"
Risk 0/5 · Safe PKGBUILD
Result #1134

Comment

The change is low risk. It only refactors the Electron-version check in PKGBUILD: extracting the app-dir lookup into a helper, simplifying the executable search, and changing the version parsing regex. There are no new sources, downloads, privilege changes, install-script actions, or packaging side effects. The only functional impact is on a diagnostic warning during build/package verification, and the logic still only reads files under $srcdir. I do not see a supply-chain or persistence concern in this diff.

@@ -21,27 +21,20 @@ source=(
     "${pkgname%-bin}-${pkgver}.rpm::${_ghurl}/releases/download/${pkgver}/${pkgname%-bin}-${pkgver}-0.1.${CARCH}.rpm"
     "${pkgname%-bin}.sh"
 )
-sha256sums=('733010db4d3bb62547203531831bd9c0237de60583ab43ff5ac8962c1f1ef378'
+sha256sums=('b99be331fb4144b7556edb8e11cd854464cd3e8f3716527171da7c3c8fbb16ba'
             'a774c2f54fbbeeaac3cefc0f7250796d30c86d27f0fd40b7eaf9c0fdb021623d')
+_get_app_dir() {
+    find "${srcdir}" -type f -name "resources.pak" -exec dirname {} + | head -n 1
+}
 _check_electron_version() {
     echo "Verifying Electron version..."
-    local _app_dir=$(find "${srcdir}" -type f -name "resources.pak" -exec dirname {} + | head -n 1)
-    local _main_exe=""
-    if [[ -n "${_app_dir}" ]]; then
-        _main_exe=$(find "${_app_dir}" -maxdepth 1 -type f -executable -printf '%s %p\n' | sort -nr | head -n 1 | cut -d' ' -f2-)
-    fi
-    if [[ -n "${_main_exe}" ]]; then
-        local _elec_ver=$(strings "${_main_exe}" | grep '^Chrome/[0-9.]* Electron/[0-9]' | cut -d'/' -f3 | cut -d'.' -f1 | head -n 1)
-        if [[ -n "${_elec_ver}" ]]; then
-            if [[ "${_elec_ver}" != "${_electronversion}" ]]; then
-                echo -e "\033[1;31mWarning: Electron version mismatch! Detected: ${_elec_ver}, Expected: ${_electronversion}\033[0m"
-            else
-                echo -e "Electron version verified: \033[1;31m${_elec_ver}\033[0m"
-            fi
-        fi
-    else
-        echo -e "\033[1;33mNote: Could not find Electron binary for version verification.\033[0m"
-    fi
+    local _main_exe=$(find "$(_get_app_dir)" -maxdepth 1 -type f -executable -printf '%s %p\n' | sort -nr | head -1 | cut -d' ' -f2-)
+    [[ -z "${_main_exe}" ]] && echo -e "\033[1;33mNote: Could not find Electron binary.\033[0m" && return
+    local _elec_ver=$(strings "${_main_exe}" | grep -oP 'Electron/\K[0-9]+' | head -1)
+    [[ -z "${_elec_ver}" ]] && echo -e "\033[1;33mNote: Could not determine Electron version.\033[0m" && return
+    [[ "${_elec_ver}" != "${_electronversion}" ]] &&
+        echo -e "\033[1;31mWarning: Electron version mismatch! Detected: ${_elec_ver}, Expected: ${_electronversion}\033[0m" ||
+        echo -e "Electron version verified: \033[1;31m${_elec_ver}\033[0m"
 }
 _get_current_desktop_env() {
     if [ -n "$XDG_CURRENT_DESKTOP" ]; then
Risk 0/5 · Safe PKGBUILD
Result #1135

Comment

The change is low risk. It only refactors helper logic in PKGBUILD and updates the installed metainfo filename from .appdata.xml to .metainfo.xml, which is consistent with modern AppStream naming. The new _get_app_dir() helper is equivalent to the previous inline find, and the package() copy still stays within $pkgdir. I do note a minor robustness concern: cp -a "${_app_dir}/resources/"* will fail if the directory is empty or if globbing behaves unexpectedly, but that is a build reliability issue rather than a security issue. No new network access, privilege escalation, persistence, or suspicious sources were introduced.

@@ -71,8 +64,8 @@ prepare() {
 package() {
     install -Dm755 "${srcdir}/${pkgname%-bin}.sh" "${pkgdir}/usr/bin/${pkgname%-bin}"
     install -Dm755 -d "${pkgdir}/usr/lib/${pkgname%-bin}"
-	local _app_dir=$(find "${srcdir}" -type f -name "resources.pak" -exec dirname {} + | head -n 1)
-	cp -a "${_app_dir}/resources/". "${pkgdir}/usr/lib/${pkgname%-bin}/"
+	local _app_dir=$(_get_app_dir)
+	cp -a "${_app_dir}/resources/"* "${pkgdir}/usr/lib/${pkgname%-bin}/"
     install -Dm644 "${srcdir}/usr/share/applications/${_pkgname}.desktop" "${pkgdir}/usr/share/applications/${pkgname%-bin}.desktop"
     find "${srcdir}" -type f \( -name "*.png" -o -name "*.svg" \) -path "*share/icons/*" | while read -r _i; do
         _extension="${_i##*.}"
Risk 0/5 · Safe PKGBUILD
Result #1136

Comment

The change is a straightforward packaging fix: it switches the installed AppStream metadata file from the old .appdata.xml name to the newer .metainfo.xml name. This only affects which metadata file is copied into $pkgdir during package(), and does not introduce network access, privilege escalation, persistence, or any other suspicious behavior. No security impact is apparent from this diff hunk alone.

@@ -80,5 +73,5 @@ package() {
         _target_dir="/usr/share/icons/$(dirname "${_icon_path}")"
         install -Dm644 "${_i}" "${pkgdir}${_target_dir}/${pkgname%-bin}.${_extension}"
     done
-    install -Dm644 "${srcdir}/usr/share/metainfo/${pkgname%-bin}.appdata.xml" -t "${pkgdir}/usr/share/metainfo"
+    install -Dm644 "${srcdir}/usr/share/metainfo/${pkgname%-bin}.metainfo.xml" -t "${pkgdir}/usr/share/metainfo"
 }