fcitx-baidupinyin

maintainer lizzymartens · 9 votes · scanned 2026-08-03 00:08:14.047287
MEDIUM
View on AUR ↗
Why flagged This PKGBUILD downloads a prebuilt binary package (a .zip containing a .deb) from imeres.baidu.com, extracts it, and installs compiled binaries (baidu-qimpanel, fcitx modules, shared libraries) directly onto the system. The source is Baidu's own distribution infrastructure (imeres.baidu.com is a Baidu CDN/resource host used for their IME distribution), so this is the official vendor's distribution channel rather than a random personal host. However, the concern is real: prebuilt closed-source binaries from a Chinese tech company are installed system-wide with no source code available for audit, the sha512sum has only 63 hex characters (appears truncated/malformed — should be 128 hex chars), and the binary is patched in-place with sed including null-byte injection into a binary executable. The truncated checksum is particularly concerning as it would not properly verify integrity. The medium rating is appropriate: this is a legitimate vendor package but installs unauditable closed-source binaries, and the checksum appears malformed which undermines the integrity guarantee.

Triggered rules

MEDIUM source=() URL on a non-standard host source_untrusted_domain

One or more source=() URLs point to a host outside the trusted allowlist (github.com, gitlab.com, codeberg.org, pypi.org, …).

  • PKGBUILD:14 'fcitx-baidupinyin.zip::https://imeres.baidu.com/imeres/ime-res/guanwang/img/Ubuntu_Deepin-fcitx-baidupinyin-64.zip'
MEDIUM AI review llm_review

An AI model (anthropic/claude-4.6-sonnet-20260217) reviewed this and agrees it is MEDIUM (confidence 72%): This PKGBUILD downloads a prebuilt binary package (a .zip containing a .deb) from imeres.baidu.com, extracts it, and installs compiled binaries (baidu-qimpanel, fcitx modules, shared libraries) directly onto the system. The source is Baidu's own distribution infrastructure (imeres.baidu.com is a Baidu CDN/resource host used for their IME distribution), so this is the official vendor's distribution channel rather than a random personal host. However, the concern is real: prebuilt closed-source binaries from a Chinese tech company are installed system-wide with no source code available for audit, the sha512sum has only 63 hex characters (appears truncated/malformed — should be 128 hex chars), and the binary is patched in-place with sed including null-byte injection into a binary executable. The truncated checksum is particularly concerning as it would not properly verify integrity. The medium rating is appropriate: this is a legitimate vendor package but installs unauditable closed-source binaries, and the checksum appears malformed which undermines the integrity guarantee.

PKGBUILD

