joy-client-git
The `npx vite build` call runs vite from the locally installed node_modules (installed via npm install from the project's own package.json), not fetching a remote package at runtime; the rest of the build compiles the project's own git source with system electron, which is normal AUR packaging practice, though the CN-mirror redirect and SKIP'd checksum are minor quality concerns.
Triggered rules
zero_votes_recent
Uploaded within the last 14 days with 2 or fewer community votes — little peer review so far.
llm_review
The static rules flagged this MEDIUM, but an AI model (anthropic/claude-sonnet-4.6) reviewed the full PKGBUILD and judged it LOW (confidence 70%): The `npx vite build` call runs vite from the locally installed node_modules (installed via npm install from the project's own package.json), not fetching a remote package at runtime; the rest of the build compiles the project's own git source with system electron, which is normal AUR packaging practice, though the CN-mirror redirect and SKIP'd checksum are minor quality concerns.
1 higher static finding superseded - not the current verdict (shown for transparency)
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:105
NODE_ENV=production npx vite build
PKGBUILD
1 offending line(s) highlighted# Maintainer: zxp19821005 <zxp19821005 at 163 dot com>
pkgname=joy-client-git
_pkgname='Joy Client'
pkgver=0.8.3.r39.gdb72fac
_electronversion=30
_nodeversion=20
pkgrel=1
pkgdesc="Cliente que consome API Xtream feita com Electron e React."
arch=('any')
url="https://github.com/emanoelhenrick/Joy"
license=('Unlicense')
conflicts=("${pkgname%-git}")
provides=("${pkgname%-git}=${pkgver%.r*}")
depends=(
"electron${_electronversion}"
)
makedepends=(
'npm'
'nvm'
'git'
'curl'
'jq'
'zip'
)
source=(
"${pkgname%-git}.git::git+${url}"
"${pkgname%-git}.sh"
)
sha256sums=('SKIP'
'a774c2f54fbbeeaac3cefc0f7250796d30c86d27f0fd40b7eaf9c0fdb021623d')
pkgver() {
cd "${srcdir}/${pkgname%-git}.git"
set -o pipefail
git describe --long --tags --abbrev=7 | sed 's/\([^-]*-g\)/r\1/;s/-/./g;s/v//g' ||
printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short=7 HEAD)"
}
_ensure_local_nvm() {
local NVM_DIR="${srcdir}/.nvm"
source /usr/share/nvm/init-nvm.sh || [[ $? != 1 ]]
nvm install "${_nodeversion}"
nvm use "${_nodeversion}"
}
_get_app_dir() {
find "${srcdir}" -type f -name "resources.pak" -exec dirname {} + | head -n 1
}
_get_electron_version() {
_elec_ver=$(find "${srcdir}" -maxdepth 5 -name "package.json" ! -path "*/node_modules/*" \
-exec grep -l '"electron"' {} + | xargs -I{} jq -r '(.devDependencies.electron // .dependencies.electron) // empty' {} 2>/dev/null | head -1)
[[ -z "${_elec_ver}" ]] && return 1
echo -e "The electron version is: \033[1;31m${_elec_ver%%.*}\033[0m"
}
_set_build_env() {
export ELECTRON_DIST="/usr/lib/electron${_electronversion}"
export ELECTRON_SKIP_BINARY_DOWNLOAD=1
export SYSTEM_ELECTRON_VERSION="$(electron${_electronversion} -v | sed 's/v//g')"
export HOME="${srcdir}/.electron-gyp"
export NPM_CONFIG_CACHE="${srcdir}/.npm_cache"
export NPM_CONFIG_MAXSOCKETS=32
if [[ "$(curl -s ipinfo.io/country)" == *"CN"* ]]; then
{
export NPM_CONFIG_REGISTRY="https://registry.npmmirror.com"
export NODEJS_ORG_MIRROR="https://npmmirror.com/mirrors/node"
export ELECTRON_MIRROR="https://npmmirror.com/mirrors/electron/"
export ELECTRON_BUILDER_BINARIES_MIRROR="https://npmmirror.com/mirrors/electron-builder-binaries/"
}
find ./ -type f -name "package-lock.json" -exec sed -i "s/registry.npmjs.org/registry.npmmirror.com/g" {} +
fi
}
prepare() {
cd "${srcdir}/${pkgname%-git}.git"
_get_electron_version
sed -i -e "
s/@electronversion@/${_electronversion}/g
s/@appname@/${pkgname%-git}/g
s/@runname@/app.asar/g
s/@cfgdirname@/${pkgname%-git}/g
" "${srcdir}/${pkgname%-git}.sh"
cat > "${srcdir}/${pkgname%-git}.desktop" << EOF
[Desktop Entry]
Name=${_pkgname}
Exec=${pkgname%-git} %U
Type=Application
Categories=AudioVideo;
Comment=${pkgdesc}
EOF
_set_build_env
_ensure_local_nvm
sed -i "s/\"electron\": \"[^\"]*\"/\"electron\": \"${SYSTEM_ELECTRON_VERSION}\"/g" package.json
NODE_ENV=development npm install --legacy-peer-deps
local _v="${SYSTEM_ELECTRON_VERSION}"
local _zd="${srcdir}/electron-zips"
case "${CARCH}" in
aarch64) _arch=arm64 ;;
x86_64) _arch=x64 ;;
esac
local _zf="${_zd}/electron-v${_v}-linux-${_arch}.zip"
install -Dm755 -d "${_zd}"
( cd "${ELECTRON_DIST}" && zip -r -q -0 "${_zf}" . )
sed -i "/packagerConfig:[[:space:]]*{/a\\ electronZipDir: '${_zd}'," forge.config.*
}
build() {
cd "${srcdir}/${pkgname%-git}.git"
_set_build_env
_ensure_local_nvm
NODE_ENV=production npx vite build
NODE_ENV=production npm run package
}
package() {
install -Dm755 "${srcdir}/${pkgname%-git}.sh" "${pkgdir}/usr/bin/${pkgname%-git}"
install -Dm755 -d "${pkgdir}/usr/lib/${pkgname%-git}"
local _app_dir=$(_get_app_dir)
cp -a "${_app_dir}/resources/"* "${pkgdir}/usr/lib/${pkgname%-git}/"
install -Dm644 "${srcdir}/${pkgname%-git}.desktop" -t "${pkgdir}/usr/share/applications"
install -Dm644 "${srcdir}/${pkgname%-git}.git/public/icons/icon.png" "${pkgdir}/usr/share/pixmaps/${pkgname%-git}.png"
}
Scan history
| Scanned at (UTC) | Severity | Rules |
|---|---|---|
| 2026-09-10 05:22:27 | Low | 3 |
| 2026-09-10 05:20:15 | Medium | 2 |