iotas-notepad-git

maintainer zxp19821005 · 0 votes · scanned 2026-08-03 00:08:14.047287
LOW
View on AUR ↗
Why flagged The npm install runs in the build environment on the project's own source from a git repository; the added dev dependency is part of the build process using declared, version-pinned tooling, not an undeclared external remote code execution.

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 npm install runs in the build environment on the project's own source from a git repository; the added dev dependency is part of the build process using declared, version-pinned tooling, not an undeclared external remote code execution.

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:89 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=iotas-notepad-git
3_pkgname="Iota's Notepad"
4pkgver=1.2.2.r2.gadba695
5_electronversion=39
6_nodeversion=24
7pkgrel=1
8pkgdesc="A simple note-taking application built with Electron. It allows you to create, edit, and delete notes with a user-friendly interface.(Use system-wide electron)"
9arch=('any')
10url="https://github.com/vorlie/iotas-notepad"
11license=('MIT')
12conflicts=("${pkgname%-git}")
13provides=("${pkgname%-git}=${pkgver%.r*}")
14depends=(
15 "electron${_electronversion}"
16)
17makedepends=(
18 'gendesk'
19 'npm'
20 'nvm'
21 'git'
22 'curl'
23 'icoutils'
24 'jq'
25)
26options=(
27 '!emptydirs'
28)
29source=(
30 "${pkgname%-git}.git::git+${url}"
31 "${pkgname%-git}.sh"
32)
33sha256sums=('SKIP'
34 '31ad33b633744f5361abd964be306cea53ae1050e760c787115f7eca60045ae6')
35pkgver() {
36 cd "${srcdir}/${pkgname%-git}.git"
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_electron_version() {
48 _elec_ver=$(jq -r '.devDependencies["electron"] // .dependencies["electron"]' "${srcdir}/${pkgname%-git}.git/package.json" | tr -d '^')
49 _main_ver=$(echo "${_elec_ver}" | cut -d. -f1)
50 echo -e "The electron version is: \033[1;31m${_main_ver}\033[0m"
51}
52prepare() {
53 cd "${srcdir}/${pkgname%-git}.git"
54 _get_electron_version
55 sed -i -e "
56 s/@electronversion@/${_electronversion}/g
57 s/@appname@/${pkgname%-git}/g
58 s/@runname@/app/g
59 s/@cfgdirname@/${pkgname%-git}/g
60 s/@options@/env ELECTRON_OZONE_PLATFORM_HINT=auto/g
61 " "${srcdir}/${pkgname%-git}.sh"
62 gendesk -q -f -n \
63 --pkgname="${pkgname%-git}" \
64 --pkgdesc="${pkgdesc}" \
65 --categories="Utility" \
66 --name="${_pkgname}" \
67 --exec="${pkgname%-git} %U"
68 export SYSTEM_ELECTRON_VERSION="$(electron${_electronversion} -v | sed 's/v//g')"
69 HOME="${srcdir}/.electron-gyp"
70 {
71 echo -e '\n'
72 #echo 'build_from_source=true'
73 echo "cache=${srcdir}/.npm_cache"
74 echo "maxsockets=32"
75 } >> .npmrc
76 if [[ "$(curl -s ipinfo.io/country)" == *"CN"* ]]; then
77 {
78 export NPM_CONFIG_REGISTRY="https://registry.npmmirror.com"
79 export NPM_CONFIG_ELECTRON_MIRROR="https://registry.npmmirror.com/-/binary/electron/"
80 export NPM_CONFIG_ELECTRON_BUILDER_BINARIES_MIRROR="https://registry.npmmirror.com/-/binary/electron-builder-binaries/"
81 }
82 find ./ -type f -name "package-lock.json" -exec sed -i "s/registry.npmjs.org/registry.npmmirror.com/g" {} +
83 fi
84 _ensure_local_nvm
85 icotool -x assets/icon.ico -o assets
86 cp assets/icon_5_32x32x32.png assets/icon.png
87 sed -i "s/\"electron\": \"[^\"]*\"/\"electron\": \"${SYSTEM_ELECTRON_VERSION}\"/g" package.json
88 NODE_ENV=development npm install
89 NODE_ENV=development npm add -D @electron-forge/plugin-local-electron
90}
91build() {
92 cd "${srcdir}/${pkgname%-git}.git"
93 _ensure_local_nvm
94 export ELECTRON_SKIP_BINARY_DOWNLOAD=1
95 local electronDist="/usr/lib/electron${_electronversion}"
96 sed -i '/"makers": \[/i\
97 "plugins": [\
98 {\
99 "name": "@electron-forge/plugin-local-electron",\
100 "config": {\
101 "electronPath": "'"${electronDist}"'"\
102 }\
103 }\
104 ],' package.json
105 NODE_ENV=production npm run package
106}
107package() {
108 install -Dm755 "${srcdir}/${pkgname%-git}.sh" "${pkgdir}/usr/bin/${pkgname%-git}"
109 install -Dm755 -d "${pkgdir}/usr/lib/${pkgname%-git}"
110 find "${srcdir}/${pkgname%-git}.git/out/${pkgname%-git}-linux-"*"/resources" -maxdepth 1 -type f -exec install -Dm644 -t "${pkgdir}/usr/lib/${pkgname%-git}" {} +
111 if find "${srcdir}/${pkgname%-git}.git/out/${pkgname%-git}-linux-"*"/resources" -mindepth 1 -maxdepth 1 -type d | read; then
112 for _subdir in "${srcdir}/${pkgname%-git}.git/out/${pkgname%-git}-linux-"*"/resources/"*; do
113 if [ -d "${_subdir}" ]; then
114 cp -Pr --no-preserve=ownership "${_subdir}" "${pkgdir}/usr/lib/${pkgname%-git}"
115 fi
116 done
117 fi
118 install -Dm644 "${srcdir}/${pkgname%-git}.git/${pkgname%-git}.desktop" -t "${pkgdir}/usr/share/applications"
119 icon_sizes=(16x16 32x32 48x48 64x64 128x128 256x256)
120 for _icons in "${icon_sizes[@]}";do
121 install -Dm644 "${srcdir}/${pkgname%-git}.git/assets/icon_"*_"${_icons}"*.png \
122 "${pkgdir}/usr/share/icons/hicolor/${_icons}/apps/${pkgname%-git}.png"
123 done
124 install -Dm644 "${srcdir}/${pkgname%-git}.git/LICENSE" -t "${pkgdir}/usr/share/licenses/${pkgname}"
125}
126

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