elevate-git
maintainer zxp19821005
· 1 votes
· scanned 2026-08-03 00:08:14.047287
LOW
View on AUR ↗
Why flagged
The npm install runs on the project's own source from a trusted GitHub repository, with dependencies declared in package.json; the install is part of normal build process using official npm with fallback mirror for CN users, not an external unreviewed package.
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 95%): The npm install runs on the project's own source from a trusted GitHub repository, with dependencies declared in package.json; the install is part of normal build process using official npm with fallback mirror for CN users, not an external unreviewed package.
1 higher static finding 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:80
s/npm install/NODE_ENV=development npm install/g -
PKGBUILD:83
NODE_ENV=development npm add -D husky
PKGBUILD
2 offending line(s) highlighted
1
# Maintainer: zxp19821005 <zxp19821005 at 163 dot com>
2
pkgname=elevate-git
3
pkgver=7.2.2.r3.gdf9e2ce
4
_electronversion=27
5
_nodeversion=18
6
pkgrel=1
7
pkgdesc="A sport app to 'Elevate' your training experience and goals! Track your fitness and progressions over time. Analyse deeper your activities. And more...Use system-wide electron."
8
arch=('any')
9
url="https://thomaschampagne.github.io/elevate-docs/"
10
_ghurl="https://github.com/thomaschampagne/elevate"
11
license=('MPL-2.0')
12
depends=(
13
"electron${_electronversion}"
14
)
15
makedepends=(
16
'npm'
17
'git'
18
'nvm'
19
'gendesk'
20
'curl'
21
)
22
source=(
23
"${pkgname//-/.}::git+${_ghurl}.git"
24
"${pkgname%-git}.sh"
25
)
26
sha256sums=('SKIP'
27
'31ad33b633744f5361abd964be306cea53ae1050e760c787115f7eca60045ae6')
28
pkgver() {
29
cd "${srcdir}/${pkgname//-/.}"
30
set -o pipefail
31
git describe --long --tags --abbrev=7 | sed 's/\([^-]*-g\)/r\1/;s/-/./g;s/v//g' ||
32
printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short=7 HEAD)"
33
}
34
_ensure_local_nvm() {
35
local NVM_DIR="${srcdir}/.nvm"
36
source /usr/share/nvm/init-nvm.sh || [[ $? != 1 ]]
37
nvm install "${_nodeversion}"
38
nvm use "${_nodeversion}"
39
}
40
_get_electron_version() {
41
_elec_ver="$(grep '"electron":' "${srcdir}/${pkgname//-/.}/desktop/package.json" | cut -d'"' -f4 | tr -d '^' | cut -d. -f1)"
42
echo -e "The electron version is: \033[1;31m${_elec_ver}\033[0m"
43
}
44
prepare() {
45
cd "${srcdir}/${pkgname//-/.}"
46
_get_electron_version
47
sed -i -e "
48
s/@electronversion@/${_electronversion}/g
49
s/@appname@/${pkgname%-git}/g
50
s/@runname@/app.asar/g
51
s/@cfgdirname@/${pkgname%-git}-sports-app/g
52
s/@options@//g
53
" -i "${srcdir}/${pkgname%-git}.sh"
54
_ensure_local_nvm
55
gendesk -q -f -n \
56
--pkgname="${pkgname%-git}" \
57
--pkgdesc="${pkgdesc}" \
58
--categories="Utility" \
59
--name="${pkgname%-git}" \
60
--exec="${pkgname%-git} %U"
61
export ELECTRON_SKIP_BINARY_DOWNLOAD=1
62
export SYSTEM_ELECTRON_VERSION="$(electron${_electronversion} -v | sed 's/v//g')"
63
HOME="${srcdir}/.electron-gyp"
64
{
65
echo -e '\n'
66
#echo 'build_from_source=true'
67
echo "cache=${srcdir}/.npm_cache"
68
echo "maxsockets=10"
69
} >> .npmrc
70
if [[ "$(curl -s ipinfo.io/country)" == *"CN"* ]]; then
71
{
72
echo 'registry=https://registry.npmmirror.com'
73
echo 'electron_mirror=https://registry.npmmirror.com/-/binary/electron/'
74
echo 'electron_builder_binaries_mirror=https://registry.npmmirror.com/-/binary/electron-builder-binaries/'
75
} >> .npmrc
76
find ./ -type f -name "package-lock.json" -exec sed -i "s/registry.npmjs.org/registry.npmmirror.com/g" {} +
77
echo appcore desktop webextension | xargs -n 1 cp .npmrc
78
fi
79
sed -i -e "
80
s/npm install/NODE_ENV=development npm install/g
81
s/\"electron\": \"[^\"]*\"/\"electron\": \"${SYSTEM_ELECTRON_VERSION}\"/g
82
" desktop/package.json
83
NODE_ENV=development npm add -D husky
84
NODE_ENV=development npm install
85
}
86
build() {
87
cd "${srcdir}/${pkgname//-/.}/desktop"
88
local electronDist="/usr/lib/electron${_electronversion}"
89
NODE_ENV=production npm run build:prod
90
NODE_ENV=production npm exec -c "electron-builder build --linux dir -c.electronDist=${electronDist}"
91
rm -rf "${srcdir}/${pkgname//-/.}/desktop/package/linux-"*/resources/app.asar.unpacked/node_modules/7zip-bin/mac
92
case "${CARCH}" in
93
aarch64)
94
rm -rf "${srcdir}/${pkgname//-/.}/desktop/package/linux-"*/resources/app.asar.unpacked/node_modules/7zip-bin/linux/{arm,ia32,x64}
95
;;
96
armv7h)
97
rm -rf "${srcdir}/${pkgname//-/.}/desktop/package/linux-"*/resources/app.asar.unpacked/node_modules/7zip-bin/linux/{arm64,ia32,x64}
98
;;
99
i686)
100
rm -rf "${srcdir}/${pkgname//-/.}/desktop/package/linux-"*/resources/app.asar.unpacked/node_modules/7zip-bin/linux/{arm,arm64,x64}
101
;;
102
x86_64)
103
rm -rf "${srcdir}/${pkgname//-/.}/desktop/package/linux-"*/resources/app.asar.unpacked/node_modules/7zip-bin/linux/{arm,arm64,ia32}
104
;;
105
esac
106
}
107
package() {
108
install -Dm755 "${srcdir}/${pkgname%-git}.sh" "${pkgdir}/usr/bin/${pkgname%-git}"
109
install -Dm644 "${srcdir}/${pkgname//-/.}/desktop/package/linux-"*/resources/app.asar -t "${pkgdir}/usr/lib/${pkgname%-git}"
110
cp -Pr --no-preserve=ownership "${srcdir}/${pkgname//-/.}/desktop/package/linux-"*/resources/app.asar.unpacked "${pkgdir}/usr/lib/${pkgname%-git}"
111
install -Dm644 "${srcdir}/${pkgname//-/.}/desktop/res/icons/icon.png" "${pkgdir}/usr/share/pixmaps/${pkgname%-git}.png"
112
install -Dm644 "${srcdir}/${pkgname//-/.}/${pkgname%-git}.desktop" -t "${pkgdir}/usr/share/applications"
113
install -Dm644 "${srcdir}/${pkgname//-/.}/LICENSE" -t "${pkgdir}/usr/share/licenses/${pkgname}"
114
}
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 |