sorted-photography-git

LOW
maintainer zxp19821005 0 votes scanned 2026-11-01 00:21:48.120785
View on AUR
Why flagged

The flagged npm and npx usage installs and runs development/build tools (electron-packager) required to package the application from its own source; this is normal for building Electron apps and does not involve executing 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-2507) reviewed the full PKGBUILD and judged it LOW (confidence 95%): The flagged npm and npx usage installs and runs development/build tools (electron-packager) required to package the application from its own source; this is normal for building Electron apps and does not involve executing untrusted remote code.

2 higher static findings superseded - not the current verdict (shown for transparency)
Medium npm/yarn/pnpm install of an undeclared external package npm_install_external

Runs `npm/yarn/pnpm install <package>` for a package not in source=(), pulling unpinned, unreviewed code at build time. Severity downgraded: the package declares/looks like a Node.js consumer, where build-time installs are expected.

  • PKGBUILD:91 npm add -D @electron/packager
  • PKGBUILD:93 NODE_ENV=development npm add -D @electron/packager
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:99 NODE_ENV=production npx electron-packager . --platform=linux --electron-dist-source=${ELECTRON_DIST} --overwrite --asar --no-prune --deref-symlinks=false --out=out

PKGBUILD

3 offending line(s) highlighted
1# Maintainer: zxp19821005 <zxp19821005 at 163 dot com>
2pkgname=sorted-photography-git
3_pkgname='Sorted Photography'
4pkgver=2.1.0.r0.g9ffdb8f
5_electronversion=36
6_nodeversion=20
7pkgrel=1
8pkgdesc="Rename images and videos to 'mmddyyyy_hhmm_originalfilename' format using exif data and moment-timezones. Working: jpg, png, heic, cr2, mov."
9arch=('any')
10url="https://github.com/trumanjchan/sorted-photography"
11license=('MIT')
12provides=("${pkgname%-git}=${pkgver%.r*}")
13conflicts=("${pkgname%-git}")
14depends=(
15 "electron${_electronversion}"
16)
17makedepends=(
18 'npm'
19 'nvm'
20 'git'
21 'curl'
22 'gendesk'
23 'jq'
24)
25source=(
26 "${pkgname%-git}.git::git+${url}.git"
27 "${pkgname%-git}.png"
28 "${pkgname%-git}.sh"
29)
30sha256sums=('SKIP'
31 '428400f9ca36e62132dae382a5f99d467623ee2ed2d814131eb5373085da308b'
32 'a774c2f54fbbeeaac3cefc0f7250796d30c86d27f0fd40b7eaf9c0fdb021623d')
33pkgver() {
34 cd "${srcdir}/${pkgname%-git}.git"
35 set -o pipefail
36 git describe --long --tags --abbrev=7 | sed 's/\([^-]*-g\)/r\1/;s/-/./g;s/v//g' ||
37 printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short=7 HEAD)"
38}
39_ensure_local_nvm() {
40 local NVM_DIR="${srcdir}/.nvm"
41 source /usr/share/nvm/init-nvm.sh || [[ $? != 1 ]]
42 nvm install "${_nodeversion}"
43 nvm use "${_nodeversion}"
44}
45_get_app_dir() {
46 find "${srcdir}" -type f -name "resources.pak" -exec dirname {} + | head -n 1
47}
48_get_electron_version() {
49 _elec_ver=$(find "${srcdir}" -maxdepth 5 -name "package.json" ! -path "*/node_modules/*" \
50 -exec grep -l '"electron"' {} + | xargs -I{} jq -r '(.devDependencies.electron // .dependencies.electron) // empty' {} 2>/dev/null | head -1)
51 [[ -z "${_elec_ver}" ]] && return 1
52 echo -e "The electron version is: \033[1;31m${_elec_ver%%.*}\033[0m"
53}
54_set_build_env() {
55 export ELECTRON_DIST="/usr/lib/electron${_electronversion}"
56 export ELECTRON_SKIP_BINARY_DOWNLOAD=1
57 export SYSTEM_ELECTRON_VERSION="$(electron${_electronversion} -v | sed 's/v//g')"
58 export HOME="${srcdir}/.electron-gyp"
59 export NPM_CONFIG_CACHE="${srcdir}/.npm_cache"
60 export NPM_CONFIG_MAXSOCKETS=32
61 if [[ "$(curl -s ipinfo.io/country)" == *"CN"* ]]; then
62 {
63 export NPM_CONFIG_REGISTRY="https://registry.npmmirror.com"
64 export NODEJS_ORG_MIRROR="https://npmmirror.com/mirrors/node"
65 export ELECTRON_MIRROR="https://npmmirror.com/mirrors/electron/"
66 export ELECTRON_BUILDER_BINARIES_MIRROR="https://npmmirror.com/mirrors/electron-builder-binaries/"
67 }
68 find ./ -type f -name "package-lock.json" -exec sed -i "s/registry.npmjs.org/registry.npmmirror.com/g" {} +
69 fi
70}
71prepare() {
72 cd "${srcdir}/${pkgname%-git}.git"
73 _get_electron_version
74 sed -i -e "
75 s/@electronversion@/${_electronversion}/g
76 s/@appname@/${pkgname%-git}/g
77 s/@runname@/app.asar/g
78 s/@cfgdirname@/${pkgname%-git}/g
79 " "${srcdir}/${pkgname%-git}.sh"
80 gendesk -q -f -n \
81 --pkgname="${pkgname%-git}" \
82 --pkgdesc="${pkgdesc}" \
83 --categories="Graphics" \
84 --name="${_pkgname}" \
85 --exec="${pkgname%-git} %U"
86 _set_build_env
87 _ensure_local_nvm
88 cp "${srcdir}/${pkgname%-git}.png" icon.png
89 sed -i '/height: 400,/a\ icon: path.join(__dirname, "icon.png"),' main.js
90 sed -i "s/\"electron\": \"[^\"]*\"/\"electron\": \"${SYSTEM_ELECTRON_VERSION}\"/g" package.json
91 npm add -D @electron/packager
92 NODE_ENV=development npm install --legacy-peer-deps
93 NODE_ENV=development npm add -D @electron/packager
94}
95build() {
96 cd "${srcdir}/${pkgname%-git}.git"
97 _set_build_env
98 _ensure_local_nvm
99 NODE_ENV=production npx electron-packager . --platform=linux --electron-dist-source=${ELECTRON_DIST} --overwrite --asar --no-prune --deref-symlinks=false --out=out
100}
101package() {
102 install -Dm755 "${srcdir}/${pkgname%-git}.sh" "${pkgdir}/usr/bin/${pkgname%-git}"
103 install -Dm755 -d "${pkgdir}/usr/lib/${pkgname%-git}"
104 local _app_dir=$(_get_app_dir)
105 cp -a "${_app_dir}/resources/"* "${pkgdir}/usr/lib/${pkgname%-git}/"
106 install -Dm644 "${srcdir}/${pkgname%-git}.png" -t "${pkgdir}/usr/share/pixmaps"
107 install -Dm644 "${srcdir}/${pkgname%-git}.git/${pkgname%-git}.desktop" -t "${pkgdir}/usr/share/applications"
108 install -Dm644 "${srcdir}/${pkgname%-git}.git/README.md" -t "${pkgdir}/usr/share/licenses/${pkgname}"
109}

Scan history

Scanned at (UTC)SeverityRules
2026-11-01 00:21:48 Low 3
2026-10-31 00:07:41 Low 3
2026-10-30 00:29:30 Low 3
2026-10-29 00:13:55 Low 3
2026-10-28 00:06:54 Low 3
2026-10-27 00:23:28 Low 3
2026-10-26 00:12:40 Low 3
2026-10-25 00:20:48 Low 3
2026-10-24 00:14:55 Low 3
2026-10-23 00:02:19 Low 3
2026-10-22 00:13:10 Low 3
2026-10-21 00:12:50 Low 3
2026-10-20 00:10:31 Low 3
2026-10-19 00:03:55 Low 3
2026-10-18 00:06:55 Low 3
2026-10-17 00:21:55 Low 3
2026-10-16 00:12:47 Low 3
2026-10-15 00:28:05 Low 3
2026-10-14 00:06:47 Low 3
2026-10-13 00:23:45 Low 3

Report a package

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

0 / 4000
Your suggestion