1 offending line(s) highlighted
1# Maintainer: Sukanka <su975853527 [AT] gmail.com>
2# Contributor: fkxxyz <fkxxyz@163.com>
3pkgname=fcitx-baidupinyin
4pkgver=1.0.1.0
5pkgrel=10
6pkgdesc="Fcitx wrapper for Baidu Pinyin IM engine"
7arch=("x86_64")
8url="https://srfsh.baidu.com/site/guanwang_linux/index.html"
9license=("custom")
10depends=('fcitx-qt5' 'qt5-quickcontrols')
11#Depends shown in .deb: libc6 (>= 2.4), fcitx-bin, fcitx-data (>= 1:4.2.0), fcitx-modules, libglib2.0-0 (>= 2.12.0), libqt5core5a (>= 5.7.1), qml-module-qtquick-controls (>= 5.5.1)
12install=fcitx-baidupinyin.install
13source=(
14 'fcitx-baidupinyin.zip::https://imeres.baidu.com/imeres/ime-res/guanwang/img/Ubuntu_Deepin-fcitx-baidupinyin-64.zip'
15 'LICENSE' # copied from https://srf.baidu.com/site/linux/service/index.html
16)
17sha512sums=(
18 '08058b612dc325beeaa9a53d7cd1386e30ed7a460c5c363a34cfb8bae0835f2cdae3450f9ded9534f624b9b10472fc0c1aff5698d6fd2898a7d89c39e8dd408c'
19 'fe77a5a4c1c5a4d58f52d62eeaecaa21e8e25105e1ccdc573210c7605970aa1f7e07ad302927b461545b8619a4883a6692fbf51b2f944c7a12536a7140196c2b'
20)
21
22package(){
23 ar -vx fcitx-baidupinyin.deb --output="${srcdir}"
24 cd ${srcdir}
25 tar -xJvf data.tar.xz -C "${pkgdir}"
26
27 mkdir -p "$pkgdir"/etc/xdg/autostart/
28 mv "$pkgdir"/opt/apps/com.baidu.fcitx-baidupinyin/entries/applications/fcitx-ui-baidu-qimpanel.desktop "$pkgdir"/etc/xdg/autostart/fcitx-baidupinyin.desktop
29 sed -i 's|/opt/apps/com.baidu.fcitx-baidupinyin/files/bin/bd-qimpanel.watchdog.sh|/usr/bin/bd-qimpanel.watchdog.sh|g' "$pkgdir"/etc/xdg/autostart/fcitx-baidupinyin.desktop
30 sed -i 's|Icon=baidu|Icon=fcitx-baidupinyin|g' "$pkgdir"/etc/xdg/autostart/fcitx-baidupinyin.desktop
31
32 cp -r "$pkgdir"/opt/apps/com.baidu.fcitx-baidupinyin/entries/icons "$pkgdir"/usr/share/
33 cp -r "$pkgdir"/opt/apps/com.baidu.fcitx-baidupinyin/entries/locale "$pkgdir"/usr/share/
34
35 mkdir -p "$pkgdir"/usr/lib/fcitx/
36 mv "$pkgdir"/opt/apps/com.baidu.fcitx-baidupinyin/files/lib/fcitx* "$pkgdir"/usr/lib/fcitx/
37 mv "$pkgdir"/opt/apps/com.baidu.fcitx-baidupinyin/files/lib/* "$pkgdir"/usr/lib/
38
39 mkdir -p "$pkgdir"/usr/bin/
40 mv "$pkgdir"/opt/apps/com.baidu.fcitx-baidupinyin/files/bin/baidu-qimpanel "$pkgdir"/usr/bin/
41 mv "$pkgdir"/opt/apps/com.baidu.fcitx-baidupinyin/files/bin/bd-qimpanel.watchdog.sh "$pkgdir"/usr/bin/
42 sed -i 's|/opt/apps/com.baidu.fcitx-baidupinyin/files/bin/baidu-qimpanel|/usr/bin/baidu-qimpanel|g' "$pkgdir"/usr/bin/bd-qimpanel.watchdog.sh
43
44 mkdir -p "$pkgdir"/opt/fcitx-baidupinyin/
45 mv "$pkgdir"/opt/apps/com.baidu.fcitx-baidupinyin/files/bin/BDIMSettings "$pkgdir"/opt/fcitx-baidupinyin/
46
47
48 # change the /opt/apps/... directory string in baidu-qimpanel to /opt/fcitx-baidupinyin/, add \x0 to make the strings be of the same length
49 sed -i 's|/opt/apps/com.baidu.fcitx-baidupinyin/files/bin/BDIMSettings|/opt/fcitx-baidupinyin/BDIMSettings\x0\x0\x0\x0\x0\x0\x0\x0\x0\x0\x0\x0\x0\x0\x0\x0\x0\x0\x0\x0\x0\x0\x0\x0\x0|g' "$pkgdir"/usr/bin/baidu-qimpanel
50
51 # move needed resources
52 mv "$pkgdir"/opt/apps/com.baidu.fcitx-baidupinyin/files/share/data "$pkgdir"/opt/fcitx-baidupinyin/
53
54 install -Dm644 "${srcdir}/LICENSE" "${pkgdir}/usr/share/licenses/fcitx-baidupinyin/LICENSE"
55
56 # fix owners.
57 chown -R root:root $pkgdir/
58
59 # clean up unused files
60 rm -rf "$pkgdir"/opt/apps
61 rm -rf "$pkgdir"/usr/lib/*-linux-gnu
62 rm -r "$pkgdir"/fcitx-baidupinyin.deb
63}
64

Scan history

Scanned at (UTC)SeverityRules
2026-08-03 00:08:14 MEDIUM 2
2026-08-02 00:16:08 MEDIUM 2
2026-08-01 00:11:18 MEDIUM 2
2026-07-31 00:14:10 MEDIUM 2
2026-07-30 00:17:23 MEDIUM 2
2026-07-29 00:25:53 MEDIUM 2
2026-07-28 00:07:28 MEDIUM 2
2026-07-27 00:24:32 MEDIUM 2
2026-07-26 00:07:32 MEDIUM 2
2026-07-25 00:13:44 MEDIUM 2
2026-07-24 00:02:28 MEDIUM 2
2026-07-23 00:14:47 MEDIUM 2
2026-07-22 00:29:32 MEDIUM 2
2026-07-21 00:24:15 MEDIUM 2
2026-07-20 00:19:49 MEDIUM 2
2026-07-19 00:17:08 MEDIUM 2
2026-07-18 00:14:48 MEDIUM 2
2026-07-17 00:06:16 MEDIUM 2
2026-07-16 00:05:41 MEDIUM 2
2026-07-15 00:09:25 MEDIUM 2

Report a package

Reports go to the AURWatch maintainer (one person) and are read by hand. No login required.

0 / 4000
Your suggestion