AUR AI Reviewer

Review Results

Version #2701 of mailspring-bin · commit 91c8e7df3453 · status Reviewed

Risk 0/5 · Safe .SRCINFO
Result #4537

Comment

The only change in this .SRCINFO hunk is a version bump from 1.25.0 to 1.26.0. No source URLs, checksums, build steps, dependencies, install scripts, or packaging permissions are changed in the reviewed diff. On its face this does not introduce a security issue; any risk would depend on the upstream release contents, which are not part of this diff.

@@ -1,6 +1,6 @@
 pkgbase = mailspring-bin
 	pkgdesc = A beautiful, fast and fully open source mail client.
-	pkgver = 1.25.0
+	pkgver = 1.26.0
 	pkgrel = 1
 	url = https://getmailspring.com/
 	arch = aarch64
Risk 0/5 · Safe .SRCINFO
Result #4538

Comment

The change is a straightforward version bump in .SRCINFO: it updates the provided package version and the checksums/URLs for the upstream GitHub release artifacts from 1.25.0 to 1.26.0. The sources remain HTTPS on the official upstream release page, there are no new build-time commands, no added scripts, and no packaging/persistence red flags in this diff. Based on the provided hunk alone, this looks like a routine metadata refresh with no security concern.

@@ -10,13 +10,13 @@ pkgbase = mailspring-bin
 	depends = krb5
 	depends = db5.3
 	depends = tidy
-	provides = mailspring=1.25.0
+	provides = mailspring=1.26.0
 	conflicts = mailspring
 	source = mailspring.sh
-	sha256sums = a774c2f54fbbeeaac3cefc0f7250796d30c86d27f0fd40b7eaf9c0fdb021623d
-	source_aarch64 = mailspring-1.25.0-aarch64.rpm::https://github.com/Foundry376/Mailspring/releases/download/1.25.0/mailspring-1.25.0-0.1.aarch64.rpm
-	sha256sums_aarch64 = 666dfe7a1089ed4d6ab6d5c06af669835664b1fb0c5b0719e2b0a7598143d690
-	source_x86_64 = mailspring-1.25.0-x86_64.rpm::https://github.com/Foundry376/Mailspring/releases/download/1.25.0/mailspring-1.25.0-0.1.x86_64.rpm
-	sha256sums_x86_64 = 7a03f4d0db99e67601ff00a5ff45d84ef1f1f7404ef646b679d3307396256a03
+	sha256sums = bd5358d8f323d3c2c2f0733364ee4ea55f551dd86ba0be2a76846210b60897fc
+	source_aarch64 = mailspring-1.26.0-aarch64.rpm::https://github.com/Foundry376/Mailspring/releases/download/1.26.0/mailspring-1.26.0-0.1.aarch64.rpm
+	sha256sums_aarch64 = 5d43f37f8f7524706402b9e83ea7a40a07109c2be9355f67a79b65d1da5152b0
+	source_x86_64 = mailspring-1.26.0-x86_64.rpm::https://github.com/Foundry376/Mailspring/releases/download/1.26.0/mailspring-1.26.0-0.1.x86_64.rpm
+	sha256sums_x86_64 = 84ce5d587574900f5524353c7bab249aaaacb9409ee82784e8ee542f42a99950
 
 pkgname = mailspring-bin
Risk 0/5 · Safe PKGBUILD
Result #4539

Comment

The change is a straightforward version bump from 1.25.0 to 1.26.0 with corresponding checksum updates. No new sources, build steps, install scripts, permissions changes, or other security-relevant logic were introduced in this diff. The only code change is a minor helper-function refactor and a quoting fix in package(), which does not add risk on its own. Based on the provided hunk, I see no security issue.

@@ -1,7 +1,7 @@
 # Maintainer: zxp19821005 <zxp19821005 at 163 dot com>
 pkgname=mailspring-bin
 _pkgname=Mailspring
-pkgver=1.25.0
+pkgver=1.26.0
 _electronversion=44
 pkgrel=1
 pkgdesc="A beautiful, fast and fully open source mail client."
Risk 0/5 · Safe PKGBUILD
Result #4540

Comment

The change is low risk. It only updates source checksums and adjusts _get_app_dir() to locate the app directory by finding resources.pak and ensuring a sibling resources/ directory exists. I do not see any added network access, privilege escalation, persistence, or execution of untrusted code. The new pipeline is slightly more complex than the previous find|head approach, but it remains a local filesystem search within the build tree and does not introduce a security concern in this context.

