poi-git
maintainer zxp19821005
· 0 votes
· scanned 2026-08-03 00:08:14.047287
LOW
View on AUR ↗
Why flagged
The npx command is used to run 'gulp build' and 'electron-builder', which are standard build tools for the project's own source code from a trusted git repository, posing no remote code execution 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 90%): The npx command is used to run 'gulp build' and 'electron-builder', which are standard build tools for the project's own source code from a trusted git repository, posing no remote code execution 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:87
NODE_ENV=production npx gulp build
PKGBUILD
1 offending line(s) highlighted
1
# Maintainer: zxp19821005 <zxp19821005 at 163 dot com>
2
pkgname=poi-git
3
pkgver=11.1.0.r0.g234f023
4
_electronversion=38
5
_nodeversion=22
6
pkgrel=1
7
pkgdesc="A scalable browser and tool set for Kantai Collection(KanColle).(Use system-wide electron)"
8
arch=('any')
9
url="https://poi.moe/"
10
_ghurl="https://github.com/poooi/poi"
11
license=('MIT')
12
conflicts=("${pkgname%-git}")
13
provides=("${pkgname%-git}=${pkgver%.r*}")
14
depends=(
15
"electron${_electronversion}"
16
)
17
makedepends=(
18
'npm'
19
'git'
20
'nvm'
21
'gendesk'
22
'curl'
23
)
24
source=(
25
"${pkgname//-/.}::git+${_ghurl}.git"
26
"${pkgname%-git}.sh"
27
)
28
sha256sums=('SKIP'
29
'31ad33b633744f5361abd964be306cea53ae1050e760c787115f7eca60045ae6')
30
pkgver() {
31
cd "${srcdir}/${pkgname//-/.}"
32
set -o pipefail
33
git describe --long --tags --abbrev=7 | sed 's/\([^-]*-g\)/r\1/;s/-/./g;s/v//g' ||
34
printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short=7 HEAD)"
35
}
36
_ensure_local_nvm() {
37
local NVM_DIR="${srcdir}/.nvm"
38
source /usr/share/nvm/init-nvm.sh || [[ $? != 1 ]]
39
nvm install "${_nodeversion}"
40
nvm use "${_nodeversion}"
41
}
42
_get_electron_version() {
43
_elec_ver="$(grep -m 1 '"electron":' "${srcdir}/${pkgname//-/.}/package.json" | cut -d'"' -f4 | tr -d '^' | cut -d. -f1)"
44
echo -e "The electron version is: \033[1;31m${_elec_ver}\033[0m"
45
}
46
prepare() {
47
cd "${srcdir}/${pkgname//-/.}"
48
_get_electron_version
49
sed -i -e "
50
s/@electronversion@/${_electronversion}/g
51
s/@appname@/${pkgname%-git}/g
52
s/@runname@/app.asar/g
53
s/@cfgdirname@/${pkgname%-git}/g
54
s/@options@/env ELECTRON_OZONE_PLATFORM_HINT=auto/g
55
" -i "${srcdir}/${pkgname%-git}.sh"
56
gendesk -q -f -n \
57
--pkgname="${pkgname%-git}" \
58
--pkgdesc="${pkgdesc}" \
59
--categories="Utility" \
60
--name="${pkgname%-git}" \
61
--exec="${pkgname%-git} %U"
62
export ELECTRON_SKIP_BINARY_DOWNLOAD=1
63
export SYSTEM_ELECTRON_VERSION="$(electron${_electronversion} -v | sed 's/v//g')"
64
HOME="${srcdir}/.electron-gyp"
65
{
66
echo -e '\n'
67
#echo 'build_from_source=true'
68
echo "cache=${srcdir}/.npm_cache"
69
echo "maxsockets=10"
70
} >> .npmrc
71
if [[ "$(curl -s ipinfo.io/country)" == *"CN"* ]]; then
72
{
73
echo 'registry=https://registry.npmmirror.com'
74
echo 'electron_mirror=https://registry.npmmirror.com/-/binary/electron/'
75
echo 'electron_builder_binaries_mirror=https://registry.npmmirror.com/-/binary/electron-builder-binaries/'
76
} >> .npmrc
77
find ./ -type f -name "package-lock.json" -exec sed -i "s/registry.npmjs.org/registry.npmmirror.com/g" {} +
78
fi
79
_ensure_local_nvm
80
sed -i "s/\"electron\": \"[^\"]*\"/\"electron\": \"${SYSTEM_ELECTRON_VERSION}\"/g" package.json
81
NODE_ENV=development npm install
82
}
83
build() {
84
cd "${srcdir}/${pkgname//-/.}"
85
_ensure_local_nvm
86
local electronDist="/usr/lib/electron${_electronversion}"
87
NODE_ENV=production npx gulp build
88
NODE_ENV=production npm exec -c "electron-builder --linux dir -c.electronDist=${electronDist} --config electron-builder.config.js"
89
}
90
package() {
91
install -Dm755 "${srcdir}/${pkgname%-git}.sh" "${pkgdir}/usr/bin/${pkgname%-git}"
92
install -Dm644 "${srcdir}/${pkgname//-/.}/dist/linux-"*/resources/app.asar -t "${pkgdir}/usr/lib/${pkgname%-git}"
93
_icon_sizes=(32x32 128x128 256x256 512x512 1024x1024)
94
for _icons in "${_icon_sizes[@]}";do
95
install -Dm644 "${srcdir}/${pkgname//-/.}/assets/icons/${pkgname%-git}_${_icons}.png" \
96
"${pkgdir}/usr/share/icons/hicolor/${_icons}/apps/${pkgname%-git}.png"
97
done
98
install -Dm644 "${srcdir}/${pkgname//-/.}/${pkgname%-git}.desktop" -t "${pkgdir}/usr/share/applications"
99
install -Dm644 "${srcdir}/${pkgname//-/.}/LICENSE" -t "${pkgdir}/usr/share/licenses/${pkgname}"
100
}
101
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 |