cgdi

LOW
maintainer zxp19821005 0 votes scanned 2026-09-17 00:27:14.276658
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-09-17 00:27:14 Low 2
2026-09-16 00:03:17 Low 2
2026-09-15 00:25:31 Low 2
2026-09-14 00:27:57 Low 2
2026-09-13 00:19:54 Low 2
2026-09-12 00:25:17 Low 2
2026-09-11 00:19:22 Low 2
2026-09-10 00:22:44 Low 2
2026-09-09 00:04:09 Low 2
2026-09-08 00:18:08 Low 2
2026-09-07 00:30:15 Low 2
2026-09-06 00:17:06 Low 2
2026-09-05 00:16:27 Low 2
2026-09-04 00:03:13 Low 2
2026-09-03 00:15:47 Low 2
2026-09-02 00:02:31 Low 2
2026-09-01 00:11:19 Low 2
2026-08-31 00:19:57 Low 2
2026-08-30 00:04:14 Low 2
2026-08-29 00:29:17 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