python-mediapipe-git

MEDIUM
maintainer Premik 1 votes scanned 2026-09-17 00:27:14.276658
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-09-17 00:27:14 Medium 2
2026-09-16 00:03:17 Medium 2
2026-09-15 00:25:31 Medium 2
2026-09-14 00:27:57 Medium 2
2026-09-13 00:19:54 Medium 2
2026-09-12 00:25:17 Medium 2
2026-09-11 00:19:22 Medium 2
2026-09-10 00:22:44 Medium 2
2026-09-09 00:04:09 Medium 2
2026-09-08 00:18:08 Medium 2
2026-09-07 00:30:15 Medium 2
2026-09-06 00:17:06 Medium 2
2026-09-05 00:16:27 Medium 2
2026-09-04 00:03:13 Medium 2
2026-09-03 00:15:47 Medium 2
2026-09-02 00:02:31 Medium 2
2026-09-01 00:11:19 Medium 2
2026-08-31 00:19:57 Medium 2
2026-08-30 13:44:12 Medium 2
2026-08-30 13:42:42 High 1

Report a package

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

0 / 4000
Your suggestion