electron-gpt-git

maintainer zxp19821005 · 0 votes · scanned 2026-08-03 00:08:14.047287
LOW
View on AUR ↗
Why flagged The PKGBUILD clones the upstream source directly from the official GitHub repository and runs 'npm install' against it. The npmmirror.com registry substitution is conditional on the build machine being geolocated in China (via ipinfo.io), which is a common and well-known pattern in AUR packages targeting Chinese users. npmmirror.com is the official Alibaba/Taobao npm mirror widely used in China and mirrors the official npm registry — it is not a personal or rogue host. The package-lock.json is present in the upstream source, so dependency versions are pinned. The ELECTRON_SKIP_BINARY_DOWNLOAD=1 and system electron usage avoid downloading pre-built Electron binaries. The curl to ipinfo.io during build is a minor privacy/reproducibility concern but not a security threat. Overall this is a standard Electron app build pattern with a legitimate CN mirror fallback; the cheaper model's concern is a false positive on a recognized official mirror. The risk is low (sloppy geolocation check, non-reproducible builds) rather than a genuine supply-chain threat.

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 82%): The PKGBUILD clones the upstream source directly from the official GitHub repository and runs 'npm install' against it. The npmmirror.com registry substitution is conditional on the build machine being geolocated in China (via ipinfo.io), which is a common and well-known pattern in AUR packages targeting Chinese users. npmmirror.com is the official Alibaba/Taobao npm mirror widely used in China and mirrors the official npm registry — it is not a personal or rogue host. The package-lock.json is present in the upstream source, so dependency versions are pinned. The ELECTRON_SKIP_BINARY_DOWNLOAD=1 and system electron usage avoid downloading pre-built Electron binaries. The curl to ipinfo.io during build is a minor privacy/reproducibility concern but not a security threat. Overall this is a standard Electron app build pattern with a legitimate CN mirror fallback; the cheaper model's concern is a false positive on a recognized official mirror. The risk is low (sloppy geolocation check, non-reproducible builds) rather than a genuine supply-chain threat.

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:82 NODE_ENV=development npm add -D @electron-forge/plugin-local-electron

PKGBUILD

1 offending line(s) highlighted
1# Maintainer: zxp19821005 <zxp19821005 at 163 dot com>
2pkgname=electron-gpt-git
3pkgver=r1417.09f2c72
4_electronversion=33
5_nodeversion=20
6pkgrel=1
7pkgdesc="Simplified chat using OpenAI's GPT.(Use system-wide electron)"
8arch=('any')
9url="https://github.com/Bubuclem/electron-gpt"
10license=('CC0-1.0')
11depends=(
12 "electron${_electronversion}"
13 'python'
14 'python-setuptools'
15 'nodejs'
16)
17makedepends=(
18 'npm'
19 'git'
20 'gendesk'
21 'nvm'
22 'curl'
23)
24source=(
25 "${pkgname%-git}.git::git+${url}.git"
26 "${pkgname%-git}.sh"
27)
28options=(
29 '!strip'
30 '!emptydirs'
31)
32sha256sums=('SKIP'
33 '291f50480f5a61bc9c68db7d44cd0412071128706baa868a9cb854f8779a1980')
34pkgver() {
35 cd "${srcdir}/${pkgname%-git}.git"
36 set -o pipefail
37 git describe --long --tags --abbrev=7 | sed 's/\([^-]*-g\)/r\1/;s/-/./g;s/v//g' ||
38 printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short=7 HEAD)"
39}
40_ensure_local_nvm() {
41 local NVM_DIR="${srcdir}/.nvm"
42 source /usr/share/nvm/init-nvm.sh || [[ $? != 1 ]]
43 nvm install "${_nodeversion}"
44 nvm use "${_nodeversion}"
45}
46prepare() {
47 cd "${srcdir}/${pkgname%-git}.git"
48 sed -i -e "
49 s/@electronversion@/${_electronversion}/g
50 s/@appname@/${pkgname%-git}/g
51 s/@runname@/app/g
52 s/@cfgdirname@/${pkgname%-git}/g
53 s/@options@/env ELECTRON_OZONE_PLATFORM_HINT=auto/g
54 " "${srcdir}/${pkgname%-git}.sh"
55 _ensure_local_nvm
56 gendesk -q -f -n \
57 --pkgname="${pkgname%-git}" \
58 --pkgdesc="${pkgdesc}" \
59 --name="${pkgname%-git}" \
60 --categories="Utility" \
61 --exec="${pkgname%-git} %U"
62 export ELECTRON_SKIP_BINARY_DOWNLOAD=1
63 export SYSTEM_ELECTRON_VERSION="$(electron${_electronversion} -v | sed 's/v//g')"
64 HOME="${srcdir}/.electron-gyp"
65 {
66 echo -e '\n'
67 #echo 'build_from_source=true'
68 echo "cache=${srcdir}/.npm_cache"
69 echo "maxsockets=10"
70 } >> .npmrc
71 if [[ "$(curl -s ipinfo.io/country)" == *"CN"* ]]; then
72 {
73 echo 'registry=https://registry.npmmirror.com'
74 echo 'electron_mirror=https://registry.npmmirror.com/-/binary/electron/'
75 echo 'electron_builder_binaries_mirror=https://registry.npmmirror.com/-/binary/electron-builder-binaries/'
76 } >> .npmrc
77 find ./ -type f -name "package-lock.json" -exec sed -i "s/registry.npmjs.org/registry.npmmirror.com/g" {} +
78 fi
79 sed -i "s/\.ico/\.png/g" main.js
80 sed -i "s/\"electron\": \"[^\"]*\"/\"electron\": \"${SYSTEM_ELECTRON_VERSION}\"/g" package.json
81 NODE_ENV=development npm install --legacy-peer-deps
82 NODE_ENV=development npm add -D @electron-forge/plugin-local-electron
83}
84build() {
85 cd "${srcdir}/${pkgname%-git}.git"
86 local electronDist="/usr/lib/electron${_electronversion}"
87 sed -i -e "
88 3i\ plugins: [
89 3i\ {
90 3i\ name: '@electron-forge/plugin-local-electron',
91 3i\ config: {
92 3i\ electronPath: \'${electronDist}\'
93 3i\ }
94 3i\ }
95 3i\ ],
96 " forge.config.js
97 NODE_ENV=production npm run package
98}
99package() {
100 install -Dm755 "${srcdir}/${pkgname%-git}.sh" "${pkgdir}/usr/bin/${pkgname%-git}"
101 install -Dm755 -d "${pkgdir}/usr/lib/${pkgname%-git}"
102 cp -Pr --no-preserve=ownership "${srcdir}/${pkgname%-git}.git/out/chatgpt-linux-"*/resources/app "${pkgdir}/usr/lib/${pkgname%-git}"
103 install -Dm644 "${srcdir}/${pkgname%-git}.git/LICENSE.md" -t "${pkgdir}/usr/share/licenses/${pkgname}"
104 install -Dm644 "${srcdir}/${pkgname%-git}.git/assets/favicon.png" "${pkgdir}/usr/share/pixmaps/${pkgname%-git}.png"
105 install -Dm644 "${srcdir}/${pkgname%-git}.git/${pkgname%-git}.desktop" -t "${pkgdir}/usr/share/applications"
106}

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