ynote-desktop-bin
maintainer zxp19821005
· 5 votes
· scanned 2026-08-03 00:08:14.047287
MEDIUM
View on AUR ↗
Why flagged
The package downloads a prebuilt .deb from a non-standard, non-whitelisted host (artifact.lx.netease.com), which hosts an executable payload; while likely official, the source is unverifiable and could be silently swapped, posing a supply-chain risk.
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:27
"${pkgname%-bin}-${pkgver}.deb::https://artifact.lx.netease.com/download/ynote-electron/%E6%9C%89%E9%81%93%E4%BA%91%E7%AC%94%E8%AE%B0-web.deb" -
PKGBUILD:28
"LICENSE.html::https://note.youdao.com/license.html"
MEDIUM
AI review
llm_review
An AI model (qwen/qwen3-235b-a22b-07-25) reviewed this and agrees it is MEDIUM (confidence 90%): The package downloads a prebuilt .deb from a non-standard, non-whitelisted host (artifact.lx.netease.com), which hosts an executable payload; while likely official, the source is unverifiable and could be silently swapped, posing a supply-chain risk.
PKGBUILD
2 offending line(s) highlighted
1
# Maintainer: zxp19821005 <zxp19821005 at 163 dot com>
2
# Contributor: yjun <jerrysteve1101 at gmail dot com>
3
# Contributor: FlyInWind <2518509078@qq.com>
4
pkgname=ynote-desktop-bin
5
_zhsname='有道云笔记'
6
pkgver=8.2.63
7
_electronversion=22
8
pkgrel=1
9
pkgdesc="Netease Youdao Ynote for Linux.(Prebuilt version.Use system-wide electron)"
10
arch=('x86_64')
11
url="https://note.youdao.com/"
12
license=('LicenseRef-custom')
13
provides=("${pkgname%-bin}=${pkgver}")
14
conflicts=("${pkgname%-bin}")
15
depends=(
16
"electron${_electronversion}"
17
'perl'
18
)
19
makedepends=(
20
'asar'
21
)
22
options=(
23
'!strip'
24
'!emptydirs'
25
)
26
source=(
27
"${pkgname%-bin}-${pkgver}.deb::https://artifact.lx.netease.com/download/ynote-electron/%E6%9C%89%E9%81%93%E4%BA%91%E7%AC%94%E8%AE%B0-web.deb"
28
"LICENSE.html::https://note.youdao.com/license.html"
29
"${pkgname%-bin}.sh"
30
)
31
sha256sums=('587f20acda65eaf5c805ae6edbaf06a07c49b7c6d2ac9d6333f2197fe642828c'
32
'a8aec47c7cc6e6d838d525c89b58a962d650c84b0ebec09ecfb8955381fe6460'
33
'a774c2f54fbbeeaac3cefc0f7250796d30c86d27f0fd40b7eaf9c0fdb021623d')
34
pkgver() {
35
cd "${srcdir}/app.asar.unpacked"
36
grep '"version":' package.json | awk -F'"version": "' '{print $2}' | awk -F',' '{print $1}' | tr -d '"'
37
}
38
_get_app_dir() {
39
find "${srcdir}" -type f -name "resources.pak" -exec dirname {} + | head -n 1
40
}
41
_check_electron_version() {
42
echo "Verifying Electron version..."
43
local _app_dir=$(_get_app_dir)
44
local _main_exe=""
45
if [[ -n "${_app_dir}" ]]; then
46
_main_exe=$(find "${_app_dir}" -maxdepth 1 -type f -executable -printf '%s %p\n' | sort -nr | head -n 1 | cut -d' ' -f2-)
47
fi
48
if [[ -n "${_main_exe}" ]]; then
49
local _elec_ver=$(strings "${_main_exe}" | grep '^Chrome/[0-9.]* Electron/[0-9]' | cut -d'/' -f3 | cut -d'.' -f1 | head -n 1)
50
if [[ -n "${_elec_ver}" ]]; then
51
if [[ "${_elec_ver}" != "${_electronversion}" ]]; then
52
echo -e "\033[1;31mWarning: Electron version mismatch! Detected: ${_elec_ver}, Expected: ${_electronversion}\033[0m"
53
else
54
echo -e "Electron version verified: \033[1;31m${_elec_ver}\033[0m"
55
fi
56
fi
57
else
58
echo -e "\033[1;33mNote: Could not find Electron binary for version verification.\033[0m"
59
fi
60
}
61
prepare() {
62
sed -i -e "
63
s/@electronversion@/${_electronversion}/g
64
s/@appname@/${pkgname%-bin}/g
65
s/@runname@/app.asar/g
66
s/@cfgdirname@/${pkgname%-bin}/g
67
" "${srcdir}/${pkgname%-bin}.sh"
68
bsdtar -xf "${srcdir}/data."*
69
_check_electron_version
70
local _app_dir=$(_get_app_dir)
71
sed -i -e "
72
s/\"\/opt\/${_zhsname}\/${pkgname%-bin}\" --no-sandbox/${pkgname%-bin}/g
73
s/\/opt\/${_zhsname}\/resources\/build\/icon.svg/${pkgname%-bin}/g
74
s/Utility/Office/g
75
" "${srcdir}/usr/share/applications/${pkgname%-bin}.desktop"
76
asar e "${_app_dir}/resources/app.asar" "${srcdir}/app.asar.unpacked"
77
rm -rf "${_app_dir}/resources/app.asar"
78
sed -i -e "
79
s/process.resourcesPath/\'\/usr\/lib\/${pkgname%-bin}\'/g
80
s/\.\.\/dll\/scholar/dll\/scholar/g
81
" "${srcdir}/app.asar.unpacked/dist/"{main.js,scholar.js}
82
asar p "${srcdir}/app.asar.unpacked" "${_app_dir}/resources/app.asar"
83
rm -rf \
84
"${_app_dir}/resources/app.asar.unpacked/node_modules/ffi-napi/prebuilds/"{darwin-x64,linux-arm64,win32-ia32,win32-x64} \
85
"${_app_dir}/resources/app.asar.unpacked/node_modules/ref-napi/prebuilds/"{darwin-x64,linux-arm64,win32-ia32,win32-x64} \
86
"${_app_dir}/resources/app.asar.unpacked/node_modules/node-screenshots-linux-x64-musl" \
87
"${_app_dir}/resources/app.asar.unpacked/node_modules/koffi/build/koffi/"{*win*,*bsd*,*arm*,linux_ia32,linux_loong64,linux_riscv64d}
88
}
89
package() {
90
install -Dm755 "${srcdir}/${pkgname%-bin}.sh" "${pkgdir}/usr/bin/${pkgname%-bin}"
91
install -Dm755 -d "${pkgdir}/usr/lib/${pkgname%-bin}"
92
local _app_dir=$(_get_app_dir)
93
cp -a "${_app_dir}/resources/". "${pkgdir}/usr/lib/${pkgname%-bin}/"
94
install -Dm644 "${_app_dir}/dll/scholar/client.so" -t "${pkgdir}/usr/lib/${pkgname%-bin}/dll/scholar"
95
install -Dm644 "${srcdir}/usr/share/applications/${pkgname%-bin}.desktop" -t "${pkgdir}/usr/share/applications"
96
find "${srcdir}" -type f \( -name "*.png" -o -name "*.svg" \) -path "*share/icons/*" | while read -r _i; do
97
_extension="${_i##*.}"
98
_icon_path="${_i#*share/icons/}"
99
_target_dir="/usr/share/icons/$(dirname "${_icon_path}")"
100
install -Dm644 "${_i}" "${pkgdir}${_target_dir}/${pkgname%-bin}.${_extension}"
101
done
102
install -Dm644 "${srcdir}/LICENSE.html" -t "${pkgdir}/usr/share/licenses/${pkgname}"
103
}
104
Scan history
| Scanned at (UTC) | Severity | Rules |
|---|---|---|
| 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 |