AUR AI Reviewer

Review Results

Version #3181 of wechat-universal-bwrap · commit 2cc046f88884 · status Reviewed

Risk 0/5 · Safe .SRCINFO
Result #6701

Comment

The only change in this .SRCINFO hunk is a pkgrel bump from 1 to 2. No sources, checksums, dependencies, install scripts, or build logic are modified here, so there is no new security-relevant behavior introduced by this diff alone. Based on the provided change, this is low risk.

@@ -1,7 +1,7 @@
 pkgbase = wechat-universal-bwrap
 	pkgdesc = WeChat (Universal) with bwrap sandbox
 	pkgver = 4.1.13.26
-	pkgrel = 1
+	pkgrel = 2
 	url = https://linux.weixin.qq.com/
 	install = wechat-universal.install
 	arch = x86_64
Risk 0/5 · Safe .SRCINFO
Result #6702

Comment

The change only adds a new desktop entry source and updates the corresponding checksum in .SRCINFO, plus a pkgrel bump. The new file is a benign alias desktop launcher pointing to the existing start.sh and marked NoDisplay=true, with no network access, privilege escalation, persistence, or packaging-path changes. No suspicious sources or build-time execution were introduced by this diff.

@@ -42,11 +42,13 @@ pkgbase = wechat-universal-bwrap
 	options = emptydirs
 	source = wechat-universal.sh
 	source = wechat-universal.desktop
+	source = wechat-universal-alias-icon.desktop
 	source = libuosdevicea.c
 	source = libuosdevicea.Makefile
 	source = wechat-license
-	sha256sums = 7f9dc40071b1a85c54cb199f87f5a0ce2106a4d1b742735539e3bdae5248da4d
+	sha256sums = 4c0b62a2d5bcaab2ff23b759801a4c22c4396fdbc95a29e6496987a4eae4860e
 	sha256sums = 0563472cf2c74710d1fe999d397155f560d3ed817e04fd9c35077ccb648e1880
+	sha256sums = 93f5363c956b7d13e0408e14fe97abe936916da8d4adf414e74ad334e308f37c
 	sha256sums = fc3ce9eb8dee3ee149233ebdb844d3733b2b2a8664422d068cf39b7fb08138f8
 	sha256sums = f05f6f907898740dab9833c1762e56dbc521db3c612dd86d2e2cd4b81eb257bf
 	sha256sums = 898ebc397583d111db9a337e9d09aaee2f795fcd720e65cab5ce0e92efcd8f10
Risk 0/5 · Safe PKGBUILD
Result #6703

Comment

The change only bumps pkgrel from 1 to 2 in PKGBUILD. No source URLs, build steps, install scripts, dependencies, or packaging behavior changed, so there is no new security-relevant behavior to assess in this diff.

@@ -5,7 +5,7 @@
 _pkgname=wechat-universal
 pkgname=${_pkgname}-bwrap
 pkgver=4.1.13.26
-pkgrel=1
+pkgrel=2
 pkgdesc="WeChat (Universal) with bwrap sandbox"
 arch=('x86_64' 'aarch64' 'loong64')
 url='https://linux.weixin.qq.com/'
Risk 0/5 · Safe PKGBUILD
Result #6704

Comment

The change adds a new desktop entry source and conditionally installs it as /usr/share/applications/wechat.desktop when WECHAT_ALIAS_ICON=yes. The file content is a simple alias desktop entry pointing to the existing wrapper script and icon, with NoDisplay=true and X-KDE-AliasFor=wechat-universal. I do not see any network access, privilege escalation, persistence mechanism, or other malicious behavior introduced by this diff. The only notable effect is an optional desktop-file alias that could shadow the upstream WeChat desktop entry, but it is gated behind an environment variable and appears intended for Plasma icon resolution rather than abuse.

@@ -52,6 +52,7 @@ _lib_uos='libuosdevicea'
 source=(
     "${_pkgname}.sh"
     "${_pkgname}.desktop"
+    "${_pkgname}-alias-icon.desktop"
     "${_lib_uos}".{c,Makefile}
     'wechat-license'
 )
Risk 0/5 · Safe PKGBUILD
Result #6705

Comment

The change only updates sha256 checksums for existing source artifacts in PKGBUILD. I did not see any new sources, build steps, network fetches, privilege changes, or packaging logic changes in the provided hunk. This is a low-risk integrity metadata update, likely reflecting upstream artifact refreshes or repackaging. No obvious security issue is introduced by the diff itself.

