vrc-photo-viewer-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 clean.js) during build, not a remote package; this is normal build tooling for TypeScript projects.
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 command runs a local project script (ts-node clean.js) during build, not a remote package; this is normal build tooling for TypeScript projects.
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:75
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=vrc-photo-viewer-git
3
_pkgname="VRC Photo Viewer"
4
pkgver=2.2.0.r0.g7aa1a8b
5
_electronversion=34
6
_nodeversion=20
7
pkgrel=1
8
pkgdesc="This photo viewer displays photos based on a database created by VRChatActivityTools.(Use system-wide electron)"
9
arch=('any')
10
url="https://github.com/vayacico/vrc-photo-viewer"
11
license=('MIT')
12
conflicts=("${pkgname%-git}")
13
provides=("${pkgname%-git}=${pkgver%.r*}")
14
depends=(
15
"electron${_electronversion}"
16
)
17
makedepends=(
18
'npm'
19
'git'
20
'nvm'
21
'curl'
22
'cmake'
23
)
24
source=(
25
"${pkgname%-git}.git::git+${url}.git"
26
"${pkgname%-git}.sh")
27
sha256sums=('SKIP'
28
'291f50480f5a61bc9c68db7d44cd0412071128706baa868a9cb854f8779a1980')
29
pkgver() {
30
cd "${srcdir}/${pkgname%-git}.git"
31
set -o pipefail
32
git describe --long --tags --abbrev=7 | sed 's/\([^-]*-g\)/r\1/;s/-/./g;s/v//g' ||
33
printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short=7 HEAD)"
34
}
35
_ensure_local_nvm() {
36
local NVM_DIR="${srcdir}/.nvm"
37
source /usr/share/nvm/init-nvm.sh || [[ $? != 1 ]]
38
nvm install "${_nodeversion}"
39
nvm use "${_nodeversion}"
40
}
41
prepare() {
42
sed -i -e "
43
s/@electronversion@/${_electronversion}/g
44
s/@appname@/${pkgname%-git}/g
45
s/@runname@/app.asar/g
46
s/@cfgdirname@/${pkgname%-git}/g
47
s/@options@/env ELECTRON_OZONE_PLATFORM_HINT=auto/g
48
" "${srcdir}/${pkgname%-git}.sh"
49
_ensure_local_nvm
50
gendesk -q -f -n --categories="Game" --name="${_pkgname}" --exec="${pkgname%-git} %U"
51
cd "${srcdir}/${pkgname%-git}.git"
52
export ELECTRON_SKIP_BINARY_DOWNLOAD=1
53
export SYSTEM_ELECTRON_VERSION="$(electron${_electronversion} -v | sed 's/v//g')"
54
HOME="${srcdir}/.electron-gyp"
55
{
56
echo -e '\n'
57
#echo 'build_from_source=true'
58
echo "cache=${srcdir}/.npm_cache"
59
} >> .npmrc
60
if [[ "$(curl -s ipinfo.io/country)" == *"CN"* ]]; then
61
{
62
echo 'registry=https://registry.npmmirror.com'
63
echo 'electron_mirror=https://registry.npmmirror.com/-/binary/electron/'
64
echo 'electron_builder_binaries_mirror=https://registry.npmmirror.com/-/binary/electron-builder-binaries/'
65
} >> .npmrc
66
find ./ -type f -name "package-lock.json" -exec sed -i "s/registry.npmjs.org/registry.npmmirror.com/g" {} +
67
fi
68
find src -type f -exec sed -i "s/process.resourcesPath/\'\/usr\/lib\/${pkgname%-git}\'/g" {} +
69
sed -i "s/\"electron\": \"[^\"]*\"/\"electron\": \"${SYSTEM_ELECTRON_VERSION}\"/g" package.json
70
NODE_ENV=development npm install
71
}
72
build() {
73
cd "${srcdir}/${pkgname%-git}.git"
74
local electronDist="/usr/lib/electron${_electronversion}"
75
NODE_ENV=production npx ts-node ./.erb/scripts/clean.js dist
76
NODE_ENV=production npm run build
77
NODE_ENV=production npm exec -c "electron-builder build --linux dir -c.electronDist=${electronDist}"
78
}
79
package() {
80
install -Dm755 "${srcdir}/${pkgname%-git}.sh" "${pkgdir}/usr/bin/${pkgname%-git}"
81
install -Dm644 "${srcdir}/${pkgname%-git}.git/release/build/linux-"*/resources/app.asar -t "${pkgdir}/usr/lib/${pkgname%-git}"
82
cp -Pr --no-preserve=ownership "${srcdir}/${pkgname%-git}.git/release/build/linux-"*/resources/assets "${pkgdir}/usr/lib/${pkgname%-git}"
83
install -Dm644 "${srcdir}/${pkgname%-git}.git/assets/icon.png" "${pkgdir}/usr/share/pixmaps/${pkgname%-git}.png"
84
install -Dm644 "${srcdir}/${pkgname%-git}.desktop" -t "${pkgdir}/usr/share/applications"
85
install -Dm644 "${srcdir}/${pkgname%-git}.git/LICENSE" -t "${pkgdir}/usr/share/licenses/${pkgname}"
86
}
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 |