perrito-ws
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 tagged git release; the added dev dependency is part of the build process and not an undeclared external payload.
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 npm install runs in the build environment on the project's own source from a tagged git release; the added dev dependency is part of the build process and not an undeclared external payload.
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:74
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>
2
_appname=perrito
3
pkgname="${_appname}-ws"
4
_pkgname=Perrito
5
pkgver=1.1.0
6
_electronversion=29
7
_nodeversion=20
8
pkgrel=5
9
pkgdesc="🐶 The fastest way to get a WebSocket server up and running"
10
arch=('any')
11
url="https://github.com/KAIKAKU-AI/perrito-ws"
12
license=("GPL-3.0-only")
13
conflicts=("${pkgname}")
14
provides=("${pkgname}")
15
depends=(
16
"electron${_electronversion}"
17
)
18
makedepends=(
19
'npm'
20
'git'
21
'nvm'
22
'gendesk'
23
'icoutils'
24
'curl'
25
)
26
source=(
27
"${pkgname}-${pkgver}::git+${url}#tag=v${pkgver}"
28
"${pkgname}.sh"
29
)
30
sha256sums=('7566faabd8ec62deeaecbec4b24fb43650f726a5db07479a882f9343e3c614df'
31
'291f50480f5a61bc9c68db7d44cd0412071128706baa868a9cb854f8779a1980')
32
_ensure_local_nvm() {
33
local NVM_DIR="${srcdir}/.nvm"
34
source /usr/share/nvm/init-nvm.sh || [[ $? != 1 ]]
35
nvm install "${_nodeversion}"
36
nvm use "${_nodeversion}"
37
}
38
prepare() {
39
cd "${srcdir}/${pkgname}-${pkgver}"
40
sed -i -e "
41
s/@electronversion@/${_electronversion}/g
42
s/@appname@/${pkgname}/g
43
s/@runname@/app.asar/g
44
s/@cfgdirname@/${_pkgname}/g
45
s/@options@/env ELECTRON_OZONE_PLATFORM_HINT=auto/g
46
" "${srcdir}/${pkgname}.sh"
47
_ensure_local_nvm
48
gendesk -q -f -n \
49
--pkgname="${pkgname%-git}" \
50
--pkgdesc="${pkgdesc}" \
51
--categories="Development" \
52
--name="${_pkgname}" \
53
--exec="${pkgname} %U"
54
export ELECTRON_SKIP_BINARY_DOWNLOAD=1
55
export SYSTEM_ELECTRON_VERSION="$(electron${_electronversion} -v | sed 's/v//g')"
56
HOME="${srcdir}/.electron-gyp"
57
{
58
echo -e '\n'
59
#echo 'build_from_source=true'
60
echo "cache=${srcdir}/.npm_cache"
61
} >> .npmrc
62
if [[ "$(curl -s ipinfo.io/country)" == *"CN"* ]]; then
63
{
64
echo 'registry=https://registry.npmmirror.com'
65
echo 'electron_mirror=https://registry.npmmirror.com/-/binary/electron/'
66
echo 'electron_builder_binaries_mirror=https://registry.npmmirror.com/-/binary/electron-builder-binaries/'
67
} >> .npmrc
68
find ./ -type f -name "package-lock.json" -exec sed -i "s/registry.npmjs.org/registry.npmmirror.com/g" {} +
69
fi
70
icotool -x public/"${_appname}.ico" -o public/"${_appname}.png"
71
sed -i "s/${_appname}\.ico/${_appname}\.png/g" src/main.ts
72
sed -i "s/\"electron\": \"[^\"]*\"/\"electron\": \"${SYSTEM_ELECTRON_VERSION}\"/g" package.json
73
NODE_ENV=development npm install
74
NODE_ENV=development npm add -D @electron-forge/plugin-local-electron
75
}
76
build() {
77
cd "${srcdir}/${pkgname}-${pkgver}"
78
local electronDist="/usr/lib/electron${_electronversion}"
79
sed -i -e "/^[[:space:]]*plugins:[[:space:]]*\[.*\$/a\\
80
{\\
81
name: \"@electron-forge/plugin-local-electron\",\\
82
config: {\\
83
electronPath: \"${electronDist}\"\\
84
}\\
85
}," forge.config.*
86
NODE_ENV=production npm run package
87
}
88
package() {
89
install -Dm755 "${srcdir}/${pkgname}.sh" "${pkgdir}/usr/bin/${pkgname}"
90
install -Dm644 "${srcdir}/${pkgname}-${pkgver}/out/${_pkgname}-linux-"*/resources/app.asar -t "${pkgdir}/usr/lib/${pkgname}"
91
install -Dm644 "${srcdir}/${pkgname}-${pkgver}/src/assets/images/logos/${_appname}-logo.svg" \
92
"${pkgdir}/usr/share/icons/hicolor/scalable/apps/${pkgname}.svg"
93
install -Dm644 "${srcdir}/${pkgname}-${pkgver}/${pkgname}.desktop" -t "${pkgdir}/usr/share/applications"
94
install -Dm644 "${srcdir}/${pkgname}-${pkgver}/LICENSE" -t "${pkgdir}/usr/share/licenses/${pkgname}"
95
}
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 |