@@ -23,11 +23,11 @@ depends=(
 source=("${pkgname%-bin}.sh")
 source_aarch64=("${pkgname%-bin}-${pkgver}-aarch64.rpm::${_ghurl}/releases/download/${pkgver}/${pkgname%-bin}-${pkgver}-0.1.aarch64.rpm")
 source_x86_64=("${pkgname%-bin}-${pkgver}-x86_64.rpm::${_ghurl}/releases/download/${pkgver}/${pkgname%-bin}-${pkgver}-0.1.x86_64.rpm")
-sha256sums=('a774c2f54fbbeeaac3cefc0f7250796d30c86d27f0fd40b7eaf9c0fdb021623d')
-sha256sums_aarch64=('666dfe7a1089ed4d6ab6d5c06af669835664b1fb0c5b0719e2b0a7598143d690')
-sha256sums_x86_64=('7a03f4d0db99e67601ff00a5ff45d84ef1f1f7404ef646b679d3307396256a03')
+sha256sums=('bd5358d8f323d3c2c2f0733364ee4ea55f551dd86ba0be2a76846210b60897fc')
+sha256sums_aarch64=('5d43f37f8f7524706402b9e83ea7a40a07109c2be9355f67a79b65d1da5152b0')
+sha256sums_x86_64=('84ce5d587574900f5524353c7bab249aaaacb9409ee82784e8ee542f42a99950')
 _get_app_dir() {
-    find "${srcdir}" -type f -name "resources.pak" -exec dirname {} + | head -n 1
+	find "${srcdir}" -type f -name "resources.pak" -print 2>/dev/null | while read f; do [ -d "${f%/*}/resources" ] && echo "${f%/*}" && break; done
 }
 _check_electron_version() {
     echo "Verifying Electron version..."
Risk 0/5 · Safe PKGBUILD
Result #4541

Comment

The change is a harmless quoting fix in PKGBUILD: `local _app_dir="$(_get_app_dir)"` instead of unquoted command substitution. This does not alter what is fetched, built, or installed, and it reduces word-splitting risk. No new network access, privilege changes, persistence mechanisms, or packaging integrity issues are introduced by this diff hunk.

@@ -67,7 +67,7 @@ prepare() {
 package() {
     install -Dm755 "${srcdir}/${pkgname%-bin}.sh" "${pkgdir}/usr/bin/${pkgname%-bin}"
     install -Dm755 -d "${pkgdir}/usr/lib/${pkgname%-bin}"
-	local _app_dir=$(_get_app_dir)
+	local _app_dir="$(_get_app_dir)"
 	cp -a "${_app_dir}/resources/." "${pkgdir}/usr/lib/${pkgname%-bin}/"
     install -Dm644 "${srcdir}/usr/share/applications/${_pkgname}.desktop" -t "${pkgdir}/usr/share/applications"
     find "${srcdir}" -type f \( -name "*.png" -o -name "*.svg" \) -path "*share/icons/*" | while read -r _i; do
Risk 0/5 · Safe mailspring.sh
Result #4542

Comment

The change is low risk. It is a formatting/cleanup update to the launcher script plus a small invocation change from passing the app path as a positional argument to using Electron's explicit `--app` flag. I don't see any added network access, privilege escalation, persistence, or other malicious behavior. The existing behavior around loading user flag files and conditionally disabling the sandbox when run as root is unchanged. The `--app` switch is a normal Electron invocation pattern and does not introduce a security issue by itself.

@@ -2,72 +2,56 @@
 set -e
 _APPDIR="/usr/lib/@appname@"
 _RUNNAME="${_APPDIR}/@runname@"
-
-# Base environment variables
+# ==== Base environment variables ====
 export ELECTRON_IS_DEV=0
 export ELECTRON_FORCE_IS_PACKAGED=true
 export ELECTRON_DISABLE_SECURITY_WARNINGS=true
 export NODE_ENV=production
 export XDG_CONFIG_HOME="${XDG_CONFIG_HOME:-$HOME/.config}"
 export LD_LIBRARY_PATH="${_APPDIR}/lib:${LD_LIBRARY_PATH}"
-
-# 1. Display System Optimization (X11 & Wayland)
+# ==== 1. Display System Optimization (X11 & Wayland) ====
 # Use 'auto' to allow modern Electron (v20+) to detect the best platform
 # This helps with Wayland window decorations, fractional scaling, and GPU acceleration
 export ELECTRON_OZONE_PLATFORM_HINT="${ELECTRON_OZONE_PLATFORM_HINT:-auto}"
-
-# 2. Desktop Environment (DE) Compatibility
+# ==== 2. Desktop Environment (DE) Compatibility ====
 # Set CHROME_DESKTOP to match the .desktop file for correct taskbar icon grouping
 export CHROME_DESKTOP="@appname@.desktop"
-
 # Fix for Electron's trash implementation on different DEs
 case "${XDG_CURRENT_DESKTOP}" in
-    KDE)
-        export ELECTRON_TRASH="kioclient5"
-        ;;
-    GNOME)
-        export ELECTRON_TRASH="gio"
-        ;;
-    XFCE)
-        export ELECTRON_TRASH="gvfs-trash"
-        ;;
-    *)
-        # Default fallback
-        ;;
+	KDE)	export ELECTRON_TRASH="kioclient5"	;;
+	GNOME)	export ELECTRON_TRASH="gio"			;;
+	XFCE)	export ELECTRON_TRASH="gvfs-trash"	;;
+	*)	# Default fallback						;;
 esac
