bettersoundcloud
maintainer zxp19821005
· 0 votes
· scanned 2026-08-03 00:08:14.047287
LOW
View on AUR ↗
Why flagged
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
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 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)
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:80
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=bettersoundcloud
3
_pkgname=BetterSoundCloud
4
pkgver=0.7.1
5
_electronversion=32
6
_nodeversion=22
7
pkgrel=1
8
pkgdesc="A PC client of SoundCloud with improvement made using electronjs.(Use system-wide electron)"
9
arch=('any')
10
url="https://github.com/AlirezaKJ/BetterSoundCloud"
11
license=('MIT')
12
conflicts=("${pkgname}")
13
depends=(
14
"electron${_electronversion}"
15
)
16
makedepends=(
17
'gendesk'
18
'npm'
19
'nvm'
20
'curl'
21
'git'
22
'icoutils'
23
'jq'
24
)
25
source=(
26
"${pkgname}-${pkgver}::git+${url}#tag=V${pkgver}"
27
"${pkgname}.sh"
28
)
29
sha256sums=('077afce9b3798af59f20f2546925de032dbb9ba2cbe1f4748ac6ccb85969678b'
30
'a774c2f54fbbeeaac3cefc0f7250796d30c86d27f0fd40b7eaf9c0fdb021623d')
31
_ensure_local_nvm() {
32
local NVM_DIR="${srcdir}/.nvm"
33
source /usr/share/nvm/init-nvm.sh || [[ $? != 1 ]]
34
nvm install "${_nodeversion}"
35
nvm use "${_nodeversion}"
36
}
37
_get_electron_version() {
38
_elec_ver=$(find "${srcdir}" -maxdepth 5 -name "package.json" ! -path "*/node_modules/*" \
39
-exec grep -l '"electron"' {} + | xargs -I{} jq -r '(.devDependencies.electron // .dependencies.electron) // empty' {} 2>/dev/null | head -1)
40
[[ -z "${_elec_ver}" ]] && return 1
41
echo -e "The electron version is: \033[1;31m${_elec_ver%%.*}\033[0m"
42
}
43
prepare() {
44
cd "${srcdir}/${pkgname}-${pkgver}"
45
_get_electron_version
46
sed -i -e "
47
s/@electronversion@/${_electronversion}/g
48
s/@appname@/${pkgname}/g
49
s/@runname@/app.asar/g
50
s/@cfgdirname@/${pkgname}/g
51
" "${srcdir}/${pkgname}.sh"
52
gendesk -q -f -n \
53
--pkgname="${pkgname}" \
54
--pkgdesc="${pkgdesc}" \
55
--categories="AudioVideo" \
56
--name="${_pkgname}" \
57
--exec="${pkgname} %U"
58
export ELECTRON_SKIP_BINARY_DOWNLOAD=1
59
export SYSTEM_ELECTRON_VERSION="$(electron${_electronversion} -v | sed 's/v//g')"
60
local HOME="${srcdir}/.electron-gyp"
61
export NPM_CONFIG_CACHE="${srcdir}/.npm_cache"
62
export NPM_CONFIG_MAXSOCKETS=32
63
if [[ "$(curl -s ipinfo.io/country)" == *"CN"* ]]; then
64
{
65
export NPM_CONFIG_REGISTRY="https://registry.npmmirror.com"
66
export NPM_CONFIG_ELECTRON_MIRROR="https://registry.npmmirror.com/-/binary/electron/"
67
export NPM_CONFIG_ELECTRON_BUILDER_BINARIES_MIRROR="https://registry.npmmirror.com/-/binary/electron-builder-binaries/"
68
export NODEJS_ORG_MIRROR="https://npmmirror.com/mirrors/node"
69
export ELECTRON_MIRROR="https://npmmirror.com/mirrors/electron/"
70
export ELECTRON_BUILDER_BINARIES_MIRROR="https://npmmirror.com/mirrors/electron-builder-binaries/"
71
}
72
find ./ -type f -name "package-lock.json" -exec sed -i "s/registry.npmjs.org/registry.npmmirror.com/g" {} +
73
fi
74
_ensure_local_nvm
75
icotool -x app/lib/assets/icon.ico -o app/lib/assets
76
cp app/lib/assets/icon_1_128x128x32.png app/lib/assets/icon.png
77
sed -i "s/icon\.ico/icon\.png/g" main.js
78
sed -i "s/\"electron\": \"[^\"]*\"/\"electron\": \"${SYSTEM_ELECTRON_VERSION}\"/g" package.json
79
NODE_ENV=development npm install
80
NODE_ENV=development npm add -D @electron-forge/plugin-local-electron
81
}
82
build() {
83
cd "${srcdir}/${pkgname}-${pkgver}"
84
_ensure_local_nvm
85
local electronDist="/usr/lib/electron${_electronversion}"
86
sed -i -e "/^[[:space:]]*plugins:[[:space:]]*\[.*\$/a\\
87
{\\
88
name: \"@electron-forge/plugin-local-electron\",\\
89
config: {\\
90
electronPath: \"${electronDist}\"\\
91
}\\
92
}," forge.config.*
93
NODE_ENV=production npm run package
94
}
95
package() {
96
install -Dm755 "${srcdir}/${pkgname}.sh" "${pkgdir}/usr/bin/${pkgname}"
97
install -Dm755 -d "${pkgdir}/usr/lib/${pkgname}"
98
local _app_dir=$(find "${srcdir}" -type f -name "resources.pak" ! -path "*/node_modules/*" -exec dirname {} + | head -n 1)
99
cp -a "${_app_dir}/resources/". "${pkgdir}/usr/lib/${pkgname}/"
100
install -Dm644 "${srcdir}/${pkgname}-${pkgver}/${pkgname}.desktop" -t "${pkgdir}/usr/share/applications"
101
install -Dm644 "${srcdir}/${pkgname}-${pkgver}/app/lib/assets/icon.png" "${pkgdir}/usr/share/pixmaps/${pkgname}.png"
102
install -Dm644 "${srcdir}/${pkgname}-${pkgver}/package.json" -t "${pkgdir}/usr/share/licenses/${pkgname}"
103
}
104
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 |