netron-git

LOW
maintainer zxp19821005 0 votes scanned 2026-09-17 00:27:14.276658
View on AUR
Why flagged

The npx command is used to run electron-builder, a standard build tool for Electron apps, from the project's own devDependencies; this is a normal part of building the application and does not execute arbitrary 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-2507) reviewed the full PKGBUILD and judged it LOW (confidence 95%): The npx command is used to run electron-builder, a standard build tool for Electron apps, from the project's own devDependencies; this is a normal part of building the application and does not execute arbitrary 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:102 NODE_ENV=production npx electron-builder install-app-deps

PKGBUILD

1 offending line(s) highlighted
1# Maintainer: zxp19821005 <zxp19821005 at 163 dot com>
2pkgname=netron-git
3_pkgname=Netron
4pkgver=9.2.4.r0.g065e09e
5_electronversion=44
6_nodeversion=24.15
7pkgrel=1
8pkgdesc="Visualizer for neural network, deep learning and machine learning models.(Use system-wide electron)"
9arch=('any')
10url="https://netron.app/"
11_ghurl="https://github.com/lutzroeder/netron"
12license=('MIT')
13conflicts=("${pkgname%-git}")
14provides=("${pkgname%-git}=${pkgver%.r*}")
15depends=(
16 "electron${_electronversion}"
17)
18makedepends=(
19 'npm'
20 'curl'
21 'git'
22 'nvm'
23 'gendesk'
24 'python-setuptools'
25 'python-build'
26 'python-installer'
27 'python-wheel'
28 'jq'
29)
30optdepends=(
31 'python-onnx: serializing ONNX models'
32 'python-pytorch: serializing PyTorch models'
33)
34source=(
35 "${pkgname//-/.}::git+${_ghurl}.git"
36 "${pkgname%-git}.sh"
37)
38sha256sums=('SKIP'
39 'a774c2f54fbbeeaac3cefc0f7250796d30c86d27f0fd40b7eaf9c0fdb021623d')
40pkgver() {
41 cd "${srcdir}/${pkgname//-/.}"
42 set -o pipefail
43 git describe --long --tags --abbrev=7 | sed 's/\([^-]*-g\)/r\1/;s/-/./g;s/v//g' ||
44 printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short=7 HEAD)"
45}
46_get_app_dir() {
47 find "${srcdir}" -type f -name "resources.pak" -exec dirname {} + | head -n 1
48}
49_ensure_local_nvm() {
50 local NVM_DIR="${srcdir}/.nvm"
51 source /usr/share/nvm/init-nvm.sh || [[ $? != 1 ]]
52 nvm install "${_nodeversion}"
53 nvm use "${_nodeversion}"
54}
55_set_build_env() {
56 export ELECTRON_DIST="/usr/lib/electron${_electronversion}"
57 export ELECTRON_SKIP_BINARY_DOWNLOAD=1
58 export SYSTEM_ELECTRON_VERSION="$(electron${_electronversion} -v | sed 's/v//g')"
59 export HOME="${srcdir}/.electron-gyp"
60 export NPM_CONFIG_CACHE="${srcdir}/.npm_cache"
61 export NPM_CONFIG_MAXSOCKETS=32
62 if [[ "$(curl -s ipinfo.io/country)" == *"CN"* ]]; then
63 {
64 export NPM_CONFIG_REGISTRY="https://registry.npmmirror.com"
65 export NODEJS_ORG_MIRROR="https://npmmirror.com/mirrors/node"
66 export ELECTRON_MIRROR="https://npmmirror.com/mirrors/electron/"
67 export ELECTRON_BUILDER_BINARIES_MIRROR="https://npmmirror.com/mirrors/electron-builder-binaries/"
68 }
69 find ./ -type f -name "package-lock.json" -exec sed -i "s/registry.npmjs.org/registry.npmmirror.com/g" {} +
70 fi
71}
72_get_electron_version() {
73 _elec_ver=$(find "${srcdir}" -maxdepth 5 -name "package.json" ! -path "*/node_modules/*" \
74 -exec grep -l '"electron"' {} + | xargs -I{} jq -r '(.devDependencies.electron // .dependencies.electron) // empty' {} 2>/dev/null | head -1)
75 [[ -z "${_elec_ver}" ]] && return 1
76 echo -e "The electron version is: \033[1;31m${_elec_ver%%.*}\033[0m"
77}
78prepare() {
79 cd "${srcdir}/${pkgname//-/.}"
80 _get_electron_version
81 sed -i -e "
82 s/@electronversion@/${_electronversion}/g
83 s/@appname@/${pkgname%-git}/g
84 s/@runname@/app.asar/g
85 s/@cfgdirname@/${_pkgname}/g
86 " "${srcdir}/${pkgname%-git}.sh"
87 gendesk -q -f -n \
88 --pkgname="${pkgname%-git}" \
89 --pkgdesc="${pkgdesc}" \
90 --categories="Development" \
91 --name="${_pkgname}" \
92 --exec="${pkgname%-git} %U"
93 _set_build_env
94 _ensure_local_nvm
95 sed -i "s/\"electron\": \"[^\"]*\"/\"electron\": \"${SYSTEM_ELECTRON_VERSION}\"/" package.json
96 sed -i "s/--user //g" package.js
97 sed -i "s/--with-deps//g" package.js
98 sed -i "s|await exec('npx playwright install|// await exec('npx playwright install|g" package.js
99 python -m venv .venv
100 export PATH="${PWD}/.venv/bin:${PATH}"
101 NODE_ENV=development npm run install
102 NODE_ENV=production npx electron-builder install-app-deps
103}
104build() {
105 cd "${srcdir}/${pkgname//-/.}"
106 _set_build_env
107 _ensure_local_nvm
108 python -m venv .venv
109 export PATH="${PWD}/.venv/bin:${PATH}"
110 NODE_ENV=production npm run build python
111 NODE_ENV=production npm exec -c "electron-builder --linux dir -c.electronDist=${ELECTRON_DIST}"
112}
113package() {
114 install -Dm755 "${srcdir}/${pkgname%-git}.sh" "${pkgdir}/usr/bin/${pkgname%-git}"
115 install -Dm755 -d "${pkgdir}/usr/lib/${pkgname%-git}"
116 local _app_dir=$(find "${srcdir}" -type f -name "resources.pak" -exec dirname {} + | head -n 1)
117 cp -a "${_app_dir}/resources/". "${pkgdir}/usr/lib/${pkgname%-git}/"
118 install -Dm644 "${srcdir}/${pkgname//-/.}/publish/icon.png" "${pkgdir}/usr/share/pixmaps/${pkgname%-git}.png"
119 install -Dm644 "${srcdir}/${pkgname//-/.}/${pkgname%-git}.desktop" -t "${pkgdir}/usr/share/applications"
120 install -Dm644 "${srcdir}/${pkgname//-/.}/LICENSE" -t "${pkgdir}/usr/share/licenses/${pkgname}"
121}
122

