datefile

maintainer zxp19821005 · 0 votes · scanned 2026-08-03 00:08:14.047287
LOW
View on AUR ↗
Why flagged The npx electron-packager invocation is not fetching a remote package at build time in a dangerous way — electron-packager is installed as a dev dependency via 'npm install' from the project's package.json (which is sourced from the tagged git repo). npx here simply runs the locally-installed binary from node_modules/.bin. The source is a pinned git tag from the upstream GitHub repo with a verified sha256sum. The npm registry mirror switch for CN users is a common pattern in AUR packages and uses npmmirror.com (the official Chinese npm mirror). The overall pattern is a standard Electron app build using system electron. The main concern is the usual npm dependency chain risk (no lockfile enforcement), but this is low severity — sloppy/non-standard rather than a genuine supply-chain attack vector. No executed binaries from unofficial hosts, no obfuscation, no piracy.

Triggered rules

LOW AI review downgraded a static finding llm_review

The static rules flagged this MEDIUM, but an AI model (anthropic/claude-4.6-sonnet-20260217) reviewed the full PKGBUILD and judged it LOW (confidence 80%): The npx electron-packager invocation is not fetching a remote package at build time in a dangerous way — electron-packager is installed as a dev dependency via 'npm install' from the project's package.json (which is sourced from the tagged git repo). npx here simply runs the locally-installed binary from node_modules/.bin. The source is a pinned git tag from the upstream GitHub repo with a verified sha256sum. The npm registry mirror switch for CN users is a common pattern in AUR packages and uses npmmirror.com (the official Chinese npm mirror). The overall pattern is a standard Electron app build using system electron. The main concern is the usual npm dependency chain risk (no lockfile enforcement), but this is low severity — sloppy/non-standard rather than a genuine supply-chain attack vector. No executed binaries from unofficial hosts, no obfuscation, no piracy.

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:69 NODE_ENV=production npx electron-packager . "${_pkgname}" \

PKGBUILD

1 offending line(s) highlighted
1# Maintainer: zxp19821005 <zxp19821005 at 163 dot com>
2pkgname=datefile
3_pkgname=DateFile
4_appname=DateFIle
5pkgver=0.1.0
6_electronversion=25
7_nodeversion=18
8pkgrel=11
9pkgdesc="Index files in a directory using the date of another file as a filter.(Use system-wide electron)"
10arch=('any')
11url="https://github.com/kna40/DateFile"
12license=('MIT')
13conflicts=("${pkgname}")
14depends=(
15 "electron${_electronversion}"
16)
17makedepends=(
18 'curl'
19 'npm'
20 'nvm'
21 'gendesk'
22 'git'
23)
24source=(
25 "${pkgname}-${pkgver}::git+${url}#tag=v${pkgver}"
26 "${pkgname}.sh"
27)
28sha256sums=('ea4233f412e9b009109badb65c17ced62ac46f98bb68be6ef134e9a74da0242a'
29 '291f50480f5a61bc9c68db7d44cd0412071128706baa868a9cb854f8779a1980')
30_ensure_local_nvm() {
31 local NVM_DIR="${srcdir}/.nvm"
32 source /usr/share/nvm/init-nvm.sh || [[ $? != 1 ]]
33 nvm install "${_nodeversion}"
34 nvm use "${_nodeversion}"
35}
36prepare() {
37 sed -i -e "
38 s/@electronversion@/${_electronversion}/g
39 s/@appname@/${pkgname}/g
40 s/@runname@/app.asar/g
41 s/@cfgdirname@/${_appname}/g
42 s/@options@/env ELECTRON_OZONE_PLATFORM_HINT=auto/g
43 " -i "${srcdir}/${pkgname}.sh"
44 gendesk -f -n -q --pkgname="${pkgname}" --pkgdesc="${pkgdesc}" --categories="Utility" --name="${_pkgname}" --exec="${pkgname} %U"
45 _ensure_local_nvm
46 cd "${srcdir}/${pkgname}-${pkgver}"
47 export ELECTRON_SKIP_BINARY_DOWNLOAD=1
48 export SYSTEM_ELECTRON_VERSION="$(electron${_electronversion} -v | sed 's/v//g')"
49 HOME="${srcdir}/.electron-gyp"
50 {
51 echo -e '\n'
52 #echo 'build_from_source=true'
53 echo "cache=${srcdir}/.npm_cache"
54 echo "maxsockets=10"
55 } >> .npmrc
56 if [[ "$(curl -s ipinfo.io/country)" == *"CN"* ]]; then
57 {
58 echo 'registry=https://registry.npmmirror.com'
59 echo 'electron_mirror=https://registry.npmmirror.com/-/binary/electron/'
60 echo 'electron_builder_binaries_mirror=https://registry.npmmirror.com/-/binary/electron-builder-binaries/'
61 } >> .npmrc
62 find ./ -type f -name "package-lock.json" -exec sed -i "s/registry.npmjs.org/registry.npmmirror.com/g" {} +
63 fi
64 sed -i "s/\"electron\": \"[^\"]*\"/\"electron\": \"${SYSTEM_ELECTRON_VERSION}\"/g" package.json
65 NODE_ENV=development npm install
66}
67build() {
68 cd "${srcdir}/${pkgname}-${pkgver}"
69 NODE_ENV=production npx electron-packager . "${_pkgname}" \
70 --platform=linux \
71 --mode=production \
72 --out=./release \
73 --ignore=node_modules \
74 --ignore=mainDev.js \
75 --ignore=electron-builder.json \
76 --ingore=webpack.config.js \
77 --ingore=webpack.react.config.js \
78 --ingore=webpack.electron.config.js \
79 --icon=./assets/"${pkgname}.png" \
80 --asar
81}
82package() {
83 install -Dm755 "${srcdir}/${pkgname}.sh" "${pkgdir}/usr/bin/${pkgname}"
84 install -Dm644 "${srcdir}/${pkgname}-${pkgver}/release/${_pkgname}-linux-"*/resources/app.asar -t "${pkgdir}/usr/lib/${pkgname}"
85 install -Dm644 "${srcdir}/${pkgname}-${pkgver}/assets/${pkgname}.png" -t "${pkgdir}/usr/share/pixmaps"
86 install -Dm644 "${srcdir}/${pkgname}-${pkgver}/release/${_pkgname}-linux-"*/LICENSE* -t "${pkgdir}/usr/share/licenses/${pkgname}"
87 install -Dm644 "${srcdir}/${pkgname}.desktop" -t "${pkgdir}/usr/share/applications"
88}

Scan history

Scanned at (UTC)SeverityRules
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

Report a package

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

0 / 4000
Your suggestion