bili-music
The PKGBUILD installs and executes remote npm packages (@tauri-apps/cli via npm install and tauri via npx) without declaring them as dependencies, posing a supply-chain risk if the registry or package is compromised.
Triggered rules
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:83
npm install @tauri-apps/cli@^2
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:89
npx tauri build
llm_review
An AI model (qwen/qwen3-235b-a22b-2507) reviewed this and agrees it is MEDIUM (confidence 85%): The PKGBUILD installs and executes remote npm packages (@tauri-apps/cli via npm install and tauri via npx) without declaring them as dependencies, posing a supply-chain risk if the registry or package is compromised.
PKGBUILD
2 offending line(s) highlighted# Maintainer: zxp19821005 <zxp19821005 at 163 dot com>
pkgname=bili-music
_pkgname='Bili Music'
_zhsname='午夜黑胶'
pkgver=1.0.0
_nodeversion=24
pkgrel=1
pkgdesc="A no login, no disk B station music player. Use Bilibili as your music library, listen to music without login, do not have to download.一个免登录、不落盘的 B 站音乐播放器。把哔哩哔哩当作你的曲库,听歌不必登录,不必下载。"
arch=('any')
url="https://github.com/Jmiao11/bili-music"
license=('MIT')
provides=("${pkgname%-git}=${pkgver%.r*}")
conflicts=("${pkgname%-git}")
depends=(
'gtk3'
'gdk-pixbuf2'
'webkit2gtk-4.1'
'libappindicator'
)
makedepends=(
'git'
'rustup'
'gendesk'
'librsvg'
'npm'
'nvm'
'jq'
)
options=(
'!lto'
)
source=(
"${pkgname}-${pkgver}::git+${url}.git#tag=v${pkgver}"
)
sha256sums=('773016238b1ab736fdc3e679c9a2bda135a5647e34b5812e9bfee14321dc8250')
_get_project_dir() {
local d
while IFS= read -r d; do
find "$d" -name "src-tauri" ! -path "*/node_modules/*" 2>/dev/null | grep -q . && { echo "$d"; return; }
done < <(find "${srcdir}" -maxdepth 1 -mindepth 1 -type d ! -name '.*')
}
_get_app_dir() {
find "$(_get_project_dir)" -type d -name "release" -exec test -d "{}/.fingerprint" -a -d "{}/deps" \; -print -quit 2>/dev/null
}
_set_build_env() {
export HOME="${srcdir}/.home"
export CARGO_HOME="${HOME}/.cargo"
export CARGO_NET_GIT_FETCH_WITH_CLI=true
export CARGO_NET_RETRY=5
export CARGO_HTTP_MULTIPLEXING=false
export CARGO_INCREMENTAL=0
export CARGO_TERM_COLOR=never
export CARGO_PROFILE_RELEASE_STRIP=symbols
export XDG_CACHE_HOME="${HOME}/.cache"
export XDG_CONFIG_HOME="${HOME}/.config"
export XDG_DATA_HOME="${HOME}/.local/share"
export npm_config_cache="${HOME}/.npm_cache"
export COREPACK_NPM_REGISTRY="${COREPACK_NPM_REGISTRY:-${NPM_CONFIG_REGISTRY:-https://registry.npmjs.org}}"
export COREPACK_HOME="${HOME}/.corepack"
export npm_config_audit=false
mkdir -p "${HOME}" "${npm_config_cache}" "${COREPACK_HOME}" "${CARGO_HOME}"
}
_ensure_local_nvm() {
local NVM_DIR="${srcdir}/.nvm"
source /usr/share/nvm/init-nvm.sh || [[ $? != 1 ]]
nvm install "${_nodeversion}"
nvm use "${_nodeversion}"
}
prepare() {
cd "$(_get_project_dir)"
gendesk -q -f -n \
--pkgname="${pkgname}" \
--pkgdesc="${pkgdesc}" \
--categories="AudioVideo" \
--name="${_pkgname}" \
--custom=Name[zh_CN]="${_zhsname}" \
--exec="${pkgname} %U"
_ensure_local_nvm
_set_build_env
jq '.bundle.active = false' src-tauri/tauri.conf.json > tmp.json && mv tmp.json src-tauri/tauri.conf.json
rustup update stable
rustup default stable
npm install @tauri-apps/cli@^2
}
build() {
cd "$(_get_project_dir)"
_ensure_local_nvm
_set_build_env
npx tauri build
}
package() {
install -Dm755 "$(_get_app_dir)/"{"${pkgname}",guest_playurl_verify} -t "${pkgdir}/usr/bin"
install -Dm644 "$(_get_project_dir)/${pkgname}.desktop" -t "${pkgdir}/usr/share/applications"
install -Dm644 "$(_get_project_dir)/design/app-icon.png" "${pkgdir}/usr/share/icons/hicolor/512x512/apps/${pkgname}.png"
install -Dm644 "$(_get_project_dir)/LICENSE" -t "${pkgdir}/usr/share/licenses/${pkgname}"
}
Changes since previous scan
--- PKGBUILD @ 2026-10-26 00:12+++ PKGBUILD @ 2026-11-01 00:21@@ -2,7 +2,7 @@ pkgname=bili-music _pkgname='Bili Music' _zhsname='午夜黑胶'-pkgver=0.8.0+pkgver=1.0.0 _nodeversion=24 pkgrel=1 pkgdesc="A no login, no disk B station music player. Use Bilibili as your music library, listen to music without login, do not have to download.一个免登录、不落盘的 B 站音乐播放器。把哔哩哔哩当作你的曲库,听歌不必登录,不必下载。"@@ -19,12 +19,12 @@ ) makedepends=( 'git'- 'curl' 'rustup' 'gendesk' 'librsvg' 'npm' 'nvm'+ 'jq' ) options=( '!lto'@@ -32,12 +32,15 @@ source=( "${pkgname}-${pkgver}::git+${url}.git#tag=v${pkgver}" )-sha256sums=('b7d14db1110a9e26af6646875c574b4cd01e131006ab914a9e2706308b3f5229')+sha256sums=('773016238b1ab736fdc3e679c9a2bda135a5647e34b5812e9bfee14321dc8250') _get_project_dir() { local d while IFS= read -r d; do find "$d" -name "src-tauri" ! -path "*/node_modules/*" 2>/dev/null | grep -q . && { echo "$d"; return; } done < <(find "${srcdir}" -maxdepth 1 -mindepth 1 -type d ! -name '.*')+}+_get_app_dir() {+ find "$(_get_project_dir)" -type d -name "release" -exec test -d "{}/.fingerprint" -a -d "{}/deps" \; -print -quit 2>/dev/null } _set_build_env() { export HOME="${srcdir}/.home"@@ -74,6 +77,7 @@ --exec="${pkgname} %U" _ensure_local_nvm _set_build_env+ jq '.bundle.active = false' src-tauri/tauri.conf.json > tmp.json && mv tmp.json src-tauri/tauri.conf.json rustup update stable rustup default stable npm install @tauri-apps/cli@^2@@ -85,9 +89,9 @@ npx tauri build } package() {- local _app_dir="$(_get_project_dir)"- install -Dm755 "${_app_dir}/target/release/"{"${pkgname}",guest_playurl_verify} -t "${pkgdir}/usr/bin"- install -Dm644 "${_app_dir}/${pkgname}.desktop" -t "${pkgdir}/usr/share/applications"- install -Dm644 "${_app_dir}/design/app-icon.png" "${pkgdir}/usr/share/icons/hicolor/512x512/apps/${pkgname}.png"- install -Dm644 "${_app_dir}/LICENSE" -t "${pkgdir}/usr/share/licenses/${pkgname}"+ install -Dm755 "$(_get_app_dir)/"{"${pkgname}",guest_playurl_verify} -t "${pkgdir}/usr/bin"+ install -Dm644 "$(_get_project_dir)/${pkgname}.desktop" -t "${pkgdir}/usr/share/applications"+ install -Dm644 "$(_get_project_dir)/design/app-icon.png" "${pkgdir}/usr/share/icons/hicolor/512x512/apps/${pkgname}.png"+ install -Dm644 "$(_get_project_dir)/LICENSE" -t "${pkgdir}/usr/share/licenses/${pkgname}" }+Scan history
| Scanned at (UTC) | Severity | Rules |
|---|---|---|
| 2026-11-01 00:21:48 | Medium | 3 |
| 2026-10-31 00:07:41 | Medium | 3 |
| 2026-10-30 00:29:30 | Medium | 3 |
| 2026-10-29 00:13:55 | Medium | 3 |
| 2026-10-28 00:06:54 | Medium | 3 |
| 2026-10-27 00:23:28 | Medium | 3 |
| 2026-10-26 23:46:04 | Medium | 3 |
| 2026-10-26 00:12:40 | Medium | 3 |
| 2026-10-25 00:20:48 | Medium | 3 |
| 2026-10-24 00:14:55 | Medium | 3 |
| 2026-10-23 00:02:19 | Medium | 3 |
| 2026-10-22 00:13:10 | Medium | 3 |
| 2026-10-21 00:12:50 | Medium | 3 |
| 2026-10-20 00:10:31 | Medium | 3 |
| 2026-10-19 00:03:55 | Medium | 3 |
| 2026-10-18 00:06:55 | Medium | 3 |
| 2026-10-17 00:21:55 | Medium | 3 |
| 2026-10-16 00:12:47 | Medium | 3 |
| 2026-10-15 00:28:05 | Medium | 3 |
| 2026-10-14 00:06:47 | Medium | 3 |