headroom-ai-bin

LOW
maintainer Quatro 2 votes scanned 2026-11-01 00:21:48.120785
View on AUR
Why flagged

The package installs a prebuilt Python wheel from PyPI and its dependencies into a vendored Python 3.12 environment; while the pip install uses a variable, the source is from a trusted, official repository (pypi.org) and the wheel is integrity-verified via sha256sum, making supply-chain risk low.

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 package installs a prebuilt Python wheel from PyPI and its dependencies into a vendored Python 3.12 environment; while the pip install uses a variable, the source is from a trusted, official repository (pypi.org) and the wheel is integrity-verified via sha256sum, making supply-chain risk low.

  • PKGBUILD:43 ./venv/bin/python -m pip install --no-cache-dir --no-compile "$srcdir/$_wheel[proxy]"
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:42 ./venv/bin/python -m pip install --quiet --no-cache-dir --upgrade pip

PKGBUILD

2 offending line(s) highlighted
1# Maintainer: Xavier Francisco <echo moc.liamg@ocsicnarf.n.reivax | rev>
2
3pkgname=headroom-ai-bin
4_pyname=headroom_ai
5pkgver=0.42.0
6pkgrel=1
7pkgdesc="Context optimization layer for LLM applications - cut token costs by 50-90% (binary wheel, Python 3.12)"
8arch=('x86_64')
9url="https://github.com/chopratejas/headroom"
10license=('Apache-2.0')
11depends=('python312' 'ast-grep')
12provides=("headroom-ai=$pkgver")
13conflicts=('headroom-ai')
14# Prebuilt wheel + vendored .so's: don't strip them or extract a -debug package
15# (avoids dangling build-id debug symlinks for the bundled binaries).
16options=('!strip' '!debug')
17
18# Upstream switched from pure-Python (hatchling) to Rust+maturin in 0.21.x.
19# 0.32.1 ships a stable-ABI cp310-abi3 wheel for x86_64 Linux. We install it into
20# a python3.12 venv: abi3 wheels run on any Python >=3.10, and pinning python3.12
21# (a fixed-version package) keeps the vendored venv stable across Arch's rolling
22# /usr/bin/python bumps.
23#
24# Arch's python-* ecosystem (tiktoken/pydantic/litellm/...) is built against
25# /usr/bin/python (3.14) and is invisible to /usr/bin/python3.12, so we can't
26# satisfy headroom's Python deps via regular Arch packages. We vendor them
27# into /usr/lib/python3.12/site-packages/ via pip in a transient venv.
28#
29# The wheel declares fastapi/uvicorn/openai/mcp/onnxruntime/transformers/etc.
30# as the `proxy` extra. The bare CLI loads without it, but `headroom proxy`,
31# `wrap`, `deploy` and `install` need it, and the venv cannot fall back on
32# Arch's python-* packages, so [proxy] is always installed.
33_pytag=cp310-abi3-manylinux_2_28_x86_64
34_wheel="$_pyname-$pkgver-$_pytag.whl"
35source=("$_wheel::https://files.pythonhosted.org/packages/${_pytag%%-*}/${_pyname:0:1}/$_pyname/$_wheel")
36noextract=("$_wheel")
37sha256sums=('fbb3ceb8f6c3f208edcc3aad43c0e03e0db45636d9d2061525ad0d0a166da146')
38
39build() {
40 rm -rf venv
41 /usr/bin/python3.12 -m venv venv
42 ./venv/bin/python -m pip install --quiet --no-cache-dir --upgrade pip
43 ./venv/bin/python -m pip install --no-cache-dir --no-compile "$srcdir/$_wheel[proxy]"
44}
45
46package() {
47 local sitepkg="$pkgdir/usr/lib/python3.12/site-packages"
48 install -dm755 "$sitepkg"
49
50 # Copy the venv's vendored deps, then strip bootstrap + bytecode noise.
51 cp -a venv/lib/python3.12/site-packages/. "$sitepkg/"
52 rm -rf \
53 "$sitepkg"/pip "$sitepkg"/pip-*.dist-info \
54 "$sitepkg"/setuptools "$sitepkg"/setuptools-*.dist-info \
55 "$sitepkg"/wheel "$sitepkg"/wheel-*.dist-info \
56 "$sitepkg"/_distutils_hack "$sitepkg"/pkg_resources \
57 "$sitepkg"/distutils-precedence.pth
58 find "$sitepkg" -depth -type d -name __pycache__ -exec rm -rf {} +
59
60 install -dm755 "$pkgdir/usr/bin"
61 cat > "$pkgdir/usr/bin/headroom" <<'EOF'
62#!/usr/bin/python3.12
63import sys
64from headroom.cli import main
65if __name__ == '__main__':
66 sys.exit(main())
67EOF
68 chmod 755 "$pkgdir/usr/bin/headroom"
69}
70

Changes since previous scan

--- PKGBUILD @ 2026-10-28 00:06
+++ PKGBUILD @ 2026-11-01 00:21
@@ -2,7 +2,7 @@
pkgname=headroom-ai-bin
_pyname=headroom_ai
-pkgver=0.41.0
+pkgver=0.42.0
pkgrel=1
pkgdesc="Context optimization layer for LLM applications - cut token costs by 50-90% (binary wheel, Python 3.12)"
arch=('x86_64')
@@ -27,13 +27,14 @@
# into /usr/lib/python3.12/site-packages/ via pip in a transient venv.
#
# The wheel declares fastapi/uvicorn/openai/mcp/onnxruntime/transformers/etc.
-# as the `proxy` extra, but headroom.cli imports headroom.proxy unconditionally
-# so the [proxy] set is effectively required just for `headroom --help` to load.
+# as the `proxy` extra. The bare CLI loads without it, but `headroom proxy`,
+# `wrap`, `deploy` and `install` need it, and the venv cannot fall back on
+# Arch's python-* packages, so [proxy] is always installed.
_pytag=cp310-abi3-manylinux_2_28_x86_64
_wheel="$_pyname-$pkgver-$_pytag.whl"
source=("$_wheel::https://files.pythonhosted.org/packages/${_pytag%%-*}/${_pyname:0:1}/$_pyname/$_wheel")
noextract=("$_wheel")
-sha256sums=('f4db5e5119a73af3ed952b1c10caff2430831d899eb17d995a27574ae6e6b306')
+sha256sums=('fbb3ceb8f6c3f208edcc3aad43c0e03e0db45636d9d2061525ad0d0a166da146')
build() {
rm -rf venv

Scan history

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