baiduwenku-bin
The package downloads a prebuilt .deb from a GitHub release hosted on a personal repository (kota-rina3/hokeshi), which is not the official project source; this creates a supply-chain risk if the binary was tampered with, as the source is unverifiable and the checksum, while present, relies on trust in the maintainer's release integrity.
Triggered rules
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
"LICENSE.html::https://edu-wenku.bdimg.com/v1/pc/protocols/help24-new.htm"
llm_review
An AI model (qwen/qwen3-235b-a22b-2507) reviewed this and agrees it is MEDIUM (confidence 85%): The package downloads a prebuilt .deb from a GitHub release hosted on a personal repository (kota-rina3/hokeshi), which is not the official project source; this creates a supply-chain risk if the binary was tampered with, as the source is unverifiable and the checksum, while present, relies on trust in the maintainer's release integrity.
PKGBUILD
1 offending line(s) highlighted# Maintainer: zxp19821005 <zxp19821005 at 163 dot com>
_pkgname=wenku
pkgname="baidu${_pkgname}-bin"
_zhsname='百度文库'
_debname="com.${_pkgname}.baidu.uos"
pkgver=3.4.2
_electronversion=22
pkgrel=1
pkgdesc="Unoffical Baidu wenku Client.一款由百度发布的供网友在线分享文档的平台"
arch=(
'aarch64'
'x86_64'
)
url="https://wenku.baidu.com"
_ghurl="https://github.com/kota-rina3/hokeshi"
license=('LicenseRef-custom')
provides=("${pkgname%-bin}=${pkgver}")
conflicts=(
"${pkgname%-bin}"
"deepin-wine-${pkgname%-bin}"
)
depends=(
"electron${_electronversion}"
)
options=(
'!strip'
'!emptydirs'
)
source=(
"LICENSE.html::https://edu-wenku.bdimg.com/v1/pc/protocols/help24-new.htm"
"${pkgname%-bin}.sh"
)
source_aarch64=("${pkgname%-bin}-${pkgver}-aarch64.deb::${_ghurl}/releases/download/BaiduWenku-${pkgver}/${_debname}_${pkgver}_arm64.deb")
source_x86_64=("${pkgname%-bin}-${pkgver}-x86_64.deb::${_ghurl}/releases/download/BaiduWenku-${pkgver}/${_debname}_${pkgver}_amd64.deb")
sha256sums=('eb85aa9b3586dcd16b0f18b4b467b46b076688f9d1f723dea7f2eb92cd797ce7'
'31ad33b633744f5361abd964be306cea53ae1050e760c787115f7eca60045ae6')
sha256sums_aarch64=('2f75e7ce9f30bd37cbd6dfa005cc17f8e872e789b17e3850f0e394bfa765b45c')
sha256sums_x86_64=('bb516b41eb7c6c9e6f2b5fb9985f7c165c02e4b77e6f887163620cca0a7903cc')
_get_app_dir() {
find "${srcdir}" -type d -name "node_modules" -prune -o -type f -name "resources.pak" -print0 | xargs -0 dirname | head -n 1
}
_check_electron_version() {
echo "Verifying Electron version..."
local _main_exe=$(find "$(_get_app_dir)" -maxdepth 1 -type f -executable -printf '%s %p\n' | sort -nr | head -1 | cut -d' ' -f2-)
[[ -z "${_main_exe}" ]] && echo -e "\033[1;33mNote: Could not find Electron binary.\033[0m" && return
local _elec_ver=$(strings "${_main_exe}" | grep -oP 'Electron/\K[0-9]+' | head -1)
[[ -z "${_elec_ver}" ]] && echo -e "\033[1;33mNote: Could not determine Electron version.\033[0m" && return
[[ "${_elec_ver}" != "${_electronversion}" ]] &&
echo -e "\033[1;31mWarning: Electron version mismatch! Detected: ${_elec_ver}, Expected: ${_electronversion}\033[0m" ||
echo -e "Electron version verified: \033[1;31m${_elec_ver}\033[0m"
}
prepare() {
sed -i -e "
s/@electronversion@/${_electronversion}/g
s/@appname@/${pkgname%-bin}/g
s/@runname@/app/g
s/@cfgdirname@/${_pkgname}-pc/g
" "${srcdir}/${pkgname%-bin}.sh"
bsdtar -xf "${srcdir}/data."*
_check_electron_version
local _app_dir=$(_get_app_dir)
rm -rf "${_app_dir}/resources/elevate.exe"
sed -i -e "
s/Exec=\/opt\/apps\/${_debname}\/files\/${_pkgname}/Exec=${pkgname%-bin}/g
s/Icon=${_debname}/Icon=${pkgname%-bin}/g
" "${srcdir}/opt/apps/${_debname}/entries/applications/${_debname}.desktop"
}
package() {
install -Dm755 "${srcdir}/${pkgname%-bin}.sh" "${pkgdir}/usr/bin/${pkgname%-bin}"
install -Dm755 -d "${pkgdir}/usr/lib/${pkgname%-bin}"
local _app_dir=$(_get_app_dir)
cp -a "${_app_dir}/resources/." "${pkgdir}/usr/lib/${pkgname%-bin}/"
install -Dm644 "${srcdir}/opt/apps/${_debname}/entries/applications/${_debname}.desktop" "${pkgdir}/usr/share/applications/${pkgname%-bin}.desktop"
install -Dm644 "${srcdir}/opt/apps/${_debname}/entries/icons/${_debname}.png" "${pkgdir}/usr/share/pixmaps/${pkgname%-bin}.desktop"
install -Dm644 "${srcdir}/LICENSE.html" -t "${pkgdir}/usr/share/licenses/${pkgname}"
}
Changes since previous scan
--- PKGBUILD @ 2026-06-20 16:03+++ PKGBUILD @ 2026-09-23 09:40@@ -2,12 +2,17 @@ _pkgname=wenku pkgname="baidu${_pkgname}-bin" _zhsname='百度文库'-pkgver=3.4.1+_debname="com.${_pkgname}.baidu.uos"+pkgver=3.4.2 _electronversion=22 pkgrel=1-pkgdesc="Baidu wenku Client.(Prebuilt version.Use system-wide electron)一款由百度发布的供网友在线分享文档的平台"-arch=('x86_64')+pkgdesc="Unoffical Baidu wenku Client.一款由百度发布的供网友在线分享文档的平台"+arch=(+ 'aarch64'+ 'x86_64'+) url="https://wenku.baidu.com"+_ghurl="https://github.com/kota-rina3/hokeshi" license=('LicenseRef-custom') provides=("${pkgname%-bin}=${pkgver}") conflicts=(@@ -17,30 +22,32 @@ depends=( "electron${_electronversion}" )-makedepends=(- '7zip'- 'asar'- 'gendesk'- 'curl'-) options=( '!strip' '!emptydirs' ) source=(- "${pkgname%-bin}-${pkgver}.exe::https://edu-wenku.bdimg.com/v1/na/0807/PC%E5%AE%A2%E6%88%B7%E7%AB%AF%E7%89%88%E6%9C%AC%E5%8C%85/${_pkgname}-Setup-${pkgver}.exe" "LICENSE.html::https://edu-wenku.bdimg.com/v1/pc/protocols/help24-new.htm" "${pkgname%-bin}.sh" )-sha256sums=('1f7cf613e18cbde4447d18eb9539e4f589d9fdfc5741877acb02814f6a7c4a07'- 'eb85aa9b3586dcd16b0f18b4b467b46b076688f9d1f723dea7f2eb92cd797ce7'+source_aarch64=("${pkgname%-bin}-${pkgver}-aarch64.deb::${_ghurl}/releases/download/BaiduWenku-${pkgver}/${_debname}_${pkgver}_arm64.deb")+source_x86_64=("${pkgname%-bin}-${pkgver}-x86_64.deb::${_ghurl}/releases/download/BaiduWenku-${pkgver}/${_debname}_${pkgver}_amd64.deb")+sha256sums=('eb85aa9b3586dcd16b0f18b4b467b46b076688f9d1f723dea7f2eb92cd797ce7' '31ad33b633744f5361abd964be306cea53ae1050e760c787115f7eca60045ae6')-_get_electron_version() {- _electronversion="strings ${srcdir}/tmp/${_zhsname}.exe | grep '^Chrome/[0-9.]* Electron/[0-9]' | cut -d'/' -f3 | cut -d'.' -f1"+sha256sums_aarch64=('2f75e7ce9f30bd37cbd6dfa005cc17f8e872e789b17e3850f0e394bfa765b45c')+sha256sums_x86_64=('bb516b41eb7c6c9e6f2b5fb9985f7c165c02e4b77e6f887163620cca0a7903cc')+_get_app_dir() {+ find "${srcdir}" -type d -name "node_modules" -prune -o -type f -name "resources.pak" -print0 | xargs -0 dirname | head -n 1 }-_get_electron_version() {- _elec_ver="$(strings "${srcdir}/tmp/${_zhsname}.exe" | grep '^Chrome/[0-9.]* Electron/[0-9]' | cut -d'/' -f3 | cut -d'.' -f1)"- echo -e "The electron version is: \033[1;31m${_elec_ver}\033[0m"+_check_electron_version() {+ echo "Verifying Electron version..."+ local _main_exe=$(find "$(_get_app_dir)" -maxdepth 1 -type f -executable -printf '%s %p\n' | sort -nr | head -1 | cut -d' ' -f2-)+ [[ -z "${_main_exe}" ]] && echo -e "\033[1;33mNote: Could not find Electron binary.\033[0m" && return+ local _elec_ver=$(strings "${_main_exe}" | grep -oP 'Electron/\K[0-9]+' | head -1)+ [[ -z "${_elec_ver}" ]] && echo -e "\033[1;33mNote: Could not determine Electron version.\033[0m" && return+ [[ "${_elec_ver}" != "${_electronversion}" ]] &&+ echo -e "\033[1;31mWarning: Electron version mismatch! Detected: ${_elec_ver}, Expected: ${_electronversion}\033[0m" ||+ echo -e "Electron version verified: \033[1;31m${_elec_ver}\033[0m" } prepare() { sed -i -e "@@ -48,28 +55,23 @@ s/@appname@/${pkgname%-bin}/g s/@runname@/app/g s/@cfgdirname@/${_pkgname}-pc/g- s/@options@//g " "${srcdir}/${pkgname%-bin}.sh"- gendesk -q -f -n \- --pkgname="${pkgname%-bin}" \- --pkgdesc="${pkgdesc}" \- --categories="Office" \- --name="${pkgname%-bin}" \- --exec="${pkgname%-bin} %U" \- --custom="Name[zh_CN]=${_zhsname}"- rm -rf "${srcdir}/tmp"- install -Dm755 -d "${srcdir}/tmp"- 7z x -aoa "${srcdir}/${pkgname%-bin}-${pkgver}.exe" -o"${srcdir}/tmp"- _get_electron_version- asar e "${srcdir}/tmp/resources/app.asar" "${srcdir}/app.asar.unpacked"- cp "${srcdir}/tmp/winbuild/app.png" "${srcdir}/app.asar.unpacked/static/icons/icon.png"+ bsdtar -xf "${srcdir}/data."*+ _check_electron_version+ local _app_dir=$(_get_app_dir)+ rm -rf "${_app_dir}/resources/elevate.exe"+ sed -i -e "+ s/Exec=\/opt\/apps\/${_debname}\/files\/${_pkgname}/Exec=${pkgname%-bin}/g+ s/Icon=${_debname}/Icon=${pkgname%-bin}/g+ " "${srcdir}/opt/apps/${_debname}/entries/applications/${_debname}.desktop" } package() { install -Dm755 "${srcdir}/${pkgname%-bin}.sh" "${pkgdir}/usr/bin/${pkgname%-bin}" install -Dm755 -d "${pkgdir}/usr/lib/${pkgname%-bin}"- cp -Pr --no-preserve=ownership "${srcdir}/app.asar.unpacked" "${pkgdir}/usr/lib/${pkgname%-bin}/app"- install -Dm644 "${srcdir}/${pkgname%-bin}.desktop" -t "${pkgdir}/usr/share/applications"- install -Dm644 "${srcdir}/tmp/winbuild/app.png" "${pkgdir}/usr/share/pixmaps/${pkgname%-bin}.png"+ local _app_dir=$(_get_app_dir)+ cp -a "${_app_dir}/resources/." "${pkgdir}/usr/lib/${pkgname%-bin}/"+ install -Dm644 "${srcdir}/opt/apps/${_debname}/entries/applications/${_debname}.desktop" "${pkgdir}/usr/share/applications/${pkgname%-bin}.desktop"+ install -Dm644 "${srcdir}/opt/apps/${_debname}/entries/icons/${_debname}.png" "${pkgdir}/usr/share/pixmaps/${pkgname%-bin}.desktop" install -Dm644 "${srcdir}/LICENSE.html" -t "${pkgdir}/usr/share/licenses/${pkgname}" } Scan history
| Scanned at (UTC) | Severity | Rules |
|---|---|---|
| 2026-09-23 09:40:25 | Medium | 2 |
| 2026-06-20 16:03:41 | Clean | 2 |
| 2026-06-20 00:50:07 | Medium | 2 |
| 2026-06-20 00:18:46 | Medium | 1 |
| 2026-06-19 23:51:18 | Medium | 2 |
| 2026-06-19 19:07:35 | Low | 2 |
| 2026-06-18 16:11:54 | Medium | 1 |