python-mediapipe
The PKGBUILD downloads a Bazel binary at build time from the official GitHub releases page (github.com/bazelbuild/bazel) using a version pinned by the upstream source's .bazelversion file, then executes it. This is a common workaround for Arch Linux's Bazel packaging issues and is seen in several legitimate AUR packages (e.g., tensorflow, etc.). The binary is fetched from the official bazelbuild GitHub releases, not an attacker-controlled host. However, the downloaded binary is not checksummed or verified in any way (no sha256sum check, no GPG verification), which is a genuine supply-chain concern: if the GitHub release were compromised or the download intercepted (MITM), an arbitrary binary would be executed with the user's privileges during the build. This is not clearly malicious intent, but it is a real medium-severity supply-chain risk due to the unverified execution of a downloaded binary. The rest of the PKGBUILD is straightforward: patches local source, builds a Python wheel, installs it.
Triggered rules
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 75%): The PKGBUILD downloads a Bazel binary at build time from the official GitHub releases page (github.com/bazelbuild/bazel) using a version pinned by the upstream source's .bazelversion file, then executes it. This is a common workaround for Arch Linux's Bazel packaging issues and is seen in several legitimate AUR packages (e.g., tensorflow, etc.). The binary is fetched from the official bazelbuild GitHub releases, not an attacker-controlled host. However, the downloaded binary is not checksummed or verified in any way (no sha256sum check, no GPG verification), which is a genuine supply-chain concern: if the GitHub release were compromised or the download intercepted (MITM), an arbitrary binary would be executed with the user's privileges during the build. This is not clearly malicious intent, but it is a real medium-severity supply-chain risk due to the unverified execution of a downloaded binary. The rest of the PKGBUILD is straightforward: patches local source, builds a Python wheel, installs it.
1 higher static finding superseded - not the current verdict (shown for transparency)
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:58
chmod +x ${srcdir}/bin/bazel
PKGBUILD
1 offending line(s) highlighted# Maintainer: robertfoster
# Maintainer: Hu Butui <hot123tea123@gmail.com>
_pkgname=mediapipe
pkgname=python-mediapipe # renovate: datasource=github-tags depName=google-ai-edge/mediapipe
pkgver=1.0.0
pkgrel=1
pkgdesc="A cross-platform, customizable ML solutions for live and streaming media"
arch=('x86_64')
url="https://github.com/google-ai-edge/mediapipe"
license=("Apache-2.0")
depends=(
absl-py
gcc-libs
glibc
libglvnd
opencv
opengl-driver
python-attrs
python-flatbuffers
python-matplotlib
python-numpy
python-opencv
python-pillow
python-protobuf
python-scipy
python-six
python-sounddevice
python-tensorflow
)
makedepends=(
patchelf
python-build
python-installer
python-setuptools
python-wheel
wget
)
source=("${_pkgname}-${pkgver}.tar.gz::https://github.com/google-ai-edge/mediapipe/archive/refs/tags/v${pkgver}.tar.gz"
"0004-use-opencv-headers.patch"
"0005-set-hermetic-python-version-and-disable-odml-converter.patch"
"0006-opencv5-geometry-header.patch"
"0007-bump-rules-java.patch"
)
sha256sums=('6343314dad0f4112610807ca723eee63feea00711dc2be9360928b6f0a5eba12'
'd18e88a217a00dc77cf2bfaa1d33b5fbc912deed5df686b0d2455fb0db75a677'
'62cbd43346e7a7705127656a74bec44852e5bbfc006c4723005fdd23af5258db'
'fb082d88d9cca47534ae01fca676a3afdb909bfc82d52c97cf0eaedf34571d5f'
'bdead49ac5370dc84d9facee962bf2def5d9055d7339a37b2ba3f3b4bb02f811')
prepare() {
# bazel in the ArchLinux is not working
mkdir -p ${srcdir}/bin
bazel_version=$(cat ${srcdir}/${_pkgname}-${pkgver}/.bazelversion)
wget https://github.com/bazelbuild/bazel/releases/download/${bazel_version}/bazel-${bazel_version}-linux-x86_64 -O ${srcdir}/bin/bazel
chmod +x ${srcdir}/bin/bazel
export PATH=${srcdir}/bin:${PATH}
cd "${srcdir}/${_pkgname}-${pkgver}"
patch -p1 -i "${srcdir}/0004-use-opencv-headers.patch"
patch -p1 -i "${srcdir}/0005-set-hermetic-python-version-and-disable-odml-converter.patch"
patch -p1 -i "${srcdir}/0006-opencv5-geometry-header.patch"
patch -p1 -i "${srcdir}/0007-bump-rules-java.patch"
# set __version__
sed -i "s/__version__ = 'dev'/__version__ = '$pkgver'/" setup.py
# set link_opencv to True
sed -i "s/self.link_opencv = False/self.link_opencv = True/g" setup.py
}
build() {
cd "${srcdir}/${_pkgname}-${pkgver}"
# enable building with GPU support, using opengl-driver
# opengl-driver is provided by mesa or nvidia-utils
MEDIAPIPE_DISABLE_GPU=0 \
python -m build --wheel --no-isolation
#$(readlink -f /usr/bin/python) -m build --wheel --no-isolation
}
package() {
cd "${srcdir}/${_pkgname}-${pkgver}"
python -m installer --destdir="${pkgdir}" dist/*.whl
# remove rpath and fix permission
find ${pkgdir} -type f -name "*.so" -exec patchelf --remove-rpath {} \;
find ${pkgdir} -type f -name "*.so" -exec chmod 755 {} \;
}
# vim:set ts=2 sw=2 et:
Scan history
| Scanned at (UTC) | Severity | Rules |
|---|---|---|
| 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 07:44:18 | Medium | 2 |
| 2026-08-30 07:41:46 | High | 1 |