python-mediapipe-git

MEDIUM
maintainer Premik 1 votes scanned 2026-11-01 00:21:48.120785
View on AUR
Why flagged

The PKGBUILD downloads a Bazel binary from the official GitHub releases page (github.com/bazelbuild/bazel) at a version pinned by the upstream mediapipe repository's .bazelversion file, then executes it. This is a common workaround for AUR packages that require a specific Bazel version not matching the system package. The source is the official bazelbuild GitHub releases, not an attacker-controlled host. However, the downloaded binary is not checksummed (no sha256 verification in the PKGBUILD for the wget'd binary), meaning a MITM or a compromised GitHub release could substitute a malicious binary that gets executed during the build. This is a real supply-chain concern (executed binary from external host without integrity check) but not clearly malicious intent - it's a known packaging pattern for Bazel-dependent packages. Rated medium due to the unverified executed binary, not high because the source is the official upstream vendor release host.

Triggered rules

Medium AI review downgraded a static finding llm_review

The static rules flagged this HIGH, but an AI model (anthropic/claude-sonnet-4.6) reviewed the full PKGBUILD and judged it MEDIUM (confidence 80%): The PKGBUILD downloads a Bazel binary from the official GitHub releases page (github.com/bazelbuild/bazel) at a version pinned by the upstream mediapipe repository's .bazelversion file, then executes it. This is a common workaround for AUR packages that require a specific Bazel version not matching the system package. The source is the official bazelbuild GitHub releases, not an attacker-controlled host. However, the downloaded binary is not checksummed (no sha256 verification in the PKGBUILD for the wget'd binary), meaning a MITM or a compromised GitHub release could substitute a malicious binary that gets executed during the build. This is a real supply-chain concern (executed binary from external host without integrity check) but not clearly malicious intent - it's a known packaging pattern for Bazel-dependent packages. Rated medium due to the unverified executed binary, not high because the source is the official upstream vendor release host.

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:64 chmod +x ${srcdir}/bin/bazel

PKGBUILD

1 offending line(s) highlighted
1# Maintainer: Premysl Srubar <premysl.srubar at gmail com>
2# Maintainer: Hu Butui <hot123tea123@gmail.com>
3
4pkgname=python-mediapipe-git
5pkgver=1.0.0.r85.251c0cb96
6pkgrel=1
7pkgdesc="A cross-platform, customizable ML solutions for live and streaming media"
8arch=('x86_64')
9url="https://github.com/google-ai-edge/mediapipe"
10license=("Apache-2.0")
11depends=(
12 absl-py
13 gcc-libs
14 glibc
15 libglvnd
16 opencv
17 opengl-driver
18 python-attrs
19 python-flatbuffers
20 python-matplotlib
21 python-numpy
22 python-opencv
23 python-pillow
24 python-protobuf
25 python-scipy
26 python-six
27 python-sounddevice
28 python-tensorflow
29)
30makedepends=(
31 git
32 patchelf
33 python-build
34 python-installer
35 python-setuptools
36 python-wheel
37 wget
38)
39provides=("${pkgname%-git}")
40conflicts=("${pkgname%-git}")
41
42source=("${pkgname}::git+https://github.com/google-ai-edge/mediapipe.git"
43 "0004-use-opencv-headers.patch"
44 "0005-set-hermetic-python-version-and-disable-odml-converter.patch"
45 "0006-opencv5-geometry-header.patch"
46 "0007-bump-rules-java.patch"
47)
48sha256sums=('SKIP'
49 'd18e88a217a00dc77cf2bfaa1d33b5fbc912deed5df686b0d2455fb0db75a677'
50 '62cbd43346e7a7705127656a74bec44852e5bbfc006c4723005fdd23af5258db'
51 'fb082d88d9cca47534ae01fca676a3afdb909bfc82d52c97cf0eaedf34571d5f'
52 'bdead49ac5370dc84d9facee962bf2def5d9055d7339a37b2ba3f3b4bb02f811')
53
54pkgver() {
55 cd "${srcdir}/${pkgname}"
56 printf "%s" "$(git describe --long --tags | sed 's/\([^-]*-\)g/r\1/;s/-/./g' | sed 's/^v//')"
57}
58
59prepare() {
60 # bazel in the ArchLinux is not working
61 mkdir -p ${srcdir}/bin
62 bazel_version=$(cat ${srcdir}/${pkgname}/.bazelversion)
63 wget https://github.com/bazelbuild/bazel/releases/download/${bazel_version}/bazel-${bazel_version}-linux-x86_64 -O ${srcdir}/bin/bazel
64 chmod +x ${srcdir}/bin/bazel
65 export PATH=${srcdir}/bin:${PATH}
66 cd "${srcdir}/${pkgname}"
67 patch -p1 -i "${srcdir}/0004-use-opencv-headers.patch"
68 patch -p1 -i "${srcdir}/0005-set-hermetic-python-version-and-disable-odml-converter.patch"
69 patch -p1 -i "${srcdir}/0006-opencv5-geometry-header.patch"
70 patch -p1 -i "${srcdir}/0007-bump-rules-java.patch"
71 # set __version__
72 formatted_version=$(echo $pkgver | sed 's/^v//; s/r\([0-9]*\)\./post\1+/')
73 sed -i "s/^__version__ = .*/__version__ = '$formatted_version'/" setup.py
74 # set link_opencv to True
75 sed -i "s/self.link_opencv = False/self.link_opencv = True/g" setup.py
76}
77
78build() {
79 cd "${srcdir}/${pkgname}"
80 # enable building with GPU support, using opengl-driver
81 # opengl-driver is provided by mesa or nvidia-utils
82 MEDIAPIPE_DISABLE_GPU=0 \
83 python -m build --wheel --no-isolation
84}
85
86package() {
87 cd "${srcdir}/${pkgname}"
88 python -m installer --destdir="${pkgdir}" dist/*.whl
89 # remove rpath and fix permission
90 find ${pkgdir} -type f -name "*.so" -exec patchelf --remove-rpath {} \;
91 find ${pkgdir} -type f -name "*.so" -exec chmod 755 {} \;
92}
93# vim:set ts=2 sw=2 et:
94

Scan history

Scanned at (UTC)SeverityRules
2026-11-01 00:21:48 Medium 2
2026-10-31 00:07:41 Medium 2
2026-10-30 00:29:30 Medium 2
2026-10-29 00:13:55 Medium 2
2026-10-28 00:06:54 Medium 2
2026-10-27 00:23:28 Medium 2
2026-10-26 00:12:40 Medium 2
2026-10-25 00:20:48 Medium 2
2026-10-24 00:14:55 Medium 2
2026-10-23 00:02:19 Medium 2
2026-10-22 00:13:10 Medium 2
2026-10-21 00:12:50 Medium 2
2026-10-20 00:10:31 Medium 2
2026-10-19 00:03:55 Medium 2
2026-10-18 00:06:55 Medium 2
2026-10-17 00:21:55 Medium 2
2026-10-16 00:12:47 Medium 2
2026-10-15 00:28:05 Medium 2
2026-10-14 00:06:47 Medium 2
2026-10-13 00:23:45 Medium 2

Report a package

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

0 / 4000
Your suggestion