joy-client-git

LOW
maintainer zxp19821005 0 votes scanned 2026-09-10 05:22:27.145474
View on AUR
Why flagged

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

Low Few votes, recently uploaded zero_votes_recent

Uploaded within the last 14 days with 2 or fewer community votes — little peer review so far.

Low AI review downgraded a static finding 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)
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:105 NODE_ENV=production npx vite build

PKGBUILD

1 offending line(s) highlighted
1# Maintainer: zxp19821005 <zxp19821005 at 163 dot com>
2pkgname=joy-client-git
3_pkgname='Joy Client'
4pkgver=0.8.3.r39.gdb72fac
5_electronversion=30
6_nodeversion=20
7pkgrel=1
8pkgdesc="Cliente que consome API Xtream feita com Electron e React."
9arch=('any')
10url="https://github.com/emanoelhenrick/Joy"
11license=('Unlicense')
12conflicts=("${pkgname%-git}")
13provides=("${pkgname%-git}=${pkgver%.r*}")
14depends=(
15 "electron${_electronversion}"
16)
17makedepends=(
18 'npm'
19 'nvm'
20 'git'
21 'curl'
22 'jq'
23 'zip'
24)
25source=(
26 "${pkgname%-git}.git::git+${url}"
27 "${pkgname%-git}.sh"
28)
29sha256sums=('SKIP'
30 'a774c2f54fbbeeaac3cefc0f7250796d30c86d27f0fd40b7eaf9c0fdb021623d')
31pkgver() {
32 cd "${srcdir}/${pkgname%-git}.git"
33 set -o pipefail
34 git describe --long --tags --abbrev=7 | sed 's/\([^-]*-g\)/r\1/;s/-/./g;s/v//g' ||
35 printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short=7 HEAD)"
36}
37_ensure_local_nvm() {
38 local NVM_DIR="${srcdir}/.nvm"
39 source /usr/share/nvm/init-nvm.sh || [[ $? != 1 ]]
40 nvm install "${_nodeversion}"
41 nvm use "${_nodeversion}"
42}
43_get_app_dir() {
44 find "${srcdir}" -type f -name "resources.pak" -exec dirname {} + | head -n 1
45}
46_get_electron_version() {
47 _elec_ver=$(find "${srcdir}" -maxdepth 5 -name "package.json" ! -path "*/node_modules/*" \
48 -exec grep -l '"electron"' {} + | xargs -I{} jq -r '(.devDependencies.electron // .dependencies.electron) // empty' {} 2>/dev/null | head -1)
49 [[ -z "${_elec_ver}" ]] && return 1
50 echo -e "The electron version is: \033[1;31m${_elec_ver%%.*}\033[0m"
51}
52_set_build_env() {
53 export ELECTRON_DIST="/usr/lib/electron${_electronversion}"
54 export ELECTRON_SKIP_BINARY_DOWNLOAD=1
55 export SYSTEM_ELECTRON_VERSION="$(electron${_electronversion} -v | sed 's/v//g')"
56 export HOME="${srcdir}/.electron-gyp"
57 export NPM_CONFIG_CACHE="${srcdir}/.npm_cache"
58 export NPM_CONFIG_MAXSOCKETS=32
59 if [[ "$(curl -s ipinfo.io/country)" == *"CN"* ]]; then
60 {
61 export NPM_CONFIG_REGISTRY="https://registry.npmmirror.com"
62 export NODEJS_ORG_MIRROR="https://npmmirror.com/mirrors/node"
63 export ELECTRON_MIRROR="https://npmmirror.com/mirrors/electron/"
64 export ELECTRON_BUILDER_BINARIES_MIRROR="https://npmmirror.com/mirrors/electron-builder-binaries/"
65 }
66 find ./ -type f -name "package-lock.json" -exec sed -i "s/registry.npmjs.org/registry.npmmirror.com/g" {} +
67 fi
68}
69prepare() {
70 cd "${srcdir}/${pkgname%-git}.git"
71 _get_electron_version
72 sed -i -e "
73 s/@electronversion@/${_electronversion}/g
74 s/@appname@/${pkgname%-git}/g
75 s/@runname@/app.asar/g
76 s/@cfgdirname@/${pkgname%-git}/g
77 " "${srcdir}/${pkgname%-git}.sh"
78 cat > "${srcdir}/${pkgname%-git}.desktop" << EOF
79[Desktop Entry]
80Name=${_pkgname}
81Exec=${pkgname%-git} %U
82Type=Application
83Categories=AudioVideo;
84Comment=${pkgdesc}
85EOF
86 _set_build_env
87 _ensure_local_nvm
88 sed -i "s/\"electron\": \"[^\"]*\"/\"electron\": \"${SYSTEM_ELECTRON_VERSION}\"/g" package.json
89 NODE_ENV=development npm install --legacy-peer-deps
90 local _v="${SYSTEM_ELECTRON_VERSION}"
91 local _zd="${srcdir}/electron-zips"
92 case "${CARCH}" in
93 aarch64) _arch=arm64 ;;
94 x86_64) _arch=x64 ;;
95 esac
96 local _zf="${_zd}/electron-v${_v}-linux-${_arch}.zip"
97 install -Dm755 -d "${_zd}"
98 ( cd "${ELECTRON_DIST}" && zip -r -q -0 "${_zf}" . )
99 sed -i "/packagerConfig:[[:space:]]*{/a\\ electronZipDir: '${_zd}'," forge.config.*
100}
101build() {
102 cd "${srcdir}/${pkgname%-git}.git"
103 _set_build_env
104 _ensure_local_nvm
105 NODE_ENV=production npx vite build
106 NODE_ENV=production npm run package
107}
108package() {
109 install -Dm755 "${srcdir}/${pkgname%-git}.sh" "${pkgdir}/usr/bin/${pkgname%-git}"
110 install -Dm755 -d "${pkgdir}/usr/lib/${pkgname%-git}"
111 local _app_dir=$(_get_app_dir)
112 cp -a "${_app_dir}/resources/"* "${pkgdir}/usr/lib/${pkgname%-git}/"
113 install -Dm644 "${srcdir}/${pkgname%-git}.desktop" -t "${pkgdir}/usr/share/applications"
114 install -Dm644 "${srcdir}/${pkgname%-git}.git/public/icons/icon.png" "${pkgdir}/usr/share/pixmaps/${pkgname%-git}.png"
115}

Scan history

Scanned at (UTC)SeverityRules
2026-09-10 05:22:27 Low 3
2026-09-10 05:20:15 Medium 2

Report a package

Reports go to the AURWatch maintainer (one person) and are read by hand. No login required.

0 / 4000
Your suggestion