python-mediapipe
maintainer hottea
· 0 votes
· scanned 2026-08-03 00:08:14.047287
LOW
View on AUR ↗
Why flagged
The downloaded Bazel binary is from the official GitHub releases of the Bazel project and used to build the package locally; this is a common and expected practice in AUR packages, and the source code being built is from the official MediaPipe repository.
Triggered rules
LOW
AI review downgraded a static finding
llm_review
The static rules flagged this HIGH, but an AI model (qwen/qwen3-235b-a22b-07-25) reviewed the full PKGBUILD and judged it LOW (confidence 95%): The downloaded Bazel binary is from the official GitHub releases of the Bazel project and used to build the package locally; this is a common and expected practice in AUR packages, and the source code being built is from the official MediaPipe repository.
1 higher static finding superseded - not the current verdict (shown for transparency)
HIGH
Downloaded file is executed
download_then_exec
A file fetched with curl/wget (not part of source=(), so never checksum-verified) is later made executable or run — a fetch-and-execute pattern split across statements.
-
PKGBUILD:53
chmod +x ${srcdir}/bin/bazel
PKGBUILD
1 offending line(s) highlighted
1
# Maintainer: robertfoster
2
# Maintainer: Hu Butui <hot123tea123@gmail.com>
3
4
_pkgname=mediapipe
5
pkgname=python-mediapipe # renovate: datasource=github-tags depName=google-ai-edge/mediapipe
6
pkgver=0.10.35
7
pkgrel=1
8
pkgdesc="A cross-platform, customizable ML solutions for live and streaming media"
9
arch=('x86_64')
10
url="https://github.com/google-ai-edge/mediapipe"
11
license=("Apache-2.0")
12
depends=(
13
absl-py
14
gcc-libs
15
glibc
16
libglvnd
17
opencv
18
opengl-driver
19
python-attrs
20
python-flatbuffers
21
python-matplotlib
22
python-numpy
23
python-opencv
24
python-pillow
25
python-protobuf
26
python-scipy
27
python-six
28
python-sounddevice
29
python-tensorflow
30
)
31
makedepends=(
32
patchelf
33
python-build
34
python-installer
35
python-setuptools
36
python-wheel
37
wget
38
)
39
40
source=("${_pkgname}-${pkgver}.tar.gz::https://github.com/google-ai-edge/mediapipe/archive/refs/tags/v${pkgver}.tar.gz"
41
"0004-use-opencv4-headers.patch"
42
"0005-set-hermetic-python-version-and-disable-odml-converter.patch"
43
)
44
sha256sums=('6b0e8490ab7f0f783937d4b25486cff469431adfe05c6f0217a5e63f68532113'
45
'55adaa6a74015f160b0dbf45d997c004cd7ecded501940a32c69c512956b0524'
46
'531dda481a8a06b23e0fe17e9c2f5eaefdfb0bf01bf81c7a8d849562534bf6ab')
47
48
prepare() {
49
# bazel in the ArchLinux is not working
50
mkdir -p ${srcdir}/bin
51
bazel_version=$(cat ${srcdir}/${_pkgname}-${pkgver}/.bazelversion)
52
wget https://github.com/bazelbuild/bazel/releases/download/${bazel_version}/bazel-${bazel_version}-linux-x86_64 -O ${srcdir}/bin/bazel
53
chmod +x ${srcdir}/bin/bazel
54
export PATH=${srcdir}/bin:${PATH}
55
cd "${srcdir}/${_pkgname}-${pkgver}"
56
patch -p1 -i "${srcdir}/0004-use-opencv4-headers.patch"
57
patch -p1 -i "${srcdir}/0005-set-hermetic-python-version-and-disable-odml-converter.patch"
58
# set __version__
59
sed -i "s/__version__ = 'dev'/__version__ = '$pkgver'/" setup.py
60
# set link_opencv to True
61
sed -i "s/self.link_opencv = False/self.link_opencv = True/g" setup.py
62
}
63
64
build() {
65
cd "${srcdir}/${_pkgname}-${pkgver}"
66
# enable building with GPU support, using opengl-driver
67
# opengl-driver is provided by mesa or nvidia-utils
68
MEDIAPIPE_DISABLE_GPU=0 \
69
python -m build --wheel --no-isolation
70
#$(readlink -f /usr/bin/python) -m build --wheel --no-isolation
71
}
72
73
package() {
74
cd "${srcdir}/${_pkgname}-${pkgver}"
75
python -m installer --destdir="${pkgdir}" dist/*.whl
76
# remove rpath and fix permission
77
find ${pkgdir} -type f -name "*.so" -exec patchelf --remove-rpath {} \;
78
find ${pkgdir} -type f -name "*.so" -exec chmod 755 {} \;
79
}
80
# vim:set ts=2 sw=2 et:
81
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 |