AUR AI Reviewer

Review Results

Version #2763 of wechat-universal-bwrap · commit 0880227f8332 · status Reviewed

Risk 0/5 · Safe .SRCINFO
Result #4794

Comment

The only change in this .SRCINFO diff is a pkgrel bump from 1 to 2. No sources, checksums, dependencies, install scripts, or build logic changed, so there is no new security-relevant behavior to assess from this diff alone. This appears to be a packaging revision only.

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

Comment

The change only adds three optdepends entries to .SRCINFO, which is metadata used by pacman/AUR helpers and does not affect build or runtime behavior by itself. The new optional dependencies are ordinary packages from the Arch repositories (binutils, pdfjs, python) and are described as supporting auxiliary features; there is no evidence of malicious source URLs, build-time downloads, privilege escalation, persistence, or packaging integrity issues in this diff hunk. Risk is therefore minimal.

@@ -27,6 +27,9 @@ pkgbase = wechat-universal-bwrap
 	depends = xcb-util-wm
 	depends = xdg-desktop-portal
 	depends = xdg-user-dirs
+	optdepends = binutils: pdfjsfix applet
+	optdepends = pdfjs: pdfjsfix CMap resources
+	optdepends = python: pdfjsfix MMKV configuration
 	provides = wechat-universal
 	conflicts = wechat-universal
 	replaces = wechat-beta
Risk 0/5 · Safe .SRCINFO
Result #4796

Comment

The change is low risk. It only updates .SRCINFO metadata: bumps pkgrel, adds three optdepends, and refreshes one source checksum. There are no new sources, no build-script changes, no install-script or unit-file changes, and no evidence of network or privilege-related behavior introduced by this diff. The checksum update is consistent with a source file change and does not by itself indicate tampering. Overall this looks like routine packaging metadata maintenance.

@@ -42,7 +45,7 @@ pkgbase = wechat-universal-bwrap
 	source = libuosdevicea.c
 	source = libuosdevicea.Makefile
 	source = wechat-license
-	sha256sums = a71158393c04658e89d3cdc12186bcdde70dc96321db2c8e86648a1487fbbe1c
+	sha256sums = 7f9dc40071b1a85c54cb199f87f5a0ce2106a4d1b742735539e3bdae5248da4d
 	sha256sums = 0563472cf2c74710d1fe999d397155f560d3ed817e04fd9c35077ccb648e1880
 	sha256sums = fc3ce9eb8dee3ee149233ebdb844d3733b2b2a8664422d068cf39b7fb08138f8
 	sha256sums = f05f6f907898740dab9833c1762e56dbc521db3c612dd86d2e2cd4b81eb257bf
Risk 0/5 · Safe PKGBUILD
Result #4797

Comment

The change only bumps pkgrel from 1 to 2 in PKGBUILD. No source URLs, checksums, build steps, install scripts, permissions, or package metadata beyond the release number were modified. This is a packaging-only revision with no security-relevant behavior change visible in the provided diff.

@@ -5,7 +5,7 @@
 _pkgname=wechat-universal
 pkgname=${_pkgname}-bwrap
 pkgver=4.1.13.23
-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 #4798

Comment

The change is low risk. It only adds three optdepends for optional helper functionality (binutils, pdfjs, python) and creates an additional symlink to the existing common.sh script as pdfjsfix.sh. There are no new network fetches, privilege changes, install-time hooks, or suspicious build steps. The updated checksum is consistent with the source change, and the new symlink does not introduce executable code by itself. I did not find evidence of persistence, privilege escalation, or supply-chain tampering in this diff.

