poi-git

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

The npx command runs 'gulp build' on the project's own source from a git checkout, which is a normal build step; the code is not remotely fetched at runtime but built locally from version-controlled sources.

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 runs 'gulp build' on the project's own source from a git checkout, which is a normal build step; the code is not remotely fetched at runtime but built locally from version-controlled sources.

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:93 NODE_ENV=production npx gulp build

PKGBUILD

1 offending line(s) highlighted
1# Maintainer: zxp19821005 <zxp19821005 at 163 dot com>
2pkgname=poi-git
3pkgver=12.0.0.r1.g8778012
4_electronversion=44
5_nodeversion=24
6pkgrel=1
7pkgdesc="A scalable browser and tool set for Kantai Collection(KanColle).(Use system-wide electron)"
8arch=('any')
9url="https://poi.moe/"
10_ghurl="https://github.com/poooi/poi"
11license=('MIT')
12conflicts=("${pkgname%-git}")
13provides=("${pkgname%-git}=${pkgver%.r*}")
14depends=(
15 "electron${_electronversion}"
16)
17makedepends=(
18 'npm'
19 'git'
20 'nvm'
21 'gendesk'
22 'curl'
23 'jq'
24)
25source=(
26 "${pkgname//-/.}::git+${_ghurl}.git"
27 "${pkgname%-git}.sh"
28)
29sha256sums=('SKIP'
30 'a774c2f54fbbeeaac3cefc0f7250796d30c86d27f0fd40b7eaf9c0fdb021623d')
31pkgver() {
32 cd "${srcdir}/${pkgname//-/.}"
33 set -o pipefail
34 git describe --long --tags --abbrev=7 | sed 's/\([^-]*-g\)/r\1/;s/-/./g;s/v//g' ||
35 printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short=7 HEAD)"
36}
37_ensure_local_nvm() {
38 local NVM_DIR="${srcdir}/.nvm"
39 source /usr/share/nvm/init-nvm.sh || [[ $? != 1 ]]
40 nvm install "${_nodeversion}"
41 nvm use "${_nodeversion}"
42}
43_get_app_dir() {
44 find "${srcdir}" -type f -name "resources.pak" -exec dirname {} + | head -n 1
45}
46_get_electron_version() {
47 _elec_ver=$(find "${srcdir}" -maxdepth 5 -name "package.json" ! -path "*/node_modules/*" \
48 -exec grep -l '"electron"' {} + | xargs -I{} jq -r '(.devDependencies.electron // .dependencies.electron) // empty' {} 2>/dev/null | head -1)
49 [[ -z "${_elec_ver}" ]] && return 1
50 echo -e "The electron version is: \033[1;31m${_elec_ver%%.*}\033[0m"
51}
52_set_build_env() {
53 export ELECTRON_DIST="/usr/lib/electron${_electronversion}"
54 export ELECTRON_SKIP_BINARY_DOWNLOAD=1
55 export SYSTEM_ELECTRON_VERSION="$(electron${_electronversion} -v | sed 's/v//g')"
56 export HOME="${srcdir}/.electron-gyp"
57 export NPM_CONFIG_CACHE="${srcdir}/.npm_cache"
58 export NPM_CONFIG_MAXSOCKETS=32
59 if [[ "$(curl -s ipinfo.io/country)" == *"CN"* ]]; then
60 {
61 export NPM_CONFIG_REGISTRY="https://registry.npmmirror.com"
62 export NODEJS_ORG_MIRROR="https://npmmirror.com/mirrors/node"
63 export ELECTRON_MIRROR="https://npmmirror.com/mirrors/electron/"
64 export ELECTRON_BUILDER_BINARIES_MIRROR="https://npmmirror.com/mirrors/electron-builder-binaries/"
65 }
66 find ./ -type f -name "package-lock.json" -exec sed -i "s/registry.npmjs.org/registry.npmmirror.com/g" {} +
67 fi
68}
69prepare() {
70 cd "${srcdir}/${pkgname//-/.}"
71 _get_electron_version
72 sed -i -e "
73 s/@electronversion@/${_electronversion}/g
74 s/@appname@/${pkgname%-git}/g
75 s/@runname@/app.asar/g
76 s/@cfgdirname@/${pkgname%-git}/g
77 " -i "${srcdir}/${pkgname%-git}.sh"
78 gendesk -q -f -n \
79 --pkgname="${pkgname%-git}" \
80 --pkgdesc="${pkgdesc}" \
81 --categories="Utility" \
82 --name="${pkgname%-git}" \
83 --exec="${pkgname%-git} %U"
84 _set_build_env
85 _ensure_local_nvm
86 sed -i "s/\"electron\": \"[^\"]*\"/\"electron\": \"${SYSTEM_ELECTRON_VERSION}\"/g" package.json
87 NODE_ENV=development npm install
88}
89build() {
90 cd "${srcdir}/${pkgname//-/.}"
91 _set_build_env
92 _ensure_local_nvm
93 NODE_ENV=production npx gulp build
94 NODE_ENV=production npm exec -c "electron-builder --linux dir -c.electronDist=${ELECTRON_DIST} --config electron-builder.config.js"
95}
96package() {
97 install -Dm755 "${srcdir}/${pkgname%-git}.sh" "${pkgdir}/usr/bin/${pkgname%-git}"
98 install -Dm755 -d "${pkgdir}/usr/lib/${pkgname%-git}"
99 local _app_dir=$(_get_app_dir)
100 cp -a "${_app_dir}/resources/"* "${pkgdir}/usr/lib/${pkgname%-git}/"
101 rm -rf "${pkgdir}/usr/lib/${pkgname%-git}/default_app.asar"
102 _icon_sizes=(32x32 128x128 256x256 512x512 1024x1024)
103 for _icons in "${_icon_sizes[@]}";do
104 install -Dm644 "${srcdir}/${pkgname//-/.}/assets/icons/${pkgname%-git}_${_icons}.png" \
105 "${pkgdir}/usr/share/icons/hicolor/${_icons}/apps/${pkgname%-git}.png"
106 done
107 install -Dm644 "${srcdir}/${pkgname//-/.}/${pkgname%-git}.desktop" -t "${pkgdir}/usr/share/applications"
108 install -Dm644 "${srcdir}/${pkgname//-/.}/LICENSE" -t "${pkgdir}/usr/share/licenses/${pkgname}"
109}
110

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 00:19:57 Low 2
2026-08-30 00:04:14 Low 2
2026-08-29 00:29:17 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