bettersoundcloud
The npm install runs within the project's own source tree for building, which is normal AUR practice; the external package addition is declared in the PKGBUILD and part of the build process, not an undeclared dependency injection.
Triggered rules
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 project's own source tree for building, which is normal AUR practice; the external package addition is declared in the PKGBUILD and part of the build process, not an undeclared dependency injection.
1 higher static finding superseded - not the current verdict (shown for transparency)
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:80
NODE_ENV=development npm add -D @electron-forge/plugin-local-electron
PKGBUILD
1 offending line(s) highlighted# Maintainer: zxp19821005 <zxp19821005 at 163 dot com>
pkgname=bettersoundcloud
_pkgname=BetterSoundCloud
pkgver=0.7.1
_electronversion=32
_nodeversion=22
pkgrel=1
pkgdesc="A PC client of SoundCloud with improvement made using electronjs.(Use system-wide electron)"
arch=('any')
url="https://github.com/AlirezaKJ/BetterSoundCloud"
license=('MIT')
conflicts=("${pkgname}")
depends=(
"electron${_electronversion}"
)
makedepends=(
'gendesk'
'npm'
'nvm'
'curl'
'git'
'icoutils'
'jq'
)
source=(
"${pkgname}-${pkgver}::git+${url}#tag=V${pkgver}"
"${pkgname}.sh"
)
sha256sums=('077afce9b3798af59f20f2546925de032dbb9ba2cbe1f4748ac6ccb85969678b'
'a774c2f54fbbeeaac3cefc0f7250796d30c86d27f0fd40b7eaf9c0fdb021623d')
_ensure_local_nvm() {
local NVM_DIR="${srcdir}/.nvm"
source /usr/share/nvm/init-nvm.sh || [[ $? != 1 ]]
nvm install "${_nodeversion}"
nvm use "${_nodeversion}"
}
_get_electron_version() {
_elec_ver=$(find "${srcdir}" -maxdepth 5 -name "package.json" ! -path "*/node_modules/*" \
-exec grep -l '"electron"' {} + | xargs -I{} jq -r '(.devDependencies.electron // .dependencies.electron) // empty' {} 2>/dev/null | head -1)
[[ -z "${_elec_ver}" ]] && return 1
echo -e "The electron version is: \033[1;31m${_elec_ver%%.*}\033[0m"
}
prepare() {
cd "${srcdir}/${pkgname}-${pkgver}"
_get_electron_version
sed -i -e "
s/@electronversion@/${_electronversion}/g
s/@appname@/${pkgname}/g
s/@runname@/app.asar/g
s/@cfgdirname@/${pkgname}/g
" "${srcdir}/${pkgname}.sh"
gendesk -q -f -n \
--pkgname="${pkgname}" \
--pkgdesc="${pkgdesc}" \
--categories="AudioVideo" \
--name="${_pkgname}" \
--exec="${pkgname} %U"
export ELECTRON_SKIP_BINARY_DOWNLOAD=1
export SYSTEM_ELECTRON_VERSION="$(electron${_electronversion} -v | sed 's/v//g')"
local HOME="${srcdir}/.electron-gyp"
export NPM_CONFIG_CACHE="${srcdir}/.npm_cache"
export NPM_CONFIG_MAXSOCKETS=32
if [[ "$(curl -s ipinfo.io/country)" == *"CN"* ]]; then
{
export NPM_CONFIG_REGISTRY="https://registry.npmmirror.com"
export NPM_CONFIG_ELECTRON_MIRROR="https://registry.npmmirror.com/-/binary/electron/"
export NPM_CONFIG_ELECTRON_BUILDER_BINARIES_MIRROR="https://registry.npmmirror.com/-/binary/electron-builder-binaries/"
export NODEJS_ORG_MIRROR="https://npmmirror.com/mirrors/node"
export ELECTRON_MIRROR="https://npmmirror.com/mirrors/electron/"
export ELECTRON_BUILDER_BINARIES_MIRROR="https://npmmirror.com/mirrors/electron-builder-binaries/"
}
find ./ -type f -name "package-lock.json" -exec sed -i "s/registry.npmjs.org/registry.npmmirror.com/g" {} +
fi
_ensure_local_nvm
icotool -x app/lib/assets/icon.ico -o app/lib/assets
cp app/lib/assets/icon_1_128x128x32.png app/lib/assets/icon.png
sed -i "s/icon\.ico/icon\.png/g" main.js
sed -i "s/\"electron\": \"[^\"]*\"/\"electron\": \"${SYSTEM_ELECTRON_VERSION}\"/g" package.json
NODE_ENV=development npm install
NODE_ENV=development npm add -D @electron-forge/plugin-local-electron
}
build() {
cd "${srcdir}/${pkgname}-${pkgver}"
_ensure_local_nvm
local electronDist="/usr/lib/electron${_electronversion}"
sed -i -e "/^[[:space:]]*plugins:[[:space:]]*\[.*\$/a\\
{\\
name: \"@electron-forge/plugin-local-electron\",\\
config: {\\
electronPath: \"${electronDist}\"\\
}\\
}," forge.config.*
NODE_ENV=production npm run package
}
package() {
install -Dm755 "${srcdir}/${pkgname}.sh" "${pkgdir}/usr/bin/${pkgname}"
install -Dm755 -d "${pkgdir}/usr/lib/${pkgname}"
local _app_dir=$(find "${srcdir}" -type f -name "resources.pak" ! -path "*/node_modules/*" -exec dirname {} + | head -n 1)
cp -a "${_app_dir}/resources/". "${pkgdir}/usr/lib/${pkgname}/"
install -Dm644 "${srcdir}/${pkgname}-${pkgver}/${pkgname}.desktop" -t "${pkgdir}/usr/share/applications"
install -Dm644 "${srcdir}/${pkgname}-${pkgver}/app/lib/assets/icon.png" "${pkgdir}/usr/share/pixmaps/${pkgname}.png"
install -Dm644 "${srcdir}/${pkgname}-${pkgver}/package.json" -t "${pkgdir}/usr/share/licenses/${pkgname}"
}
Scan history
| Scanned at (UTC) | Severity | Rules |
|---|---|---|
| 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 |