spx-translation

maintainer zxp19821005 · 0 votes · scanned 2026-08-03 00:08:14.047287
LOW
View on AUR ↗
Why flagged The PKGBUILD installs npm packages from the official npm registry (or npmmirror.com for CN users) during prepare(), including an unpinned 'webpack-cli' via 'pnpm add -D webpack-cli'. This is a common pattern in AUR packages that build Electron apps from source. While unpinned npm dependencies are sloppy and theoretically expose a supply-chain surface, webpack-cli is a well-known, widely-used build tool from the official registry — not an obscure or personal package. The risk is the same as any other AUR package that runs 'pnpm install' without a lockfile pin, which is endemic to this class of AUR packages. There is no binary pulled from an unofficial/personal host, no obfuscation, no exfiltration, and no piracy. The build-linux.js and launcher script are checksummed. The nvm usage and CN mirror detection are unusual but not malicious. Overall this is sloppy packaging (unpinned deps, nvm usage in build) but not a meaningful supply-chain threat beyond what any pnpm-based AUR package presents.

Triggered rules

LOW AI review downgraded a static finding llm_review

The static rules flagged this MEDIUM, but an AI model (anthropic/claude-4.6-sonnet-20260217) reviewed the full PKGBUILD and judged it LOW (confidence 72%): The PKGBUILD installs npm packages from the official npm registry (or npmmirror.com for CN users) during prepare(), including an unpinned 'webpack-cli' via 'pnpm add -D webpack-cli'. This is a common pattern in AUR packages that build Electron apps from source. While unpinned npm dependencies are sloppy and theoretically expose a supply-chain surface, webpack-cli is a well-known, widely-used build tool from the official registry — not an obscure or personal package. The risk is the same as any other AUR package that runs 'pnpm install' without a lockfile pin, which is endemic to this class of AUR packages. There is no binary pulled from an unofficial/personal host, no obfuscation, no exfiltration, and no piracy. The build-linux.js and launcher script are checksummed. The nvm usage and CN mirror detection are unusual but not malicious. Overall this is sloppy packaging (unpinned deps, nvm usage in build) but not a meaningful supply-chain threat beyond what any pnpm-based AUR package presents.

1 higher static finding superseded - not the current verdict (shown for transparency)
MEDIUM npm/yarn/pnpm install of an undeclared external package npm_install_external

Runs `npm/yarn/pnpm install <package>` for a package not in source=(), pulling unpinned, unreviewed code at build time. Severity downgraded: the package declares/looks like a Node.js consumer, where build-time installs are expected.

  • PKGBUILD:68 NODE_ENV=development pnpm add -D webpack-cli

PKGBUILD

