baidu-translate-company-bin

MEDIUM
maintainer zxp19821005 0 votes scanned 2026-10-08 00:28:03.132797
View on AUR
Why flagged

The package installs a prebuilt Electron app binary (.deb) sourced from a personal GitHub account (kota-rina3/hokeshi) unrelated to Baidu's official infrastructure, making it unverifiable and trivially swappable by the repo owner; however checksums are provided and no obfuscated payloads or exfiltration are present.

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:28 "LICENSE.html::https://edu-wenku.bdimg.com/v1/pc/protocols/help24-new.htm"
Low Few votes, recently uploaded zero_votes_recent

Uploaded within the last 14 days with 2 or fewer community votes — little peer review so far.

Medium AI review llm_review

An AI model (anthropic/claude-sonnet-4.6) reviewed this and agrees it is MEDIUM (confidence 70%): The package installs a prebuilt Electron app binary (.deb) sourced from a personal GitHub account (kota-rina3/hokeshi) unrelated to Baidu's official infrastructure, making it unverifiable and trivially swappable by the repo owner; however checksums are provided and no obfuscated payloads or exfiltration are present.

PKGBUILD

1 offending line(s) highlighted
1# Maintainer: zxp19821005 <zxp19821005 at 163 dot com>
2pkgname=baidu-translate-company-bin
3_zhsname='百度翻译企业版'
4_debname=com.baidu.translateclient.company
5pkgver=1.2.1
6_electronversion=11
7pkgrel=1
8pkgdesc="Unoffical Baidu translate Company Client.${_zhsname}"
9arch=(
10 'aarch64'
11 'x86_64'
12)
13url="https://fanyi.baidu.com/mtpe-organization"
14_ghurl="https://github.com/kota-rina3/hokeshi"
15license=('LicenseRef-custom')
16provides=("${pkgname%-bin}=${pkgver}")
17conflicts=(
18 "${pkgname%-bin}"
19)
20depends=(
21 "electron${_electronversion}-bin"
22)
23options=(
24 '!strip'
25 '!emptydirs'
26)
27source=(
28 "LICENSE.html::https://edu-wenku.bdimg.com/v1/pc/protocols/help24-new.htm"
29 "${pkgname%-bin}.sh"
30)
31source_aarch64=("${pkgname%-bin}-${pkgver}-aarch64.deb::${_ghurl}/releases/download/bdfanyi-company-${pkgver}/${_debname}_${pkgver}_arm64.deb")
32source_x86_64=("${pkgname%-bin}-${pkgver}-x86_64.deb::${_ghurl}/releases/download/bdfanyi-company-${pkgver}/${_debname}_${pkgver}_amd64.deb")
33sha256sums=('eb85aa9b3586dcd16b0f18b4b467b46b076688f9d1f723dea7f2eb92cd797ce7'
34 'fe033c7446c688abcb9a007d75f40eb9ca62756880cfde6be54fdf27a5bd94a8')
35sha256sums_aarch64=('03d5248cad4ca923dcd8bb367c9d7e584bd87598a85497de338be2669d7584d5')
36sha256sums_x86_64=('18d94cdc868777aa30a5d45d12283221c08f46dd3a30dcba97d298effd24a397')
37_get_app_dir() {
38 find "${srcdir}" -type f -name "resources.pak" -print 2>/dev/null | while read f; do [ -d "${f%/*}/resources" ] && echo "${f%/*}" && break; done
39}
40_check_electron_version() {
41 echo "Verifying Electron version..."
42 local _main_exe=$(find "$(_get_app_dir)" -maxdepth 1 -type f -executable -printf '%s %p\n' | sort -nr | head -1 | cut -d' ' -f2-)
43 [[ -z "${_main_exe}" ]] && echo -e "\033[1;33mNote: Could not find Electron binary.\033[0m" && return
44 local _elec_ver=$(strings "${_main_exe}" | grep -oP 'Electron/\K[0-9]+' | head -1)
45 [[ -z "${_elec_ver}" ]] && echo -e "\033[1;33mNote: Could not determine Electron version.\033[0m" && return
46 [[ "${_elec_ver}" != "${_electronversion}" ]] &&
47 echo -e "\033[1;31mWarning: Electron version mismatch! Detected: ${_elec_ver}, Expected: ${_electronversion}\033[0m" ||
48 echo -e "Electron version verified: \033[1;31m${_elec_ver}\033[0m"
49}
50prepare() {
51 sed -i -e "
52 s/@electronversion@/${_electronversion}/g
53 s/@appname@/${pkgname%-bin}/g
54 s/@runname@/app/g
55 " "${srcdir}/${pkgname%-bin}.sh"
56 bsdtar -xf "${srcdir}/data."*
57 _check_electron_version
58 sed -i -e "
59 s/\/opt\/apps\/${_debname}\/files\///g
60 s/Icon=${_debname}/Icon=${pkgname%-bin}/g
61 " "${srcdir}/opt/apps/${_debname}/entries/applications/${_debname}.desktop"
62 local _app_dir="$(_get_app_dir)"
63 rm -rf "${_app_dir}/resources/elevate.exe"
64}
65package() {
66 install -Dm755 "${srcdir}/${pkgname%-bin}.sh" "${pkgdir}/usr/bin/${pkgname%-bin}"
67 install -Dm755 -d "${pkgdir}/usr/lib/${pkgname%-bin}"
68 local _app_dir="$(_get_app_dir)"
69 cp -a "${_app_dir}/resources/." "${pkgdir}/usr/lib/${pkgname%-bin}/"
70 install -Dm644 "${srcdir}/opt/apps/${_debname}/entries/applications/${_debname}.desktop" "${pkgdir}/usr/share/applications/${pkgname%-bin}.desktop"
71 find "${srcdir}" -type f \( -name "*.png" -o -name "*.svg" \) -path "*entries/icons/*" | while read -r _i; do
72 _icon_path="${_i#*entries/icons/}"
73 install -Dm644 "${_i}" "${pkgdir}/usr/share/icons/${_icon_path}"
74 done
75 install -Dm644 "${srcdir}/LICENSE.html" -t "${pkgdir}/usr/share/licenses/${pkgname}"
76}
77

Scan history

Scanned at (UTC)SeverityRules
2026-10-08 00:28:03 Medium 3
2026-10-08 00:09:18 Medium 3
2026-10-08 00:07:12 Medium 3

Report a package

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

0 / 4000
Your suggestion