-
-# 3. Load user-defined flags
+# ==== 3. Load user-defined flags ====
 # The script checks for flags in the following order (later files override/append to earlier ones):
 # 1. System-wide Electron flags: $XDG_CONFIG_HOME/electron-flags.conf
 # 2. Version-specific Electron flags: $XDG_CONFIG_HOME/electron@electronversion@-flags.conf
 # 3. App-specific global flags: $XDG_CONFIG_HOME/@appname@-flags.conf
 # 4. App-specific directory flags: $XDG_CONFIG_HOME/@cfgdirname@/@appname@-flags.conf
 _FLAG_SOURCES=(
-    "${XDG_CONFIG_HOME}/electron-flags.conf"
-    "${XDG_CONFIG_HOME}/electron@electronversion@-flags.conf"
-    "${XDG_CONFIG_HOME}/@appname@-flags.conf"
-    "${XDG_CONFIG_HOME}/@cfgdirname@/@appname@-flags.conf"
+	"${XDG_CONFIG_HOME}/electron-flags.conf"
+	"${XDG_CONFIG_HOME}/electron@electronversion@-flags.conf"
+	"${XDG_CONFIG_HOME}/@appname@-flags.conf"
+	"${XDG_CONFIG_HOME}/@cfgdirname@/@appname@-flags.conf"
 )
-
 declare -a flags
 for _FLAGS_FILE in "${_FLAG_SOURCES[@]}"; do
-    if [[ -f "${_FLAGS_FILE}" ]]; then
-        echo "Loading flags from ${_FLAGS_FILE}"
-        while read -r line || [[ -n "$line" ]]; do
-            [[ "${line}" =~ ^[[:space:]]*#.* ]] || [[ -z "${line}" ]] || {
-                read -ra line_flags <<< "$line"
-                flags+=("${line_flags[@]}")
-            }
-        done < "${_FLAGS_FILE}"
-    fi
+	if [[ -f "${_FLAGS_FILE}" ]]; then
+		echo "Loading flags from ${_FLAGS_FILE}"
+		while read -r line || [[ -n "$line" ]]; do
+			[[ "${line}" =~ ^[[:space:]]*#.* ]] || [[ -z "${line}" ]] || {
+				read -ra line_flags <<< "$line"
+				flags+=("${line_flags[@]}")
+			}
+		done < "${_FLAGS_FILE}"
+	fi
 done
-
-# 4. Sandbox and Execution Permissions
+# ==== 4. Sandbox and Execution Permissions ====
 # Disable sandbox if running as root without ELECTRON_RUN_AS_NODE
 _SANDBOX_ARG=()
 if [[ "${EUID}" -eq 0 ]] && [[ "${ELECTRON_RUN_AS_NODE}" != "1" ]]; then
-    _SANDBOX_ARG=("--no-sandbox")
+	_SANDBOX_ARG=("--no-sandbox")
 fi
-
 cd "${_APPDIR}"
-exec electron@electronversion@ "${flags[@]}" "${_SANDBOX_ARG[@]}" "${_RUNNAME}" "$@"
\ No newline at end of file
+exec electron@electronversion@ "${flags[@]}" "${_SANDBOX_ARG[@]}" --app "${_RUNNAME}" "$@"
\ No newline at end of file