1 offending line(s) highlighted
1# Maintainer: zxp19821005 <zxp19821005 at 163 dot com>
2pkgname=spx-translation
3pkgver=2.0.5_1
4_electronversion=25
5_nodeversion=18
6pkgrel=5
7pkgdesc="Aggregated Translation Program (Google + DeepL).Use system-wide electron.聚合翻译程序(谷歌+deepl)"
8arch=('x86_64')
9url="https://github.com/mlmdflr/spx-translation"
10license=('MIT')
11conflicts=("${pkgname}")
12depends=(
13 "electron${_electronversion}"
14)
15makedepends=(
16 'gendesk'
17 'pnpm'
18 'nvm'
19 'curl'
20)
21source=(
22 "${pkgname}-${pkgver}.tar.gz::${url}/archive/refs/tags/vv${pkgver//_/-}.tar.gz"
23 'build-linux.js'
24 "${pkgname}.sh"
25)
26sha256sums=('ecbed1c6b9c538cabc3de2b2d58b513a299a96bfceb19af355aafaca5dae1cce'
27 '7a8736262a5f5e1704d0051293484e710c3db2e9240d46475c7ab02891a119f3'
28 '291f50480f5a61bc9c68db7d44cd0412071128706baa868a9cb854f8779a1980')
29_ensure_local_nvm() {
30 local NVM_DIR="${srcdir}/.nvm"
31 source /usr/share/nvm/init-nvm.sh || [[ $? != 1 ]]
32 nvm install "${_nodeversion}"
33 nvm use "${_nodeversion}"
34}
35prepare() {
36 sed -i -e "
37 s/@electronversion@/${_electronversion}/g
38 s/@appname@/${pkgname}/g
39 s/@runname@/app.asar/g
40 s/@cfgdirname@/${pkgname}/g
41 s/@options@//g
42 " "${srcdir}/${pkgname}.sh"
43 _ensure_local_nvm
44 gendesk -f -n -q --pkgname="${pkgname}" --pkgdesc="${pkgdesc}" --categories="Utility" --name="${pkgname}" --exec="${pkgname} %U"
45 cd "${srcdir}/${pkgname}-vv${pkgver//_/-}"
46 #export ELECTRON_SKIP_BINARY_DOWNLOAD=1
47 export SYSTEM_ELECTRON_VERSION="$(electron${_electronversion} -v | sed 's/v//g')"
48 HOME="${srcdir}/.electron-gyp"
49 {
50 echo -e '\n'
51 #echo 'build_from_source=true'
52 echo 'link-workspace-packages=true'
53 echo 'fetch-retry-maxtimeout=10000'
54 echo "cache-dir="${srcdir}"/.pnpm_cache"
55 echo "store-dir="${srcdir}"/.pnpm_store"
56 echo "shamefully-hoist=true"
57 echo "virtual-store-dir-max-length=80"
58 } >> .npmrc
59 if [[ "$(curl -s ipinfo.io/country)" == *"CN"* ]]; then
60 {
61 echo 'registry=https://registry.npmmirror.com'
62 echo 'electron_mirror=https://cdn.npmmirror.com/binaries/electron/'
63 echo 'electron_builder_binaries_mirror=https://npmmirror.com/mirrors/electron-builder-binaries/'
64 } >> .npmrc
65 fi
66 sed -i "s/\"electron\": \"[^\"]*\"/\"electron\": \"${SYSTEM_ELECTRON_VERSION}\"/g" package.json
67 NODE_ENV=development pnpm install
68 NODE_ENV=development pnpm add -D webpack-cli
69 install -Dm644 "${srcdir}/build-linux.js" -t "${srcdir}/${pkgname}-vv${pkgver//_/-}/scripts"
70}
71build() {
72 cd "${srcdir}/${pkgname}-vv${pkgver//_/-}"
73 NODE_ENV=production pnpm node scripts/cfg.js
74 NODE_ENV=production pnpm node scripts/build-linux.js
75 local electronDist="/usr/lib/electron${_electronversion}"
76 NODE_ENV=production pnpm -c exec "electron-builder --linux dir -c.electronDist=${electronDist} --config resources/build/cfg/build.json"
77}
78package() {
79 install -Dm755 "${srcdir}/${pkgname}.sh" "${pkgdir}/usr/bin/${pkgname}"
80 install -Dm644 "${srcdir}/${pkgname}-vv${pkgver//_/-}/out/linux-unpacked/resources/app.asar" -t "${pkgdir}/usr/lib/${pkgname}"
81 cp -Pr --no-preserve=ownership "${srcdir}/${pkgname}-vv${pkgver//_/-}/out/linux-unpacked/resources/extern" "${pkgdir}/usr/lib/${pkgname}"
82 install -Dm644 "${srcdir}/${pkgname}-vv${pkgver//_/-}/resources/build/icons/256x256.png" "${pkgdir}/usr/share/pixmaps/${pkgname}.png"
83 install -Dm644 "${srcdir}/${pkgname}.desktop" -t "${pkgdir}/usr/share/applications"
84 install -Dm644 "${srcdir}/${pkgname}-vv${pkgver//_/-}/resources/root/ELECTRON.LICENSE" -t "${pkgdir}/usr/share/licenses/${pkgname}"
85}

Scan history

Scanned at (UTC)SeverityRules
2026-08-03 00:08:14 LOW 2
2026-08-02 00:16:08 LOW 2
2026-08-01 00:11:18 LOW 2
2026-07-31 00:14:10 LOW 2
2026-07-30 00:17:23 LOW 2
2026-07-29 00:25:53 LOW 2
2026-07-28 00:07:28 LOW 2
2026-07-27 00:24:32 LOW 2
2026-07-26 00:07:32 LOW 2
2026-07-25 00:13:44 LOW 2
2026-07-24 00:02:28 LOW 2
2026-07-23 00:14:47 LOW 2
2026-07-22 00:29:32 LOW 2
2026-07-21 00:24:15 LOW 2
2026-07-20 00:19:49 LOW 2
2026-07-19 00:17:08 LOW 2
2026-07-18 00:14:48 LOW 2
2026-07-17 00:06:16 LOW 2
2026-07-16 00:05:41 LOW 2
2026-07-15 00:09:25 LOW 2

Report a package

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

0 / 4000
Your suggestion