bilive-danmaku-git
maintainer zxp19821005
· 0 votes
· scanned 2026-08-03 00:08:14.047287
LOW
View on AUR ↗
Why flagged
The npx command runs a local project script (ts-node ./.erb/scripts/clean.js) on source code from the official git repository, not a remote untrusted package.
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 npx command runs a local project script (ts-node ./.erb/scripts/clean.js) on source code from the official git repository, not a remote untrusted package.
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:88
NODE_ENV=production npx ts-node ./.erb/scripts/clean.js dist
PKGBUILD
1 offending line(s) highlighted
1
# Maintainer: zxp19821005 <zxp19821005 at 163 dot com>
2
pkgname=bilive-danmaku-git
3
pkgver=1.0.11.r0.g5861f8e
4
_electronversion=26
5
_nodeversion=18
6
pkgrel=1
7
pkgdesc="Bilibili live danmaku client.(Use system-wide electron)一个开源的 bilibili 直播弹幕姬."
8
arch=('any')
9
url="https://github.com/Beats0/bilive-danmaku"
10
license=('MIT')
11
conflicts=("${pkgname%-git}")
12
provides=("${pkgname%-git}=${pkgver%.r*}")
13
depends=(
14
"electron${_electronversion}"
15
)
16
makedepends=(
17
'npm'
18
'git'
19
'nvm'
20
'gendesk'
21
'curl'
22
'jq'
23
)
24
source=(
25
"${pkgname%-git}.git::git+${url}.git"
26
"${pkgname%-git}.sh"
27
)
28
sha256sums=('SKIP'
29
'31ad33b633744f5361abd964be306cea53ae1050e760c787115f7eca60045ae6')
30
pkgver() {
31
cd "${srcdir}/${pkgname%-git}.git"
32
set -o pipefail
33
git describe --long --tags --abbrev=7 | sed 's/\([^-]*-g\)/r\1/;s/-/./g;s/v//g' ||
34
printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short=7 HEAD)"
35
}
36
_ensure_local_nvm() {
37
local NVM_DIR="${srcdir}/.nvm"
38
source /usr/share/nvm/init-nvm.sh || [[ $? != 1 ]]
39
nvm install "${_nodeversion}"
40
nvm use "${_nodeversion}"
41
}
42
_get_electron_version() {
43
_elec_ver=$(jq -r '.devDependencies["electron"] // .dependencies["electron"]' "${srcdir}/${pkgname%-git}.git/package.json" | tr -d '^')
44
_main_ver=$(echo "${_elec_ver}" | cut -d. -f1)
45
echo -e "The electron version is: \033[1;31m${_main_ver}\033[0m"
46
}
47
prepare() {
48
cd "${srcdir}/${pkgname%-git}.git"
49
_get_electron_version
50
sed -i -e "
51
s/@electronversion@/${_electronversion}/g
52
s/@appname@/${pkgname%-git}/g
53
s/@runname@/app.asar/g
54
s/@cfgdirname@/${pkgname%-git}/g
55
s/@options@//g
56
" "${srcdir}/${pkgname%-git}.sh"
57
gendesk -q -f -n \
58
--pkgname="${pkgname%-git}" \
59
--pkgdesc="${pkgdesc}" \
60
--categories="Utility" \
61
--name="${pkgname%-git}" \
62
--exec="${pkgname%-git} %U"
63
export ELECTRON_SKIP_BINARY_DOWNLOAD=1
64
export SYSTEM_ELECTRON_VERSION="$(electron${_electronversion} -v | sed 's/v//g')"
65
HOME="${srcdir}/.electron-gyp"
66
{
67
echo -e '\n'
68
#echo 'build_from_source=true'
69
echo "cache=${srcdir}/.npm_cache"
70
} >> .npmrc
71
if [[ "$(curl -s ipinfo.io/country)" == *"CN"* ]]; then
72
{
73
echo 'registry=https://registry.npmmirror.com'
74
echo 'electron_mirror=https://registry.npmmirror.com/-/binary/electron/'
75
echo 'electron_builder_binaries_mirror=https://registry.npmmirror.com/-/binary/electron-builder-binaries/'
76
} >> .npmrc
77
find ./ -type f -name "package-lock.json" -exec sed -i "s/registry.npmjs.org/registry.npmmirror.com/g" {} +
78
fi
79
_ensure_local_nvm
80
find src -type f -exec sed -i "s/process.resourcesPath/\'\/usr\/lib\/${pkgname%-git}\'/g" {} +
81
sed -i "s/\"electron\": \"[^\"]*\"/\"electron\": \"${SYSTEM_ELECTRON_VERSION}\"/g" package.json
82
NODE_ENV=development npm install
83
}
84
build() {
85
cd "${srcdir}/${pkgname%-git}.git"
86
_ensure_local_nvm
87
local electronDist="/usr/lib/electron${_electronversion}"
88
NODE_ENV=production npx ts-node ./.erb/scripts/clean.js dist
89
NODE_ENV=production npm run build
90
NODE_ENV=production npm exec -c "electron-builder --linux dir -c.electronDist=${electronDist}"
91
}
92
package() {
93
install -Dm755 "${srcdir}/${pkgname%-git}.sh" "${pkgdir}/usr/bin/${pkgname%-git}"
94
install -Dm755 -d "${pkgdir}/usr/lib/${pkgname%-git}"
95
find "${srcdir}/${pkgname%-git}.git/release/build/linux-"*/"resources" -maxdepth 1 -type f -exec install -Dm644 -t "${pkgdir}/usr/lib/${pkgname%-git}" {} +
96
if find "${srcdir}/${pkgname%-git}.git/release/build/linux-"*/"resources" -mindepth 1 -maxdepth 1 -type d | read; then
97
for _subdir in "${srcdir}/${pkgname%-git}.git/release/build/linux-"*/"resources/"*; do
98
if [ -d "${_subdir}" ]; then
99
cp -Pr --no-preserve=ownership "${_subdir}" "${pkgdir}/usr/lib/${pkgname%-git}"
100
fi
101
done
102
fi
103
_icon_sizes=(16x16 24x24 32x32 48x48 64x64 128x128 256x256 512x512 1024x1024)
104
for _icons in "${_icon_sizes[@]}";do
105
install -Dm644 "${srcdir}/${pkgname%-git}.git/assets/icons/${_icons}.png" \
106
"${pkgdir}/usr/share/icons/hicolor/${_icons}/apps/${pkgname%-git}.png"
107
done
108
install -Dm644 "${srcdir}/${pkgname%-git}.desktop" -t "${pkgdir}/usr/share/applications"
109
install -Dm644 "${srcdir}/${pkgname%-git}.git/LICENSE" -t "${pkgdir}/usr/share/licenses/${pkgname}"
110
}
111
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 |