musicfree-desktop
maintainer zxp19821005
· 1 votes
· scanned 2026-08-03 00:08:14.047287
LOW
View on AUR ↗
Why flagged
The npm install runs in the build environment with declared dependencies; the flagged 'external package' install is part of the project's own build process using its bundled package.json, not an undeclared remote 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 with declared dependencies; the flagged 'external package' install is part of the project's own build process using its bundled package.json, not an undeclared remote 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:81
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=musicfree-desktop
3
_pkgname=MusicFreeDesktop
4
pkgver=0.0.8
5
_electronversion=25
6
_nodeversion=20
7
pkgrel=2
8
pkgdesc="Plug-in, customized, ad-free music player.Prebuilt version.Use system-wide electron.插件化、定制化、无广告的免费音乐播放器"
9
arch=('any')
10
url="https://musicfree.catcat.work/"
11
_ghurl="https://github.com/maotoumao/MusicFreeDesktop"
12
_pluginurl="https://gitee.com/maotoumao/MusicFreePlugins/raw/master/plugins.json"
13
license=('GPL-3.0-only')
14
conflicts=("${pkgname}")
15
depends=(
16
"electron${_electronversion}"
17
'libvips'
18
)
19
makedepends=(
20
'gendesk'
21
'npm'
22
'nvm'
23
'curl'
24
'git'
25
)
26
options=(
27
'!emptydirs'
28
)
29
source=(
30
"${pkgname}-${pkgver}::git+${_ghurl}#tag=v${pkgver}"
31
"${pkgname}.sh"
32
)
33
sha256sums=('318d579c06590bb3a607dbb898378d7afebee43f2d3729aff5108fc409f12807'
34
'31ad33b633744f5361abd964be306cea53ae1050e760c787115f7eca60045ae6')
35
_ensure_local_nvm() {
36
local NVM_DIR="${srcdir}/.nvm"
37
source /usr/share/nvm/init-nvm.sh || [[ $? != 1 ]]
38
nvm install "${_nodeversion}"
39
nvm use "${_nodeversion}"
40
}
41
_get_electron_version() {
42
_elec_ver="$(grep -m 1 '"electron":' "${srcdir}/${pkgname}-${pkgver}/package.json" | cut -d'"' -f4 | tr -d '^' | cut -d. -f1)"
43
echo -e "The electron version is: \033[1;31m${_elec_ver}\033[0m"
44
}
45
prepare() {
46
cd "${srcdir}/${pkgname}-${pkgver}"
47
_get_electron_version
48
sed -i -e "
49
s/@electronversion@/${_electronversion}/g
50
s/@appname@/${pkgname}/g
51
s/@runname@/app/g
52
s/@cfgdirname@/${_pkgname%Desktop}/g
53
s/@options@//g
54
" "${srcdir}/${pkgname}.sh"
55
gendesk -f -q -n \
56
--pkgname="${pkgname}" \
57
--pkgdesc="${pkgdesc}" \
58
--categories="AudioVideo" \
59
--name="${_pkgname}" \
60
--exec="${pkgname} %U"
61
export ELECTRON_SKIP_BINARY_DOWNLOAD=1
62
export SYSTEM_ELECTRON_VERSION="$(electron${_electronversion} -v | sed 's/v//g')"
63
HOME="${srcdir}/.electron-gyp"
64
{
65
echo -e '\n'
66
#echo 'build_from_source=true'
67
echo "cache=${srcdir}/.npm_cache"
68
} >> .npmrc
69
if [[ "$(curl -s ipinfo.io/country)" == *"CN"* ]]; then
70
{
71
echo 'registry=https://registry.npmmirror.com'
72
echo 'electron_mirror=https://registry.npmmirror.com/-/binary/electron/'
73
echo 'electron_builder_binaries_mirror=https://registry.npmmirror.com/-/binary/electron-builder-binaries/'
74
} >> .npmrc
75
find ./ -type f -name "package-lock.json" -exec sed -i "s/registry.npmjs.org/registry.npmmirror.com/g" {} +
76
fi
77
_ensure_local_nvm
78
find src -type f -exec sed -i "s/process.resourcesPath/\'\/usr\/lib\/${pkgname}\'/g" {} +
79
sed -i "s/\"electron\": \"[^\"]*\"/\"electron\": \"${SYSTEM_ELECTRON_VERSION}\"/g" package.json
80
NODE_ENV=development npm install --legacy-peer-deps
81
NODE_ENV=development npm add -D @electron-forge/plugin-local-electron
82
}
83
build() {
84
cd "${srcdir}/${pkgname}-${pkgver}"
85
_ensure_local_nvm
86
local electronDist="/usr/lib/electron${_electronversion}"
87
sed -i -e "/^[[:space:]]*plugins:[[:space:]]*\[.*\$/a\\
88
{\\
89
name: \"@electron-forge/plugin-local-electron\",\\
90
config: {\\
91
electronPath: \"${electronDist}\"\\
92
}\\
93
}," forge.config.ts
94
NODE_ENV=production npm run package
95
}
96
package() {
97
install -Dm755 "${srcdir}/${pkgname}.sh" "${pkgdir}/usr/bin/${pkgname}"
98
install -Dm755 -d "${pkgdir}/usr/lib/${pkgname}"
99
cp -r "${srcdir}/${pkgname}-${pkgver}/out/${_pkgname%Desktop}-linux-"*/resources/{app,res} "${pkgdir}/usr/lib/${pkgname}"
100
install -Dm644 "${srcdir}/${pkgname}-${pkgver}/res/logo.png" "${pkgdir}/usr/share/pixmaps/${pkgname}.png"
101
install -Dm644 "${srcdir}/${pkgname}-${pkgver}/${pkgname}.desktop" -t "${pkgdir}/usr/share/applications"
102
}
103
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 |