fcitx-sogoupinyin

maintainer qft · 112 votes · scanned 2026-08-03 00:08:14.047287
MEDIUM
View on AUR ↗
Why flagged The PKGBUILD dynamically resolves the download URL at build time by scraping the Sogou website and extracting a URL matching a pattern, then downloads a prebuilt binary .deb from whatever URL that page returns. While a sha256sum check is performed afterward, the URL is not fixed in source=() and is resolved at runtime from a third-party page — meaning if the Sogou website is compromised or the URL pattern matches a different host, a malicious binary could be fetched and installed. The binary is a prebuilt proprietary executable (fcitx input method) that gets installed system-wide. This is a genuine supply-chain concern: the source URL is not pinned, the download happens outside of makepkg's normal source verification framework, and the binary is executed code from a vendor host whose content can change. The sha256sum mitigates but does not eliminate the risk (it only catches changes after the fact if the hardcoded hash is kept current). This pattern — dynamic URL resolution + prebuilt binary + manual checksum outside makepkg — is a real medium-severity supply-chain concern, not a false positive.

Triggered rules

MEDIUM External download from an untrusted host, not in source=() external_download_not_in_source

curl/wget fetches a URL on a non-allowlisted host that is not part of source=(), so it is not checksum-verified by makepkg.

  • PKGBUILD:25 curl -s $url | grep -o "https://[0-9a-z:\/\._-]*/$filename" | xargs curl -o $startdir/$filename
MEDIUM AI review of an ambiguous pattern llm_review

The static rules found a suspicious pattern they could not resolve, so an AI model (anthropic/claude-4.6-sonnet-20260217) reviewed it and judged it MEDIUM (confidence 72%): The PKGBUILD dynamically resolves the download URL at build time by scraping the Sogou website and extracting a URL matching a pattern, then downloads a prebuilt binary .deb from whatever URL that page returns. While a sha256sum check is performed afterward, the URL is not fixed in source=() and is resolved at runtime from a third-party page — meaning if the Sogou website is compromised or the URL pattern matches a different host, a malicious binary could be fetched and installed. The binary is a prebuilt proprietary executable (fcitx input method) that gets installed system-wide. This is a genuine supply-chain concern: the source URL is not pinned, the download happens outside of makepkg's normal source verification framework, and the binary is executed code from a vendor host whose content can change. The sha256sum mitigates but does not eliminate the risk (it only catches changes after the fact if the hardcoded hash is kept current). This pattern — dynamic URL resolution + prebuilt binary + manual checksum outside makepkg — is a real medium-severity supply-chain concern, not a false positive.

PKGBUILD

1 offending line(s) highlighted
1# Maintainer: Hao Zhang <hao [AT] hao-zhang.com>
2# Contributor: Bian Jiaping <ssbianjp [AT] gmail.com>
3# Contributor: Jove Yu <yushijun110 [AT] gmail.com>
4# Contributor: csslayer <wengxt [AT] gmail.com>
5# Contributor: Felix Yan <felixonmars [AT] gmail.com>
6
7pkgname=fcitx-sogoupinyin
8pkgver=4.2.1.145
9filename=${pkgname:6}_${pkgver}_amd64.deb
10pkgrel=1
11pkgdesc="Sogou Pinyin for Linux"
12arch=("x86_64")
13url="https://shurufa.sogou.com/linux"
14license=("custom")
15depends=("fcitx" "opencc" "libidn11" "lsb-release" "xorg-xprop" "qt5-declarative"
16 "qt5-svg" "fcitx-qt5" "libxss" "gsettings-qt")
17sha256sum="3111af17a6abddd80b856aa9c1f579a137d69f3d735ead936ddb6e5f08b59f3b"
18
19prepare(){
20 msg "Retrieving sources..."
21 if [[ -f $startdir/$filename ]]; then
22 msg2 "$(gettext "Found %s")" "$filename"
23 else
24 msg2 "$(gettext "Downloading %s...")" "$filename"
25 curl -s $url | grep -o "https://[0-9a-z:\/\._-]*/$filename" | xargs curl -o $startdir/$filename
26 fi
27 ln -s $startdir/$filename
28 msg "Validating source files with sha256sums..."
29 printf ' %s ... ' "$filename" >&2
30 if [[ $sha256sum = $(sha256sum $filename | cut -d' ' -f1) ]]; then
31 printf '%s\n' "$(gettext "Passed")" >&2
32 else
33 printf '%s\n' "$(gettext "FAILED")" >&2
34 error "$(gettext "One or more files did not pass the validity check!")"
35 exit 1
36 fi
37 msg "Extracting sources..."
38 msg2 "Extracting $filename with bsdtar"
39 bsdtar -xf $filename
40}
41
42package(){
43 cd $srcdir
44
45 tar -xJvf data.tar.xz -C "$pkgdir"
46
47 mv "$pkgdir"/usr/lib/*-linux-gnu/fcitx "$pkgdir"/usr/lib/
48 rmdir "$pkgdir"/usr/lib/*-linux-gnu
49
50 find $pkgdir/opt/sogoupinyin/files/{.license,share} -type d -exec chmod 755 {} \;
51 find $pkgdir/opt/sogoupinyin/files/{.license,share} -type f -exec chmod 644 {} \;
52
53 rm -rf $pkgdir/opt/sogoupinyin/files/lib/qt5
54 rm $pkgdir/opt/sogoupinyin/files/bin/qt.conf
55}
56

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