Changes since previous scan

--- PKGBUILD @ 2026-08-31 00:19
+++ PKGBUILD @ 2026-09-17 00:27
@@ -1,9 +1,9 @@
# Maintainer: zxp19821005 <zxp19821005 at 163 dot com>
pkgname=netron-git
_pkgname=Netron
-pkgver=9.1.4.r2.ge52a558
-_electronversion=43
-_nodeversion=26
+pkgver=9.2.4.r0.g065e09e
+_electronversion=44
+_nodeversion=24.15
pkgrel=1
pkgdesc="Visualizer for neural network, deep learning and machine learning models.(Use system-wide electron)"
arch=('any')
@@ -53,7 +53,7 @@
nvm use "${_nodeversion}"
}
_set_build_env() {
- export electronDist="/usr/lib/electron${_electronversion}"
+ export ELECTRON_DIST="/usr/lib/electron${_electronversion}"
export ELECTRON_SKIP_BINARY_DOWNLOAD=1
export SYSTEM_ELECTRON_VERSION="$(electron${_electronversion} -v | sed 's/v//g')"
export HOME="${srcdir}/.electron-gyp"
@@ -108,7 +108,7 @@
python -m venv .venv
export PATH="${PWD}/.venv/bin:${PATH}"
NODE_ENV=production npm run build python
- NODE_ENV=production npm exec -c "electron-builder --linux dir -c.electronDist=${electronDist}"
+ NODE_ENV=production npm exec -c "electron-builder --linux dir -c.electronDist=${ELECTRON_DIST}"
}
package() {
install -Dm755 "${srcdir}/${pkgname%-git}.sh" "${pkgdir}/usr/bin/${pkgname%-git}"

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 05:44:47 Medium 1
2026-08-31 00:19:57 Low 2
2026-08-30 00:04:14 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