pupu-git
maintainer zxp19821005
· 0 votes
· scanned 2026-08-03 00:08:14.047287
LOW
View on AUR ↗
Why flagged
The pip install is for project dependencies and editable install of a local git source (unchain), which is part of the build process for a legitimate AUR package, not untrusted remote code execution.
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 pip install is for project dependencies and editable install of a local git source (unchain), which is part of the build process for a legitimate AUR package, not untrusted remote code execution.
1 higher static finding superseded - not the current verdict (shown for transparency)
MEDIUM
pip install of an external package
pip_install_external
`pip install <package>` fetches an unpinned package from PyPI at build time, outside source=() and makepkg's checksums.
-
PKGBUILD:111
python -m pip install --upgrade pip -
PKGBUILD:112
python -m pip install -r unchain_runtime/server/requirements.txt -e ../unchain pyinstaller
PKGBUILD
2 offending line(s) highlighted
1
# Maintainer: zxp19821005 <zxp19821005 at 163 dot com>
2
pkgname=pupu-git
3
_pkgname=PuPu
4
pkgver=0.1.8.r0.g327097b
5
_electronversion=40
6
_nodeversion=20
7
pkgrel=1
8
pkgdesc="A simple and easy to use UI for the Ollama.(Use system-wide electron)"
9
arch=('any')
10
url="https://github.com/haoxiang-xu/PuPu"
11
license=('MIT')
12
provides=("${pkgname%-git}=${pkgver%.r*}")
13
conflicts=("${pkgname%-git}")
14
depends=(
15
"electron${_electronversion}"
16
'ollama'
17
'python'
18
'python-numpy'
19
'python-flask'
20
'python-httpx'
21
'python-werkzeug'
22
'python-openai'
23
)
24
makedepends=(
25
'npm'
26
'nvm'
27
'git'
28
'curl'
29
'gendesk'
30
'jq'
31
'python312'
32
)
33
source=(
34
"${pkgname//-/.}::git+${url}.git"
35
"unchain::git+https://github.com/haoxiang-xu/unchain.git"
36
"${pkgname%-git}.sh"
37
)
38
sha256sums=('SKIP'
39
'SKIP'
40
'a774c2f54fbbeeaac3cefc0f7250796d30c86d27f0fd40b7eaf9c0fdb021623d')
41
pkgver() {
42
cd "${srcdir}/${pkgname//-/.}"
43
set -o pipefail
44
git describe --long --tags --abbrev=7 | sed 's/\([^-]*-g\)/r\1/;s/-/./g;s/v//g' ||
45
printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short=7 HEAD)"
46
}
47
_ensure_local_nvm() {
48
local NVM_DIR="${srcdir}/.nvm"
49
source /usr/share/nvm/init-nvm.sh || [[ $? != 1 ]]
50
nvm install "${_nodeversion}"
51
nvm use "${_nodeversion}"
52
}
53
_set_build_env() {
54
export ELECTRON_DIST="/usr/lib/electron${_electronversion}"
55
export ELECTRON_SKIP_BINARY_DOWNLOAD=1
56
export SYSTEM_ELECTRON_VERSION="$(electron${_electronversion} -v | sed 's/v//g')"
57
export HOME="${srcdir}/.electron-gyp"
58
export NPM_CONFIG_CACHE="${srcdir}/.npm_cache"
59
export NPM_CONFIG_MAXSOCKETS=32
60
if [[ "$(curl -s ipinfo.io/country)" == *"CN"* ]]; then
61
{
62
export NPM_CONFIG_REGISTRY="https://registry.npmmirror.com"
63
export NODEJS_ORG_MIRROR="https://npmmirror.com/mirrors/node"
64
export ELECTRON_MIRROR="https://npmmirror.com/mirrors/electron/"
65
export ELECTRON_BUILDER_BINARIES_MIRROR="https://npmmirror.com/mirrors/electron-builder-binaries/"
66
}
67
find ./ -type f -name "package-lock.json" -exec sed -i "s/registry.npmjs.org/registry.npmmirror.com/g" {} +
68
fi
69
}
70
_get_app_dir() {
71
find "${srcdir}" -type f -name "resources.pak" -exec dirname {} + | head -n 1
72
}
73
_get_electron_version() {
74
_elec_ver=$(find "${srcdir}" -maxdepth 5 -name "package.json" ! -path "*/node_modules/*" \
75
-exec grep -l '"electron"' {} + | xargs -I{} jq -r '(.devDependencies.electron // .dependencies.electron) // empty' {} 2>/dev/null | head -1)
76
[[ -z "${_elec_ver}" ]] && return 1
77
echo -e "The electron version is: \033[1;31m${_elec_ver%%.*}\033[0m"
78
}
79
prepare() {
80
cd "${srcdir}/${pkgname//-/.}"
81
_get_electron_version
82
sed -e "
83
s/@electronversion@/${_electronversion}/g
84
s/@appname@/${pkgname%-git}/g
85
s/@runname@/app.asar/g
86
s/@cfgdirname@/${pkgname%-git}/g
87
" -i "${srcdir}/${pkgname%-git}.sh"
88
gendesk -q -f -n \
89
--pkgname="${pkgname%-git}" \
90
--pkgdesc="${pkgdesc}" \
91
--categories="Utility" \
92
--name="${_pkgname}" \
93
--exec="${pkgname%-git} %U"
94
_set_build_env
95
_ensure_local_nvm
96
sed -i "s/sys.version_info\[:2\] == (3, 12)/sys.version_info[0] == 3 and sys.version_info[1] >= 12/g" unchain_runtime/scripts/build_unchain_server.sh
97
sed -i "s/sys.version_info\[:2\] == (3, 12)/sys.version_info[0] == 3 and sys.version_info[1] >= 12/g" scripts/init_python312_venv.sh
98
find src -type f -exec sed -i "s/process.resourcesPath/\'\/usr\/lib\/${pkgname%-git}\'/g" {} +
99
sed -i "s/\"electron\": \"[^\"]*\"/\"electron\": \"${SYSTEM_ELECTRON_VERSION}\"/g" package.json
100
NODE_ENV=development npm install
101
}
102
build() {
103
cd "${srcdir}/${pkgname//-/.}"
104
_set_build_env
105
_ensure_local_nvm
106
export PUPU_BUILD_VERSION="$(node -p "require('./package.json').version")"
107
export UNCHAIN_SOURCE_PATH="${srcdir}/unchain"
108
rm -rf "${srcdir}/.venv"
109
python3.12 -m venv "${srcdir}/.venv"
110
source "${srcdir}/.venv/bin/activate"
111
python -m pip install --upgrade pip
112
python -m pip install -r unchain_runtime/server/requirements.txt -e ../unchain pyinstaller
113
export UNCHAIN_BUILD_VENV="${srcdir}/.venv"
114
export UNCHAIN_BUILD_SKIP_INSTALL=1
115
NODE_ENV=production npm run build:unchain:linux
116
NODE_ENV=production npm run build:web
117
NODE_ENV=production npm exec -c "electron-builder --linux dir -c.electronDist=${ELECTRON_DIST}"
118
}
119
120
package() {
121
install -Dm755 "${srcdir}/${pkgname%-git}.sh" "${pkgdir}/usr/bin/${pkgname%-git}"
122
install -Dm755 -d "${pkgdir}/usr/lib/${pkgname%-git}"
123
local _app_dir=$(_get_app_dir)
124
cp -a "${_app_dir}/resources/"* "${pkgdir}/usr/lib/${pkgname%-git}/"
125
_icon_sizes=(192 512)
126
for _icons in "${_icon_sizes[@]}";do
127
install -Dm644 "${srcdir}/${pkgname//-/.}/public/logo${_icons}.png" \
128
"${pkgdir}/usr/share/icons/hicolor/${_icons}x${_icons}/apps/${pkgname%-git}.png"
129
done
130
install -Dm644 "${srcdir}/${pkgname//-/.}/${pkgname%-git}.desktop" -t "${pkgdir}/usr/share/applications"
131
install -Dm644 "${srcdir}/${pkgname//-/.}/LICENSE" -t "${pkgdir}/usr/share/licenses/${pkgname}"
132
}
133
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 |