autorecord-manager
maintainer zxp19821005
· 0 votes
· scanned 2026-08-03 00:08:14.047287
LOW
View on AUR ↗
Why flagged
The npx commands in build() are used to run build tools (turbo, electron-vite, electron-builder) on the project's own source code, which is fetched from the official GitHub repository and verified via git tag; this is normal for Electron applications and does not execute untrusted remote code.
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 commands in build() are used to run build tools (turbo, electron-vite, electron-builder) on the project's own source code, which is fetched from the official GitHub repository and verified via git tag; this is normal for Electron applications and does not execute untrusted remote code.
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:97
NODE_ENV=production npx turbo run build --filter=@autorecord/electron^... -
PKGBUILD:99
NODE_ENV=production npx electron-vite build
PKGBUILD
2 offending line(s) highlighted
1
# Maintainer: zxp19821005 <zxp19821005 at 163 dot com>
2
pkgname=autorecord-manager
3
_pkgname='LAR 直播自动录制'
4
_appname=LiveAutoRecord
5
pkgver=4.11.0
6
_electronversion=40
7
_nodeversion=24
8
pkgrel=1
9
pkgdesc="Electron-based Automatic Recording Software for Multi-platform Live Broadcast.(Use system-wide electron)基于 Electron 的多平台直播自动录制软件"
10
arch=('x86_64')
11
url="https://github.com/WhiteMinds/LiveAutoRecord"
12
license=('LGPL-3.0-only')
13
conflicts=("${pkgname}")
14
depends=(
15
"electron${_electronversion}"
16
'ffmpeg'
17
)
18
makedepends=(
19
'gendesk'
20
'nvm'
21
'npm'
22
'pnpm'
23
'git'
24
'curl'
25
'jq'
26
)
27
options=(
28
'!strip'
29
)
30
source=(
31
"${pkgname}-${pkgver}::git+${url}#tag=v${pkgver}"
32
"${pkgname}.sh"
33
)
34
sha256sums=('cd605a0b77620792bc2a7924431e18753783b9ba196e6fab2d97110588e4811b'
35
'31ad33b633744f5361abd964be306cea53ae1050e760c787115f7eca60045ae6')
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}-${pkgver}/apps/electron/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}-${pkgver}"
49
_get_electron_version
50
sed -i -e "
51
s/@electronversion@/${_electronversion}/g
52
s/@appname@/${pkgname}/g
53
s/@runname@/app.asar/g
54
s/@cfgdirname@/@autorecord/g
55
s/@options@//g
56
" -i "${srcdir}/${pkgname}.sh"
57
gendesk -f -n -q \
58
--pkgname="${pkgname}" \
59
--pkgdesc="${pkgdesc}" \
60
--categories="Utility" \
61
--name="${_pkgname}" \
62
--exec="${pkgname} %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 'link-workspace-packages=true'
70
echo 'fetch-retry-maxtimeout=10000'
71
echo "cache-dir=${srcdir}/.pnpm_cache"
72
echo "store-dir=${srcdir}/.pnpm_store"
73
echo "virtual-store-dir=${srcdir}/.pnpm_store"
74
echo "shamefully-hoist=true"
75
echo "virtual-store-dir-max-length=80"
76
echo "node-linker=hoisted"
77
echo "network-concurrency=32"
78
} >> .npmrc
79
if [[ "$(curl -s ipinfo.io/country)" == *"CN"* ]]; then
80
{
81
echo 'registry=https://registry.npmmirror.com'
82
echo 'electron_mirror=https://cdn.npmmirror.com/binaries/electron/'
83
echo 'electron_builder_binaries_mirror=https://npmmirror.com/mirrors/electron-builder-binaries/'
84
} >> .npmrc
85
fi
86
_ensure_local_nvm
87
sed -i -e "
88
s/\/\${version}//g
89
s/\"electron\": \"[^\"]*\"/\"electron\": \"${SYSTEM_ELECTRON_VERSION}\"/g
90
" apps/electron/package.json
91
NODE_ENV=development pnpm install --no-lockfile
92
}
93
build() {
94
cd "${srcdir}/${pkgname}-${pkgver}"
95
_ensure_local_nvm
96
local electronDist="/usr/lib/electron${_electronversion}"
97
NODE_ENV=production npx turbo run build --filter=@autorecord/electron^...
98
cd "${srcdir}/${pkgname}-${pkgver}/apps/electron"
99
NODE_ENV=production npx electron-vite build
100
NODE_ENV=production pnpm -c exec "electron-builder --linux dir -c.electronDist=${electronDist}"
101
ln -sf "/usr/bin/ffmpeg" "${srcdir}/${pkgname}-${pkgver}/apps/electron/build/linux-unpacked/resources/app.asar.unpacked/node_modules/ffmpeg-static/ffmpeg"
102
}
103
package() {
104
install -Dm755 "${srcdir}/${pkgname}.sh" "${pkgdir}/usr/bin/${pkgname}"
105
find "${srcdir}/${pkgname}-${pkgver}/apps/electron/build/linux-unpacked/" -type f -name "*.asar" -exec install -Dm644 -t "${pkgdir}/usr/lib/${pkgname}" {} +
106
if find "${srcdir}/${pkgname}-${pkgver}/apps/electron/build/linux-unpacked/resources" -mindepth 1 -maxdepth 1 -type d | read; then
107
for subdir in "${srcdir}/${pkgname}-${pkgver}/apps/electron/build/linux-unpacked/resources/"*; do
108
if [ -d "${subdir}" ]; then
109
cp -Pr --no-preserve=ownership "${subdir}" "${pkgdir}/usr/lib/${pkgname%-bin}"
110
fi
111
done
112
fi
113
install -Dm644 "${srcdir}/${pkgname}-${pkgver}/apps/electron/build/icons/256x256.png" "${pkgdir}/usr/share/pixmaps/${pkgname}.png"
114
install -Dm644 "${srcdir}/${pkgname}-${pkgver}/${pkgname}.desktop" -t "${pkgdir}/usr/share/applications"
115
install -Dm644 "${srcdir}/${pkgname}-${pkgver}/LICENSE" -t "${pkgdir}/usr/share/licenses/${pkgname}"
116
}
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 |