er-editor-git
maintainer zxp19821005
· 0 votes
· scanned 2026-08-03 00:08:14.047287
LOW
View on AUR ↗
Why flagged
The npx commands in the build() function are used to run project-local development tools (buf, electron-vite, electron-builder) as part of the build process, not to execute arbitrary remote code; these are standard build steps for an Electron application and do not represent a supply-chain risk.
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 95%): The npx commands in the build() function are used to run project-local development tools (buf, electron-vite, electron-builder) as part of the build process, not to execute arbitrary remote code; these are standard build steps for an Electron application and do not represent a supply-chain risk.
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:82
NODE_ENV=production npx buf generate -
PKGBUILD:84
NODE_ENV=production npx electron-vite build
PKGBUILD
2 offending line(s) highlighted
1
# Maintainer: zxp19821005 <zxp19821005 at 163 dot com>
2
pkgname=er-editor-git
3
pkgver=0.5.4.r1.g0dad819
4
_electronversion=28
5
_nodeversion=22
6
pkgrel=1
7
pkgdesc="A game editor for Pokemon Elite Redux made with Electron js.(Use system-wide electron)"
8
arch=('any')
9
url="https://github.com/ForwardFeed/er-editor"
10
license=('LicenseRef-unknown')
11
conflicts=("${pkgname%-git}")
12
provides=("${pkgname%-git}=${pkgver%.r*}")
13
depends=(
14
"electron${_electronversion}"
15
)
16
makedepends=(
17
'gendesk'
18
'npm'
19
'nvm'
20
'git'
21
'curl'
22
)
23
source=(
24
"${pkgname%-git}.git::git+${url}"
25
"${pkgname%-git}.sh"
26
)
27
sha256sums=('SKIP'
28
'291f50480f5a61bc9c68db7d44cd0412071128706baa868a9cb854f8779a1980')
29
pkgver() {
30
cd "${srcdir}/${pkgname%-git}.git"
31
set -o pipefail
32
git describe --long --tags --abbrev=7 | sed 's/\([^-]*-g\)/r\1/;s/-/./g;s/v//g' ||
33
printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short=7 HEAD)"
34
}
35
_ensure_local_nvm() {
36
local NVM_DIR="${srcdir}/.nvm"
37
source /usr/share/nvm/init-nvm.sh || [[ $? != 1 ]]
38
nvm install "${_nodeversion}"
39
nvm use "${_nodeversion}"
40
}
41
prepare() {
42
cd "${srcdir}/${pkgname%-git}.git"
43
sed -i -e "
44
s/@electronversion@/${_electronversion}/g
45
s/@appname@/${pkgname%-git}/g
46
s/@runname@/app.asar/g
47
s/@cfgdirname@/${pkgname%-git}/g
48
s/@options@/env ELECTRON_OZONE_PLATFORM_HINT=auto/g
49
" "${srcdir}/${pkgname%-git}.sh"
50
_ensure_local_nvm
51
gendesk -q -f -n \
52
--pkgname="${pkgname%-git}" \
53
--pkgdesc="${pkgdesc}" \
54
--categories="Game" \
55
--name="${pkgname%-git}" \
56
--exec="${pkgname%-git} %U"
57
export ELECTRON_SKIP_BINARY_DOWNLOAD=1
58
export SYSTEM_ELECTRON_VERSION="$(electron${_electronversion} -v | sed 's/v//g')"
59
HOME="${srcdir}/.electron-gyp"
60
{
61
echo -e '\n'
62
#echo 'build_from_source=true'
63
echo "cache=${srcdir}/.npm_cache"
64
echo "maxsockets=10"
65
} >> .npmrc
66
if [[ "$(curl -s ipinfo.io/country)" == *"CN"* ]]; then
67
{
68
echo 'registry=https://registry.npmmirror.com'
69
echo 'electron_mirror=https://registry.npmmirror.com/-/binary/electron/'
70
echo 'electron_builder_binaries_mirror=https://registry.npmmirror.com/-/binary/electron-builder-binaries/'
71
} >> .npmrc
72
sed -i "s/github.com/github.moeyy.xyz\/https:\/\/github.com/g" .gitmodules
73
find ./ -type f -name "package-lock.json" -exec sed -i "s/registry.npmjs.org/registry.npmmirror.com/g" {} +
74
fi
75
sed -i "s/\"electron\": \"[^\"]*\"/\"electron\": \"${SYSTEM_ELECTRON_VERSION}\"/g" package.json
76
git submodule update --depth=1 --init --recursive
77
NODE_ENV=development npm install --legacy-peer-deps
78
}
79
build() {
80
cd "${srcdir}/${pkgname%-git}.git"
81
local electronDist="/usr/lib/electron${_electronversion}"
82
NODE_ENV=production npx buf generate
83
NODE_ENV=production npm run typecheck
84
NODE_ENV=production npx electron-vite build
85
NODE_ENV=production npm exec -c "electron-builder --linux dir -c.electronDist=${electronDist} --config electron-builder.yml"
86
}
87
package() {
88
install -Dm755 "${srcdir}/${pkgname%-git}.sh" "${pkgdir}/usr/bin/${pkgname%-git}"
89
install -Dm644 "${srcdir}/${pkgname%-git}.git/dist/linux-"*/resources/app.asar -t "${pkgdir}/usr/lib/${pkgname%-git}"
90
cp -Pr --no-preserve=ownership "${srcdir}/${pkgname%-git}.git/dist/linux-"*/resources/app.asar.unpacked "${pkgdir}/usr/lib/${pkgname%-git}"
91
install -Dm644 "${srcdir}/${pkgname%-git}.git/${pkgname%-git}.desktop" -t "${pkgdir}/usr/share/applications"
92
install -Dm644 "${srcdir}/${pkgname%-git}.git/resources/icon.png" "${pkgdir}/usr/share/pixmaps/${pkgname%-git}.png"
93
}
Scan history
| Scanned at (UTC) | Severity | Rules |
|---|---|---|
| 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 |