work-log-ify-git
maintainer zxp19821005
· 0 votes
· scanned 2026-08-03 00:08:14.047287
LOW
View on AUR ↗
Why flagged
The npx commands are used to run build tools (tsc, vite, electron-builder) on the project's own source code, which is a normal part of building a JavaScript project; the sources are from the project's own repository and the commands pose no additional risk.
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 commands are used to run build tools (tsc, vite, electron-builder) on the project's own source code, which is a normal part of building a JavaScript project; the sources are from the project's own repository and the commands pose no additional risk.
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:93
NODE_ENV=production npx tsc --noEmit -
PKGBUILD:94
NODE_ENV=production npx vite build
PKGBUILD
2 offending line(s) highlighted
1
# Maintainer: zxp19821005 <zxp19821005 at 163 dot com>
2
pkgname=work-log-ify-git
3
_pkgname=WorkLogIfy
4
pkgver=1.43.10.r0.gd55f7fa
5
_electronversion=42
6
_nodeversion=24
7
pkgrel=1
8
pkgdesc="Track your work.Spend less time on what's required, more time on what's important.(Use system-wide electron)"
9
arch=('any')
10
url="https://github.com/dmitrijs/WorkLogIfy"
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
'gendesk'
22
'curl'
23
'jq'
24
)
25
source=(
26
"${pkgname%-git}.git::git+${url}.git"
27
"${pkgname%-git}.sh"
28
)
29
sha256sums=('SKIP'
30
'a774c2f54fbbeeaac3cefc0f7250796d30c86d27f0fd40b7eaf9c0fdb021623d')
31
pkgver() {
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
_get_app_dir() {
38
find "${srcdir}" -type f -name "resources.pak" -exec dirname {} + | head -n 1
39
}
40
_set_build_env() {
41
export electronDist="/usr/lib/electron${_electronversion}"
42
export ELECTRON_SKIP_BINARY_DOWNLOAD=1
43
export SYSTEM_ELECTRON_VERSION="$(electron${_electronversion} -v | sed 's/v//g')"
44
export HOME="${srcdir}/.electron-gyp"
45
export NPM_CONFIG_CACHE="${srcdir}/.npm_cache"
46
export NPM_CONFIG_MAXSOCKETS=32
47
if [[ "$(curl -s ipinfo.io/country)" == *"CN"* ]]; then
48
{
49
export NPM_CONFIG_REGISTRY="https://registry.npmmirror.com"
50
export NODEJS_ORG_MIRROR="https://npmmirror.com/mirrors/node"
51
export ELECTRON_MIRROR="https://npmmirror.com/mirrors/electron/"
52
export ELECTRON_BUILDER_BINARIES_MIRROR="https://npmmirror.com/mirrors/electron-builder-binaries/"
53
}
54
find ./ -type f -name "package-lock.json" -exec sed -i "s/registry.npmjs.org/registry.npmmirror.com/g" {} +
55
fi
56
}
57
_ensure_local_nvm() {
58
local NVM_DIR="${srcdir}/.nvm"
59
source /usr/share/nvm/init-nvm.sh || [[ $? != 1 ]]
60
nvm install "${_nodeversion}"
61
nvm use "${_nodeversion}"
62
}
63
_get_electron_version() {
64
_elec_ver=$(find "${srcdir}" -maxdepth 5 -name "package.json" ! -path "*/node_modules/*" \
65
-exec grep -l '"electron"' {} + | xargs -I{} jq -r '(.devDependencies.electron // .dependencies.electron) // empty' {} 2>/dev/null | head -1)
66
[[ -z "${_elec_ver}" ]] && return 1
67
echo -e "The electron version is: \033[1;31m${_elec_ver%%.*}\033[0m"
68
}
69
prepare() {
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
gendesk -q -f -n \
79
--pkgname="${pkgname%-git}" \
80
--pkgdesc="${pkgdesc}" \
81
--categories="Utility" \
82
--name="${_pkgname}" \
83
--exec="${pkgname%-git} %U"
84
_set_build_env
85
_ensure_local_nvm
86
sed -i "s/\"electron\": \"[^\"]*\"/\"electron\": \"${SYSTEM_ELECTRON_VERSION}\"/g" package.json
87
NODE_ENV=development npm install
88
}
89
build() {
90
cd "${srcdir}/${pkgname%-git}.git"
91
_set_build_env
92
_ensure_local_nvm
93
NODE_ENV=production npx tsc --noEmit
94
NODE_ENV=production npx vite build
95
NODE_ENV=production npm exec -c "electron-builder --linux dir -c.electronDist=${electronDist} --config=electron-builder.json5"
96
local _app_dir=$(_get_app_dir)
97
rm -rf "${_app_dir}/resources/app.asar.unpacked/node_modules/active-win/lib/"{macos.*,windows*,binding/napi-6-darwin*}
98
}
99
package() {
100
install -Dm755 "${srcdir}/${pkgname%-git}.sh" "${pkgdir}/usr/bin/${pkgname%-git}"
101
install -Dm755 -d "${pkgdir}/usr/lib/${pkgname%-git}"
102
local _app_dir=$(_get_app_dir)
103
cp -a "${_app_dir}/resources/". "${pkgdir}/usr/lib/${pkgname%-git}/"
104
install -Dm644 "${srcdir}/${pkgname%-git}.git/public/assets/app_icon_512x512.png" "${pkgdir}/usr/share/pixmaps/${pkgname%-git}.png"
105
install -Dm644 "${srcdir}/${pkgname%-git}.git/${pkgname%-git}.desktop" -t "${pkgdir}/usr/share/applications"
106
}
107
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 |