@@ -37,6 +37,11 @@ depends=(
 makedepends=(
     'patchelf'
 )
+optdepends=(
+    'binutils: pdfjsfix applet'
+    'pdfjs: pdfjsfix CMap resources'
+    'python: pdfjsfix MMKV configuration'
+)
 if [[ "${CARCH}" == loong64 ]]; then # This is needed instead of a plain declaration because AUR web would return all depends regardless of client's arch, AUR helpers would thus refuse to build the package on non-loong64 due to missing liblol
     depends_loong64=('liblol')
 fi
Risk 1/5 · Low PKGBUILD
Result #4799

Comment

The change is low risk. It updates the checksum for the upstream Debian payload, adds a new optional dependency list for helper functionality, and creates an additional symlink to the existing common.sh script as pdfjsfix.sh. I did not find any new network fetches, privilege escalation, persistence mechanisms, or writes outside pkgdir. The only security-relevant change is the checksum replacement, which is expected when upstream artifacts change; however, because the package installs a prebuilt upstream .deb, the trust boundary remains the upstream binary itself. No evidence in this diff suggests the new checksum corresponds to a malicious payload, so this is a minor integrity update rather than a security issue.

@@ -62,7 +67,7 @@ source_loong64=("${_deb_prefix}loong64.deb::${_deb_url_common}LoongArch.deb")
 noextract=("${_deb_prefix}"{x86_64,aarch64,loong64}.deb )
 
 sha256sums=(
-    'a71158393c04658e89d3cdc12186bcdde70dc96321db2c8e86648a1487fbbe1c'
+    '7f9dc40071b1a85c54cb199f87f5a0ce2106a4d1b742735539e3bdae5248da4d'
     '0563472cf2c74710d1fe999d397155f560d3ed817e04fd9c35077ccb648e1880'
     'fc3ce9eb8dee3ee149233ebdb844d3733b2b2a8664422d068cf39b7fb08138f8'
     'f05f6f907898740dab9833c1762e56dbc521db3c612dd86d2e2cd4b81eb257bf'
Risk 0/5 · Safe PKGBUILD
Result #4800

Comment

The change is low risk. It only adds a new symlinked helper script (`pdfjsfix.sh`) pointing to the already-installed `common.sh`, and updates `optdepends` to document optional runtime helpers (`binutils`, `pdfjs`, `python`). There are no new network fetches, privilege changes, persistence mechanisms, or writes outside `$pkgdir`. The source integrity and build logic are unchanged aside from the checksum refresh already accounted for in the PKGBUILD. I do not see a security issue in this diff hunk.

@@ -142,6 +147,7 @@ package() {
     install -Dm755 wechat-universal.sh "${_wechat_root}"/common.sh
     ln -s common.sh "${_wechat_root}"/start.sh
     ln -s common.sh "${_wechat_root}"/stop.sh
+    ln -s common.sh "${_wechat_root}"/pdfjsfix.sh
     mkdir -p "${pkgdir}"/usr/bin
     ln -s ../lib/"${_pkgname}"/common.sh "${pkgdir}"/usr/bin/"${_pkgname}"
 
Risk 1/5 · Low wechat-universal.sh
Result #4801

Comment

The new helper is a local maintenance/repair function, not an automatic install-time action, and it does not introduce persistence, privilege escalation, or network activity. It refuses to run while WeChat is active, checks for required local files/tools, and only edits a local MMKV config plus creates a temporary repacked resource archive in /tmp for the user to manually review and copy. The main security concern is that it invokes `python -c` with a locally installed `mmkv` binding and operates on a hardcoded `/opt/wechat-universal/...` binary/resource path, but this is still user-initiated and confined to local files. No high-confidence malicious behavior is evident in this diff.

@@ -346,6 +346,54 @@ applet_start() {
     fi
 }
 
+applet_pdfjsfix() {
+    if pgrep --quiet '^(wechat|WeChatAppEx)$'; then
+        echo 'Warning: Refusing to run pdfjsfix while WeChat is running' >&2
+        return 1
+    fi
+    local data_dir="${WECHAT_DATA_DIR}" documents_dir config_dir key output command
+    local resource='/opt/wechat-universal/XFile/xfile_web_resource'
+    if [[ -z "${data_dir}" ]]; then
+        documents_dir="${XDG_DOCUMENTS_DIR:-$(xdg-user-dir DOCUMENTS)}"
+        [[ -n "${documents_dir}" ]] || return 1
+        data_dir="${documents_dir}/WeChat_Data"
+    fi
+    config_dir="${data_dir}/home/.xwechat/radium/mmkv/xweb_global_storage"
+    if [[ ! -f "${config_dir}/xweb_global_storage" || ! -f "${config_dir}/xweb_global_storage.crc" ]]; then
+        echo "Warning: XWeb configuration not found in '${config_dir}'" >&2
+        return 1
+    fi
+    for command in strings sed python bsdtar; do
+        if ! command -v "${command}" >/dev/null; then
+            echo "Warning: pdfjsfix requires '${command}'" >&2
+            return 1
+        fi
+    done
+    if [[ ! -f /usr/share/pdf.js/web/cmaps/UniGB-UCS2-H.bcmap ]]; then
+        echo 'Warning: Install pdfjs to provide /usr/share/pdf.js/web/cmaps/' >&2
+        return 1
+    fi
+    key=$(strings /opt/wechat-universal/RadiumWMPF/runtime/WeChatAppEx | sed -n '/^[-A-Za-z0-9]\{43\}=$/{p;q}')
+    if [[ -z "${key}" ]]; then
+        echo 'Warning: Could not extract the XWeb configuration key' >&2
+        return 1
+    fi
+    if ! python -c 'import sys, mmkv; mmkv.MMKV.initializeMMKV(sys.argv[1]); kv = mmkv.MMKV("xweb_global_storage", mmkv.MMKVMode.MultiProcess, sys.argv[2]); sys.exit(1) if not kv.set(True, "disable_web_res_sig_verify") else None; kv.sync(); mmkv.MMKV.onExit()' "${config_dir}" "${key:0:16}"; then
+        echo 'Warning: Could not update XWeb configuration. Download and build Tencent MMKV and its Python binding, then retry.' >&2
+        return 1
+    fi
+    output=$(mktemp /tmp/wechat-pdfjsfix.XXXXXX) || return 1
+    if ! bsdtar --create --format zip --file "${output}" \
+        --exclude 'XViewer/lib/web/cmaps' \
+        -s '|^cmaps|XViewer/lib/web/cmaps|' \
+        "@${resource}" -C /usr/share/pdf.js/web cmaps; then
+        echo 'Warning: Could not repack XFile web resources' >&2
+        return 1
+    fi
+    chmod 644 "${output}" || return 1
+    printf 'Please review %s and replace %s with it before opening WeChat\n' "${output}" "${resource}"
+}
+
 applet_stop() {
     notifier_item=$(notifier_get)
     [[ -z "${notifier_item}" ]] && return
Risk 1/5 · Low wechat-universal.sh
Result #4802

Comment

The change adds a new `pdfjsfix` applet that only runs when WeChat is not active, checks for required local tools, and operates on files under the user's WeChat data directory plus `/opt/wechat-universal/...` and `/usr/share/pdf.js/...`. I do not see any network access, privilege escalation, persistence, or writes outside the intended local data/resource paths. The most sensitive action is modifying the user's XWeb config to disable signature verification and repacking a local resource archive, but this is an explicit user-invoked maintenance helper rather than an automatic post-install action, and it does not introduce a new supply-chain or backdoor risk in the package itself. Overall this looks low risk.

@@ -413,8 +461,11 @@ case "${applet}" in
     'dde-file-manager')
         applet_dde "$@"
         ;;
+    'pdfjsfix.sh'|'pdfjsfix')
+        applet_pdfjsfix "$@"
+        ;;
     *)
-        echo "Unknown applet '${applet}', allowed: start.sh (alias start, wechat-universal, wechat-universal.sh), stop.sh (alias stop)"
+        echo "Unknown applet '${applet}', allowed: start.sh (alias start, wechat-universal, wechat-universal.sh), stop.sh (alias stop), pdfjsfix.sh (alias pdfjsfix)"
         false
         ;;
 esac