baidu-translate-client-bin
The package downloads a prebuilt Windows .exe from Baidu's official CDN, which is unpacked and repackaged to integrate with the system Electron; while the host is not a standard code forge, it is Baidu's own domain, and the build process is transparent and does not execute untrusted remote code.
Triggered rules
llm_review
The static rules flagged this MEDIUM, but an AI model (qwen/qwen3-235b-a22b-07-25) reviewed the full PKGBUILD and judged it LOW (confidence 95%): The package downloads a prebuilt Windows .exe from Baidu's official CDN, which is unpacked and repackaged to integrate with the system Electron; while the host is not a standard code forge, it is Baidu's own domain, and the build process is transparent and does not execute untrusted remote code.
1 higher static finding superseded - not the current verdict (shown for transparency)
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:30
"${pkgname%-bin}-${pkgver}.exe::https://fanyiapp.cdn.bcebos.com/fanyi-client/pkg/win/${pkgver}/${_zhsname}_Setup_${pkgver}.exe" -
PKGBUILD:32
"LICENSE-${pkgver}.html::https://fanyi.baidu.com/static/webpage/agreement.html"
PKGBUILD
2 offending line(s) highlighted# Maintainer: zxp19821005 <zxp19821005 at 163 dot com>
# Contributor: sukanka <su975853527 at gmail dot com>
pkgname=baidu-translate-client-bin
_pkgname=BdTranslateClient
_zhsname='百度翻译'
pkgver=2.4.1
_electronversion=11
pkgrel=1
pkgdesc="Baidu translate.(Prebuilt version.Use system-wide electron)${_zhsname}"
arch=(
'i686'
'x86_64'
)
url="https://fanyi.baidu.com/"
license=('LicenseRef-custom')
provides=(
"${pkgname%-bin}=${pkgver}"
"${pkgname%-client-bin}=${pkgver}"
)
conflicts=("${pkgname%-bin}")
depends=(
"electron${_electronversion}"
'libxkbcommon-x11'
)
makedepends=(
'7zip'
'icoutils'
)
source=(
"${pkgname%-bin}-${pkgver}.exe::https://fanyiapp.cdn.bcebos.com/fanyi-client/pkg/win/${pkgver}/${_zhsname}_Setup_${pkgver}.exe"
"${pkgname%-bin}.desktop"
"LICENSE-${pkgver}.html::https://fanyi.baidu.com/static/webpage/agreement.html"
"${pkgname%-bin}.sh"
)
sha256sums=('0b8bc402f46eed836022fd238f5e54578240796a6aac35cab1ce36027cd50f25'
'344f302a9ec12eb2eac18f39c0368291eb7d815aaa3a34c65474b76d01cf3962'
'1bac6150492bcebb1b2f74fc4a6712a8cd9317abf3107e6fa8ca357e5023bbf7'
'a774c2f54fbbeeaac3cefc0f7250796d30c86d27f0fd40b7eaf9c0fdb021623d')
_check_electron_version() {
echo "Verifying Electron version..."
local _app_dir=$(find "${srcdir}" -type f -name "resources.pak" -exec dirname {} + | head -n 1)
local _main_exe="${_zhsname}.exe"
if [[ -n "${_main_exe}" ]]; then
local _elec_ver=$(strings "${_main_exe}" | grep '^Chrome/[0-9.]* Electron/[0-9]' | cut -d'/' -f3 | cut -d'.' -f1 | head -n 1)
if [[ -n "${_elec_ver}" ]]; then
if [[ "${_elec_ver}" != "${_electronversion}" ]]; then
echo -e "\033[1;31mWarning: Electron version mismatch! Detected: ${_elec_ver}, Expected: ${_electronversion}\033[0m"
else
echo -e "Electron version verified: \033[1;31m${_elec_ver}\033[0m"
fi
fi
else
echo -e "\033[1;33mNote: Could not find Electron binary for version verification.\033[0m"
fi
}
prepare(){
sed -i -e "
s/@electronversion@/${_electronversion}/g
s/@appname@/${pkgname%-bin}/g
s/@runname@/app.asar/g
s/@cfgdirname@/${_pkgname}/g
" "${srcdir}/${pkgname%-bin}.sh"
7z e "${srcdir}/${pkgname%-bin}-${pkgver}.exe" -aoa
_check_electron_version
wrestool -x --output="${srcdir}" -t14 "${srcdir}/${pkgname%-bin}-${pkgver}.exe"
icotool -i 5 -x "${srcdir}/"*.ico -o "${srcdir}/${pkgname%-bin}.png"
case "${CARCH}" in
i686)
bsdtar -xf "${srcdir}/app-32.7z"
;;
x86_64)
bsdtar -xf "${srcdir}/app-64.7z"
;;
esac
find "${srcdir}/resources/app.asar.unpacked" \( -name "*win32*" -o -name "*darwin*" -o -name "*arm*" \) -exec rm -rf {} +
find "${srcdir}/resources" -name "*.exe" -exec rm -rf {} +
}
package(){
install -Dm755 "${srcdir}/${pkgname%-bin}.sh" "${pkgdir}/usr/bin/${pkgname%-bin}"
install -Dm755 -d "${pkgdir}/usr/lib/${pkgname%-bin}"
local _app_dir=$(find "${srcdir}" -type f -name "resources.pak" -exec dirname {} + | head -n 1)
cp -a "${_app_dir}/resources/". "${pkgdir}/usr/lib/${pkgname%-bin}/"
install -Dm644 "${srcdir}/LICENSE-${pkgver}.html" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE.html"
install -Dm644 "${srcdir}/${pkgname%-bin}.png" -t "${pkgdir}/usr/share/pixmaps"
install -Dm644 "${srcdir}/${pkgname%-bin}.desktop" -t "${pkgdir}/usr/share/applications"
}
Scan history
| Scanned at (UTC) | Severity | Rules |
|---|---|---|
| 2026-09-17 00:27:14 | Low | 2 |
| 2026-09-16 00:03:17 | Low | 2 |
| 2026-09-15 00:25:31 | Low | 2 |
| 2026-09-14 00:27:57 | Low | 2 |
| 2026-09-13 00:19:54 | Low | 2 |
| 2026-09-12 00:25:17 | Low | 2 |
| 2026-09-11 00:19:22 | Low | 2 |
| 2026-09-10 00:22:44 | Low | 2 |
| 2026-09-09 00:04:09 | Low | 2 |
| 2026-09-08 00:18:08 | Low | 2 |
| 2026-09-07 00:30:15 | Low | 2 |
| 2026-09-06 00:17:06 | Low | 2 |
| 2026-09-05 00:16:27 | Low | 2 |
| 2026-09-04 00:03:13 | Low | 2 |
| 2026-09-03 00:15:47 | Low | 2 |
| 2026-09-02 00:02:31 | Low | 2 |
| 2026-09-01 00:11:19 | Low | 2 |
| 2026-08-31 00:19:57 | Low | 2 |
| 2026-08-30 00:04:14 | Low | 2 |
| 2026-08-29 00:29:17 | Low | 2 |