er-editor-git

LOW
maintainer zxp19821005 0 votes scanned 2026-11-01 00:21:48.120785
View on AUR
Why flagged

The npx commands in the build() function (npx buf generate, npx electron-vite build, npm exec electron-builder) are used to run project-local or version-controlled development tools, not arbitrary remote code; these are standard in Electron/NPM builds and pose minimal risk as they operate within the project's declared dependency tree.

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-2507) reviewed the full PKGBUILD and judged it LOW (confidence 95%): The npx commands in the build() function (npx buf generate, npx electron-vite build, npm exec electron-builder) are used to run project-local or version-controlled development tools, not arbitrary remote code; these are standard in Electron/NPM builds and pose minimal risk as they operate within the project's declared dependency tree.

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:100 npx buf generate
  • PKGBUILD:102 npx electron-vite build

PKGBUILD

2 offending line(s) highlighted
1# Maintainer: zxp19821005 <zxp19821005 at 163 dot com>
2pkgname=er-editor-git
3pkgver=0.7.1.r3.g5cb844c
4_electronversion=28
5_nodeversion=22
6pkgrel=1
7pkgdesc="A game editor for Pokemon Elite Redux made with Electron js."
8arch=('any')
9url="https://github.com/ForwardFeed/er-editor"
10license=('LicenseRef-unknown')
11conflicts=("${pkgname%-git}")
12provides=("${pkgname%-git}=${pkgver%.r*}")
13depends=(
14 "electron${_electronversion}-bin"
15)
16makedepends=(
17 'gendesk'
18 'npm'
19 'nvm'
20 'git'
21 'jq'
22)
23source=(
24 "${pkgname%-git}.git::git+${url}"
25 "${pkgname%-git}.sh"
26)
27sha256sums=('SKIP'
28 'dfcd6603d29c7b8d88e019b517a2e5c1a7b5ab905a0961a8b81adfa508b258b8')
29_get_project_dir() {
30 local d
31 while IFS= read -r d; do
32 find "$d" -name "package.json" ! -path "*/node_modules/*" 2>/dev/null | grep -q . && { echo "$d"; return; }
33 done < <(find "${srcdir}" -maxdepth 1 -mindepth 1 -type d ! -name '.*')
34}
35pkgver() {
36 cd "$(_get_project_dir)"
37 set -o pipefail
38 git describe --long --tags --abbrev=7 | sed 's/\([^-]*-g\)/r\1/;s/-/./g;s/v//g' ||
39 printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short=7 HEAD)"
40}
41_ensure_local_nvm() {
42 local NVM_DIR="${srcdir}/.nvm"
43 source /usr/share/nvm/init-nvm.sh || [[ $? != 1 ]]
44 nvm install "${_nodeversion}"
45 nvm use "${_nodeversion}"
46}
47_get_app_dir() {
48 find "${srcdir}" -type f -name "resources.pak" ! -path "*/node_modules/*" -print 2>/dev/null | while read f; do [ -d "${f%/*}/resources" ] && echo "${f%/*}" && break; done
49}
50_get_electron_version() {
51 _elec_ver=$(find "$(_get_project_dir)" -name "package.json" ! -path "*/node_modules/*" -print \
52 | xargs -I{} jq -r '(.devDependencies.electron // .dependencies.electron) // empty' {} 2>/dev/null \
53 | grep -oE '[0-9]+' | head -1)
54 [[ -z "${_elec_ver}" ]] && return 1
55 (( _elec_ver == _electronversion )) && c=32 || c=31
56 echo -e "Electron version: \033[1;${c}m${_elec_ver}$([[ $c -eq 31 ]] && echo " (expected ${_electronversion})")\033[0m"
57}
58_set_build_env() {
59 export ELECTRON_DIST="/usr/lib/electron${_electronversion}"
60 export ELECTRON_OVERRIDE_DIST_PATH="${ELECTRON_DIST}"
61 export ELECTRON_SKIP_BINARY_DOWNLOAD=1
62 export ELECTRON_BUILDER_OFFLINE=true
63 export SYSTEM_ELECTRON_VERSION="$(electron${_electronversion} -v | sed 's/^v//')"
64 export HOME="${srcdir}/.home"
65 export XDG_CACHE_HOME="${HOME}/.cache"
66 export XDG_CONFIG_HOME="${HOME}/.config"
67 export XDG_DATA_HOME="${HOME}/.local/share"
68 export npm_config_cache="${HOME}/.npm_cache"
69 export COREPACK_NPM_REGISTRY="${COREPACK_NPM_REGISTRY:-${NPM_CONFIG_REGISTRY:-https://registry.npmjs.org}}"
70 export COREPACK_HOME="${HOME}/.corepack"
71 export npm_config_audit=false
72 export npm_config_registry="${NPM_CONFIG_REGISTRY:-${npm_config_registry:-https://registry.npmjs.org}}"
73 mkdir -p "${HOME}" "${npm_config_cache}" "${COREPACK_HOME}"
74}
75prepare() {
76 cd "$(_get_project_dir)"
77 _get_electron_version
78 sed -i -e "
79 s/@electronversion@/${_electronversion}/g
80 s/@appname@/${pkgname%-git}/g
81 " "${srcdir}/${pkgname%-git}.sh"
82 gendesk -q -f -n \
83 --pkgname="${pkgname%-git}" \
84 --pkgdesc="${pkgdesc}" \
85 --categories="Game" \
86 --name="${pkgname%-git}" \
87 --exec="${pkgname%-git} %U"
88 _ensure_local_nvm
89 _set_build_env
90 jq --arg ver "${SYSTEM_ELECTRON_VERSION}" '.devDependencies.electron = $ver' package.json > package.json.tmp && mv package.json.tmp package.json
91 git submodule update --depth=1 --init --recursive
92 export NODE_ENV=development
93 npm install --legacy-peer-deps
94}
95build() {
96 cd "$(_get_project_dir)"
97 _ensure_local_nvm
98 _set_build_env
99 export NODE_ENV=production
100 npx buf generate
101 npm run typecheck
102 npx electron-vite build
103 npm exec -c "electron-builder --linux dir -c.electronDist=${ELECTRON_DIST} --config electron-builder.yml"
104}
105package() {
106 install -Dm755 "${srcdir}/${pkgname%-git}.sh" "${pkgdir}/usr/bin/${pkgname%-git}"
107 install -Dm755 -d "${pkgdir}/usr/lib/${pkgname%-git}"
108 rm -rf "$(_get_app_dir)/resources/default_app.asar"
109 cp -a "$(_get_app_dir)/resources/." "${pkgdir}/usr/lib/${pkgname%-git}/"
110 install -Dm644 "$(_get_project_dir)/${pkgname%-git}.desktop" -t "${pkgdir}/usr/share/applications"
111 install -Dm644 "$(_get_project_dir)/resources/icon.png" "${pkgdir}/usr/share/pixmaps/${pkgname%-git}.png"
112}

Scan history

Scanned at (UTC)SeverityRules
2026-11-01 00:21:48 Low 2
2026-10-31 00:07:41 Low 2
2026-10-30 00:29:30 Low 2
2026-10-29 00:13:55 Low 2
2026-10-28 00:06:54 Low 2
2026-10-27 00:23:28 Low 2
2026-10-26 00:12:40 Low 2
2026-10-25 00:20:48 Low 2
2026-10-24 00:14:55 Low 2
2026-10-23 00:02:19 Low 2
2026-10-22 00:13:10 Low 2
2026-10-21 00:12:50 Low 2
2026-10-20 00:10:31 Low 2
2026-10-19 00:03:55 Low 2
2026-10-18 00:06:55 Low 2
2026-10-17 00:21:55 Low 2
2026-10-16 00:12:47 Low 2
2026-10-15 00:28:05 Low 2
2026-10-14 00:06:47 Low 2
2026-10-13 11:16:23 Medium 1

Report a package

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

0 / 4000
Your suggestion