cgdi

maintainer zxp19821005 · 0 votes · scanned 2026-08-03 00:08:14.047287
LOW
View on AUR ↗
Why flagged The npx command in build() is used to run electron-packager on the project's own source code from a trusted Git repository; this is a standard part of building an Electron app and does not execute untrusted remote code.

Triggered rules

LOW AI review downgraded a static finding 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 90%): The npx command in build() is used to run electron-packager on the project's own source code from a trusted Git repository; this is a standard part of building an Electron app and does not execute untrusted remote code.

1 higher static finding superseded - not the current verdict (shown for transparency)
MEDIUM npx/bunx/deno executes a remote package remote_code_tool

`npx`/`bunx`/`pnpm dlx`/`deno run <url>` downloads AND runs a remote package at build time — the moral equivalent of piping a download into a shell. Severity downgraded: Node.js consumer context.

  • PKGBUILD:74 NODE_ENV=production npx electron-packager . "${pkgname}" --platform=linux --overwrite

PKGBUILD

1 offending line(s) highlighted
1# Maintainer: zxp19821005 <zxp19821005 at 163 dot com>
2pkgname=cgdi
3_pkgname=CGDI
4pkgver=0.0.8
5_electronversion=23
6_nodeversion=20
7pkgrel=8
8pkgdesc="Application to calculate duration between 2 dates (Electron app).(Use system-wide electron)"
9arch=('any')
10url="https://github.com/nullfuzz-pentest/CGDI"
11license=('GPL-2.0-or-later')
12conflicts=("${pkgname}")
13depends=(
14 "electron${_electronversion}"
15 'nodejs'
16)
17makedepends=(
18 'gendesk'
19 'npm'
20 'curl'
21 'nvm'
22 'git'
23)
24options=(
25 '!strip'
26 '!emptydirs'
27)
28source=(
29 "${pkgname}-${pkgver}::git+${url}#tag=${pkgver}"
30 "${pkgname}.sh"
31)
32sha256sums=('a0d5db820cc3f37b90268670e06bfa4c1ee572ba73378e5df2527cc68ead5600'
33 '291f50480f5a61bc9c68db7d44cd0412071128706baa868a9cb854f8779a1980')
34_ensure_local_nvm() {
35 local NVM_DIR="${srcdir}/.nvm"
36 source /usr/share/nvm/init-nvm.sh || [[ $? != 1 ]]
37 nvm install "${_nodeversion}"
38 nvm use "${_nodeversion}"
39}
40prepare() {
41 sed -i -e "
42 s/@electronversion@/${_electronversion}/g
43 s/@appname@/${pkgname}/g
44 s/@runname@/app/g
45 s/@cfgdirname@/${pkgname}/g
46 s/@options@//g
47 " "${srcdir}/${pkgname}.sh"
48 _ensure_local_nvm
49 gendesk -q -f -n --pkgname="${pkgname}" --pkgdesc="${pkgdesc}" --categories="Utility" --name="${_pkgname}" --exec="${pkgname}"
50 cd "${srcdir}/${pkgname}-${pkgver}/src"
51 export ELECTRON_SKIP_BINARY_DOWNLOAD=1
52 export SYSTEM_ELECTRON_VERSION="$(electron${_electronversion} -v | sed 's/v//g')"
53 HOME="${srcdir}/.electron-gyp"
54 {
55 echo -e '\n'
56 #echo 'build_from_source=true'
57 echo "cache=${srcdir}/.npm_cache"
58 echo "maxsockets=10"
59 } >> .npmrc
60 if [[ "$(curl -s ipinfo.io/country)" == *"CN"* ]]; then
61 {
62 echo 'registry=https://registry.npmmirror.com'
63 echo 'electron_mirror=https://registry.npmmirror.com/-/binary/electron/'
64 echo 'electron_builder_binaries_mirror=https://registry.npmmirror.com/-/binary/electron-builder-binaries/'
65 } >> .npmrc
66 find ./ -type f -name "package-lock.json" -exec sed -i "s/registry.npmjs.org/registry.npmmirror.com/g" {} +
67 fi
68 sed -i "s/\"electron\": \"[^\"]*\"/\"electron\": \"${SYSTEM_ELECTRON_VERSION}\"/g" package.json
69 NODE_ENV=development npm install --leagacy-peer-deps
70}
71build() {
72 cd "${srcdir}/${pkgname}-${pkgver}/src"
73 local electronDist="/usr/lib/electron${_electronversion}"
74 NODE_ENV=production npx electron-packager . "${pkgname}" --platform=linux --overwrite
75}
76package() {
77 install -Dm755 "${srcdir}/${pkgname}.sh" "${pkgdir}/usr/bin/${pkgname}"
78 install -Dm755 -d "${pkgdir}/usr/lib/${pkgname}"
79 cp -Pr --no-preserve=ownership "${srcdir}/${pkgname}-${pkgver}/src/${pkgname}-linux-"*/resources/app "${pkgdir}/usr/lib/${pkgname}"
80 install -Dm644 "${srcdir}/${pkgname}.desktop" -t "${pkgdir}/usr/share/applications"
81 install -Dm644 "${srcdir}/${pkgname}-${pkgver}/LICENSE" -t "${pkgdir}/usr/share/licenses/${pkgname}"
82}

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