baiduwenku-bin

MEDIUM
maintainer zxp19821005 0 votes scanned 2026-09-23 09:40:25.835658
View on AUR
Why flagged

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

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:30 "LICENSE.html::https://edu-wenku.bdimg.com/v1/pc/protocols/help24-new.htm"
Medium AI review 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
1# Maintainer: zxp19821005 <zxp19821005 at 163 dot com>
2_pkgname=wenku
3pkgname="baidu${_pkgname}-bin"
4_zhsname='百度文库'
5_debname="com.${_pkgname}.baidu.uos"
6pkgver=3.4.2
7_electronversion=22
8pkgrel=1
9pkgdesc="Unoffical Baidu wenku Client.一款由百度发布的供网友在线分享文档的平台"
10arch=(
11 'aarch64'
12 'x86_64'
13)
14url="https://wenku.baidu.com"
15_ghurl="https://github.com/kota-rina3/hokeshi"
16license=('LicenseRef-custom')
17provides=("${pkgname%-bin}=${pkgver}")
18conflicts=(
19 "${pkgname%-bin}"
20 "deepin-wine-${pkgname%-bin}"
21)
22depends=(
23 "electron${_electronversion}"
24)
25options=(
26 '!strip'
27 '!emptydirs'
28)
29source=(
30 "LICENSE.html::https://edu-wenku.bdimg.com/v1/pc/protocols/help24-new.htm"
31 "${pkgname%-bin}.sh"
32)
33source_aarch64=("${pkgname%-bin}-${pkgver}-aarch64.deb::${_ghurl}/releases/download/BaiduWenku-${pkgver}/${_debname}_${pkgver}_arm64.deb")
34source_x86_64=("${pkgname%-bin}-${pkgver}-x86_64.deb::${_ghurl}/releases/download/BaiduWenku-${pkgver}/${_debname}_${pkgver}_amd64.deb")
35sha256sums=('eb85aa9b3586dcd16b0f18b4b467b46b076688f9d1f723dea7f2eb92cd797ce7'
36 '31ad33b633744f5361abd964be306cea53ae1050e760c787115f7eca60045ae6')
37sha256sums_aarch64=('2f75e7ce9f30bd37cbd6dfa005cc17f8e872e789b17e3850f0e394bfa765b45c')
38sha256sums_x86_64=('bb516b41eb7c6c9e6f2b5fb9985f7c165c02e4b77e6f887163620cca0a7903cc')
39_get_app_dir() {
40 find "${srcdir}" -type d -name "node_modules" -prune -o -type f -name "resources.pak" -print0 | xargs -0 dirname | head -n 1
41}
42_check_electron_version() {
43 echo "Verifying Electron version..."
44 local _main_exe=$(find "$(_get_app_dir)" -maxdepth 1 -type f -executable -printf '%s %p\n' | sort -nr | head -1 | cut -d' ' -f2-)
45 [[ -z "${_main_exe}" ]] && echo -e "\033[1;33mNote: Could not find Electron binary.\033[0m" && return
46 local _elec_ver=$(strings "${_main_exe}" | grep -oP 'Electron/\K[0-9]+' | head -1)
47 [[ -z "${_elec_ver}" ]] && echo -e "\033[1;33mNote: Could not determine Electron version.\033[0m" && return
48 [[ "${_elec_ver}" != "${_electronversion}" ]] &&
49 echo -e "\033[1;31mWarning: Electron version mismatch! Detected: ${_elec_ver}, Expected: ${_electronversion}\033[0m" ||
50 echo -e "Electron version verified: \033[1;31m${_elec_ver}\033[0m"
51}
52prepare() {
53 sed -i -e "
54 s/@electronversion@/${_electronversion}/g
55 s/@appname@/${pkgname%-bin}/g
56 s/@runname@/app/g
57 s/@cfgdirname@/${_pkgname}-pc/g
58 " "${srcdir}/${pkgname%-bin}.sh"
59 bsdtar -xf "${srcdir}/data."*
60 _check_electron_version
61 local _app_dir=$(_get_app_dir)
62 rm -rf "${_app_dir}/resources/elevate.exe"
63 sed -i -e "
64 s/Exec=\/opt\/apps\/${_debname}\/files\/${_pkgname}/Exec=${pkgname%-bin}/g
65 s/Icon=${_debname}/Icon=${pkgname%-bin}/g
66 " "${srcdir}/opt/apps/${_debname}/entries/applications/${_debname}.desktop"
67}
68package() {
69 install -Dm755 "${srcdir}/${pkgname%-bin}.sh" "${pkgdir}/usr/bin/${pkgname%-bin}"
70 install -Dm755 -d "${pkgdir}/usr/lib/${pkgname%-bin}"
71 local _app_dir=$(_get_app_dir)
72 cp -a "${_app_dir}/resources/." "${pkgdir}/usr/lib/${pkgname%-bin}/"
73 install -Dm644 "${srcdir}/opt/apps/${_debname}/entries/applications/${_debname}.desktop" "${pkgdir}/usr/share/applications/${pkgname%-bin}.desktop"
74 install -Dm644 "${srcdir}/opt/apps/${_debname}/entries/icons/${_debname}.png" "${pkgdir}/usr/share/pixmaps/${pkgname%-bin}.desktop"
75 install -Dm644 "${srcdir}/LICENSE.html" -t "${pkgdir}/usr/share/licenses/${pkgname}"
76}
77

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)SeverityRules
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

Report a package

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

0 / 4000
Your suggestion