easy-player
maintainer zxp19821005
· 0 votes
· scanned 2026-08-03 00:08:14.047287
LOW
View on AUR ↗
Why flagged
The npm install runs within the build environment on the project's own source code from a declared git repository, which is a normal part of building an Electron app; the flagged 'external package' install is a standard development dependency resolved via npm, not an undeclared 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 90%): The npm install runs within the build environment on the project's own source code from a declared git repository, which is a normal part of building an Electron app; the flagged 'external package' install is a standard development dependency resolved via npm, not an undeclared 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:73
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
pkgname=easy-player
3
pkgver=0.1.4
4
_electronversion=25
5
_nodeversion=18
6
pkgrel=10
7
pkgdesc="Music Player-With Lyrics & Desktop Lyrics & Online Download Songs.(Use system-wide electron)简易的音乐播放器 - 附带歌词功能 & 桌面歌词 & 网络下载歌曲."
8
arch=('any')
9
url="https://github.com/CmarThaa/music_player"
10
license=('MIT')
11
conflicts=("${pkgname}")
12
depends=(
13
"electron${_electronversion}"
14
)
15
makedepends=(
16
'npm'
17
'nvm'
18
'gendesk'
19
'curl'
20
'icoutils'
21
'git'
22
)
23
source=(
24
"${pkgname}-${pkgver}::git+${url}#tag=v${pkgver}"
25
"${pkgname}.sh"
26
)
27
sha256sums=('a30ebc995037da58426a740e678d489a36aa004bed6ac6555a996653b6349b0e'
28
'291f50480f5a61bc9c68db7d44cd0412071128706baa868a9cb854f8779a1980')
29
_ensure_local_nvm() {
30
local NVM_DIR="${srcdir}/.nvm"
31
source /usr/share/nvm/init-nvm.sh || [[ $? != 1 ]]
32
nvm install "${_nodeversion}"
33
nvm use "${_nodeversion}"
34
}
35
prepare() {
36
cd "${srcdir}/${pkgname}-${pkgver}"
37
sed -i -e "
38
s/@electronversion@/${_electronversion}/g
39
s/@appname@/${pkgname}/g
40
s/@runname@/app.asar/g
41
s/@cfgdirname@/${pkgname}/g
42
s/@options@//g
43
" "${srcdir}/${pkgname}.sh"
44
_ensure_local_nvm
45
gendesk -q -f -n \
46
--pkgname="${pkgname}" \
47
--pkgdesc="${pkgdesc}" \
48
--categories="AudioVideo" \
49
--name="${pkgname}" \
50
--exec="${pkgname} %U"
51
export ELECTRON_SKIP_BINARY_DOWNLOAD=1
52
export SYSTEM_ELECTRON_VERSION="$(electron${_electronversion} -v | sed 's/v//g')"
53
HOME="${srcdir}/.electron-gyp"
54
{
55
echo -e '\n'
56
#echo 'build_from_source=true'
57
echo "cache=${srcdir}/.npm_cache"
58
echo "maxsockets=10"
59
} >> .npmrc
60
if [[ "$(curl -s ipinfo.io/country)" == *"CN"* ]]; then
61
{
62
echo 'registry=https://registry.npmmirror.com'
63
echo 'electron_mirror=https://registry.npmmirror.com/-/binary/electron/'
64
echo 'electron_builder_binaries_mirror=https://registry.npmmirror.com/-/binary/electron-builder-binaries/'
65
} >> .npmrc
66
find ./ -type f -name "package-lock.json" -exec sed -i "s/registry.npmjs.org/registry.npmmirror.com/g" {} +
67
fi
68
icotool -i 1 -x elcConfig/favico.ico -o "${pkgname}.png"
69
cp "${pkgname}.png" logo.png
70
sed -i '/frame: false,/a\ icon: path.join(__dirname, '\''logo.png'\''),' main.js
71
sed -i "s/\"electron\": \"[^\"]*\"/\"electron\": \"${SYSTEM_ELECTRON_VERSION}\"/g" package.json
72
NODE_ENV=development npm install
73
NODE_ENV=development npm add -D @electron-forge/plugin-local-electron
74
}
75
build() {
76
cd "${srcdir}/${pkgname}-${pkgver}"
77
local electronDist="/usr/lib/electron${_electronversion}"
78
sed -i -e "/^[[:space:]]*plugins:[[:space:]]*\[.*\$/a\\
79
{\\
80
name: \"@electron-forge/plugin-local-electron\",\\
81
config: {\\
82
electronPath: \"${electronDist}\"\\
83
}\\
84
}," forge.config.js
85
NODE_ENV=production npm run build
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}/${pkgname}.png" "${pkgdir}/usr/share/pixmaps/${pkgname}.png"
92
install -Dm644 "${srcdir}/${pkgname}-${pkgver}/${pkgname}.desktop" -t "${pkgdir}/usr/share/applications"
93
install -Dm644 "${srcdir}/${pkgname}-${pkgver}/package.json" -t "${pkgdir}/usr/share/licenses/${pkgname}"
94
}
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 |