@@ -67,8 +68,9 @@ source_loong64=("${_deb_prefix}loong64.deb::${_deb_url_common}LoongArch.deb")
 noextract=("${_deb_prefix}"{x86_64,aarch64,loong64}.deb )
 
 sha256sums=(
-    '7f9dc40071b1a85c54cb199f87f5a0ce2106a4d1b742735539e3bdae5248da4d'
+    '4c0b62a2d5bcaab2ff23b759801a4c22c4396fdbc95a29e6496987a4eae4860e'
     '0563472cf2c74710d1fe999d397155f560d3ed817e04fd9c35077ccb648e1880'
+    '93f5363c956b7d13e0408e14fe97abe936916da8d4adf414e74ad334e308f37c'
     'fc3ce9eb8dee3ee149233ebdb844d3733b2b2a8664422d068cf39b7fb08138f8'
     'f05f6f907898740dab9833c1762e56dbc521db3c612dd86d2e2cd4b81eb257bf'
     '898ebc397583d111db9a337e9d09aaee2f795fcd720e65cab5ce0e92efcd8f10'
Risk 0/5 · Safe PKGBUILD
Result #6706

Comment

The change is low risk. It only adds an optional desktop-entry alias file and conditionally installs it when WECHAT_ALIAS_ICON=yes. The new file is a static .desktop launcher pointing to the existing wrapper script, with NoDisplay=true and X-KDE-AliasFor metadata; it does not add network access, privilege escalation, persistence, or writes outside pkgdir. The only notable concern is that it creates an additional file named /usr/share/applications/wechat.desktop, which could conflict with a separately installed non-wrap WeChat package, but the PKGBUILD explicitly avoids installing it by default and documents the conflict in comments. No security issue is evident in the diff itself.

@@ -153,7 +155,11 @@ package() {
 
     echo 'Installing desktop files...'
     install -Dm644 "${_pkgname}.desktop" "${pkgdir}/usr/share/applications/${_pkgname}.desktop"
-
+    if [[ "${WECHAT_ALIAS_ICON}" == 'yes' ]]; then
+        # Plasma resolves WeChat's hardcoded desktop-entry=wechat to get the app icon.
+        # This however conflicts with non-wrap version, so don't install the icon by default
+        install -Dm644 "${_pkgname}-alias-icon.desktop" "${pkgdir}/usr/share/applications/${_upstream_name}.desktop"
+    fi
     echo 'Installing license...'
     install -Dm644 {,"${pkgdir}/usr/share/licenses/${_pkgname}/"}wechat-license
 }
Risk 0/5 · Safe wechat-universal-alias-icon.desktop
Result #6707

Comment

The new desktop entry is a simple alias for an existing application launcher. It does not introduce network access, privilege escalation, persistence, or any build-time execution. The Exec line points to an existing script under /usr/lib and only adds a desktop alias with NoDisplay=true and X-KDE-AliasFor metadata. No suspicious sources or packaging behaviors are present in this change alone.

@@ -0,0 +1,7 @@
+[Desktop Entry]
+Type=Application
+Name=WeChat
+Exec=/usr/lib/wechat-universal/start.sh %u
+Icon=wechat-universal
+NoDisplay=true
+X-KDE-AliasFor=wechat-universal
Risk 0/5 · Safe wechat-universal.sh
Result #6708

Comment

The change is a small runtime heuristic that selects Qt's Wayland backend when a Wayland socket is present, otherwise falling back to xcb. It does not introduce network access, privilege escalation, persistence, or any new file/system modifications. The logic only inspects environment variables and a socket path under XDG_RUNTIME_DIR, and it preserves the existing ability to override QT_QPA_PLATFORM explicitly. No security-relevant red flags are present in this hunk.

@@ -90,8 +90,21 @@ try_start() {
         echo "Info: Generated XAUTHORITY at '${XAUTHORITY}'"
     fi
 
-    # wechat-universal only supports xcb
-    export QT_QPA_PLATFORM=xcb \
+    local WAYLAND_SOCKET=''
+    if [[ -n "${WAYLAND_DISPLAY}" ]]; then
+        WAYLAND_SOCKET="${WAYLAND_DISPLAY}"
+        [[ "${WAYLAND_SOCKET}" == /* ]] || WAYLAND_SOCKET="${XDG_RUNTIME_DIR}/${WAYLAND_SOCKET}"
+    fi
+
+    # WeChat uses native desktop notifications on Wayland.
+    if [[ -z "${QT_QPA_PLATFORM}" ]]; then
+        if [[ -S "${WAYLAND_SOCKET}" ]]; then
+            QT_QPA_PLATFORM=wayland
+        else
+            QT_QPA_PLATFORM=xcb
+        fi
+    fi
+    export QT_QPA_PLATFORM \
         QT_AUTO_SCREEN_SCALE_FACTOR=1 \
         PATH="/sandbox:${PATH}"
 
Risk 0/5 · Safe wechat-universal.sh
Result #6709

Comment

The change only adds extra bubblewrap read-only binds when a Wayland socket is present: the socket itself plus Fcitx5 configuration/theme files. This does not introduce network access, privilege escalation, persistence, or writes outside the sandbox. The paths are user-local config/data locations and are only mounted read-only into the container to improve IME behavior. No suspicious execution or integrity issues are evident in this hunk.

@@ -223,6 +236,15 @@ try_start() {
         --ro-bind "${XDG_RUNTIME_DIR}/pulse"{,}
     )
 
+    if [[ -S "${WAYLAND_SOCKET}" ]]; then
+        BWRAP_ARGS+=(
+            --ro-bind-try "${WAYLAND_SOCKET}"{,}
+            # Fcitx Qt draws its Wayland candidate window in the client process.
+            --ro-bind-try "${XDG_CONFIG_HOME:-${HOME}/.config}/fcitx5/conf/classicui.conf"{,}
+            --ro-bind-try "${XDG_DATA_HOME:-${HOME}/.local/share}/fcitx5/themes"{,}
+        )
+    fi
+
     case "${WECHAT_MULTIPLE_INSTANCE}" in
     '')
         # Single