soundcloud-rpc-git
maintainer zxp19821005
· 0 votes
· scanned 2026-08-03 00:08:14.047287
LOW
View on AUR ↗
Why flagged
The npx usage in build() runs 'tsc' and 'electron-builder' on the project's own source code, which is a normal part of building the application; these are standard development tools used in a typical Electron app build process.
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 npx usage in build() runs 'tsc' and 'electron-builder' on the project's own source code, which is a normal part of building the application; these are standard development tools used in a typical Electron app build process.
1 higher static finding superseded - not the current verdict (shown for transparency)
MEDIUM
npx/bunx/deno executes a remote package
remote_code_tool
`npx`/`bunx`/`pnpm dlx`/`deno run <url>` downloads AND runs a remote package at build time — the moral equivalent of piping a download into a shell. Severity downgraded: Node.js consumer context.
-
PKGBUILD:92
NODE_ENV=production npx tsc
PKGBUILD
1 offending line(s) highlighted
1
# Maintainer: zxp19821005 <zxp19821005 at 163 dot com>
2
_appname=soundcloud
3
pkgname="${_appname}-rpc-git"
4
pkgver=0.1.8.r0.gf021314
5
_electronversion=37
6
_nodeversion=22
7
pkgrel=1
8
pkgdesc="🎵 A SoundCloud Client with Discord Rich Presence, Dark Mode, Last.fm, and AdBlock Support.(Use system-wide electron)"
9
arch=('any')
10
url="https://github.com/richardhbtz/soundcloud-rpc"
11
license=('MIT')
12
conflicts=("${pkgname%-git}")
13
provides=("${pkgname%-git}=${pkgver%.r*}")
14
depends=(
15
"electron${_electronversion}"
16
)
17
makedepends=(
18
'gendesk'
19
'npm'
20
'nvm'
21
'git'
22
'curl'
23
'libicns'
24
'jq'
25
)
26
source=(
27
"${pkgname%-git}.git::git+${url}"
28
"${pkgname%-git}.sh"
29
)
30
sha256sums=('SKIP'
31
'a774c2f54fbbeeaac3cefc0f7250796d30c86d27f0fd40b7eaf9c0fdb021623d')
32
pkgver() {
33
cd "${srcdir}/${pkgname%-git}.git"
34
set -o pipefail
35
git describe --long --tags --abbrev=7 | sed 's/\([^-]*-g\)/r\1/;s/-/./g;s/v//g' ||
36
printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short=7 HEAD)"
37
}
38
_ensure_local_nvm() {
39
local NVM_DIR="${srcdir}/.nvm"
40
source /usr/share/nvm/init-nvm.sh || [[ $? != 1 ]]
41
nvm install "${_nodeversion}"
42
nvm use "${_nodeversion}"
43
}
44
_get_electron_version() {
45
_elec_ver=$(find "${srcdir}" -maxdepth 3 -name "package.json" ! -name "node_modules" \
46
-exec jq -r '.devDependencies.electron // empty' {} + 2>/dev/null | grep -v "^$" | head -n 1)
47
_elec_ver=$(echo "${_elec_ver}" | sed 's/[^0-9.]//g')
48
_main_ver=$(echo "${_elec_ver}" | cut -d. -f1)
49
echo -e "The electron version is: \033[1;31m${_main_ver}\033[0m"
50
}
51
prepare() {
52
cd "${srcdir}/${pkgname%-git}.git"
53
_get_electron_version
54
sed -i -e "
55
s/@electronversion@/${_electronversion}/g
56
s/@appname@/${pkgname%-git}/g
57
s/@runname@/app.asar/g
58
s/@cfgdirname@/${pkgname%-git}/g
59
s/@options@//g
60
" "${srcdir}/${pkgname%-git}.sh"
61
gendesk -q -f -n \
62
--pkgname="${pkgname%-git}" \
63
--pkgdesc="${pkgdesc}" \
64
--categories="Utility" \
65
--name="${pkgname%-git}" \
66
--exec="${pkgname%-git} %U"
67
export ELECTRON_SKIP_BINARY_DOWNLOAD=1
68
export SYSTEM_ELECTRON_VERSION="$(electron${_electronversion} -v | sed 's/v//g')"
69
local HOME="${srcdir}/.electron-gyp"
70
export NPM_CONFIG_CACHE="${srcdir}/.npm_cache"
71
export NPM_CONFIG_MAXSOCKETS=32
72
if [[ "$(curl -s ipinfo.io/country)" == *"CN"* ]]; then
73
{
74
export NPM_CONFIG_REGISTRY="https://registry.npmmirror.com"
75
export NPM_CONFIG_ELECTRON_MIRROR="https://registry.npmmirror.com/-/binary/electron/"
76
export NPM_CONFIG_ELECTRON_BUILDER_BINARIES_MIRROR="https://registry.npmmirror.com/-/binary/electron-builder-binaries/"
77
export NODEJS_ORG_MIRROR=https://npmmirror.com/mirrors/node
78
export ELECTRON_MIRROR=https://npmmirror.com/mirrors/electron/
79
export ELECTRON_BUILDER_BINARIES_MIRROR=https://npmmirror.com/mirrors/electron-builder-binaries/
80
}
81
find ./ -type f -name "package-lock.json" -exec sed -i "s/registry.npmjs.org/registry.npmmirror.com/g" {} +
82
fi
83
_ensure_local_nvm
84
sed -i "s/\"electron\": \"[^\"]*\"/\"electron\": \"${SYSTEM_ELECTRON_VERSION}\"/g" package.json
85
icns2png -d 32 -x "assets/icons/${_appname}-mac.icns" -o assets/icons
86
NODE_ENV=development npm install --leagcy-peer-deps
87
}
88
build() {
89
cd "${srcdir}/${pkgname%-git}.git"
90
_ensure_local_nvm
91
electronDist="/usr/lib/electron${_electronversion}"
92
NODE_ENV=production npx tsc
93
NODE_ENV=production npm run copy-header
94
NODE_ENV=production npm exec -c "electron-builder --linux dir -c.electronDist=${electronDist}"
95
}
96
package() {
97
install -Dm755 "${srcdir}/${pkgname%-git}.sh" "${pkgdir}/usr/bin/${pkgname%-git}"
98
install -Dm755 -d "${pkgdir}/usr/lib/${pkgname%-git}"
99
local _app_dir=$(find "${srcdir}" -type f -name "resources.pak" -exec dirname {} + | head -n 1)
100
cp -a "${_app_dir}/resources/". "${pkgdir}/usr/lib/${pkgname%-git}/"
101
install -Dm644 "${srcdir}/${pkgname%-git}.git/${pkgname%-git}.desktop" -t "${pkgdir}/usr/share/applications"
102
icon_sizes=(256x256 512x512 1024x1024)
103
for _icons in "${icon_sizes[@]}";do
104
install -Dm644 "${srcdir}/${pkgname%-git}.git/assets/icons/${_appname}-mac_${_icons}x32.png" \
105
"${pkgdir}/usr/share/icons/hicolor/${_icons}/apps/${pkgname%-git}.png"
106
done
107
install -Dm644 "${srcdir}/${pkgname%-git}.git/LICENSE" -t "${pkgdir}/usr/share/licenses/${pkgname}"
108
}
109
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 |