headroom-ai-bin

maintainer Quatro · 2 votes · scanned 2026-08-03 00:08:14.047287
LOW
View on AUR ↗
Why flagged The package installs a prebuilt Python wheel from PyPI (trusted source) and its declared dependencies into a vendored venv; while pip installs are flagged, they are confined to a local venv and use pinned, verifiable sources with a valid checksum.

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 (trusted source) and its declared dependencies into a vendored venv; while pip installs are flagged, they are confined to a local venv and use pinned, verifiable sources with a valid checksum.

  • PKGBUILD:42 ./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:41 ./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.32.1
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, but headroom.cli imports headroom.proxy unconditionally
31# so the [proxy] set is effectively required just for `headroom --help` to load.
32_pytag=cp310-abi3-manylinux_2_28_x86_64
33_wheel="$_pyname-$pkgver-$_pytag.whl"
34source=("$_wheel::https://files.pythonhosted.org/packages/58/20/95bd0854e1081cda23679cedaf6c4f093cff9ea0d79b762d2f74bb6e0cb7/$_wheel")
35noextract=("$_wheel")
36sha256sums=('00190bb57ae063199bd1460ec8cf50845d9293a8724c21fcef4dfb5cca27df2e')
37
38build() {
39 rm -rf venv
40 /usr/bin/python3.12 -m venv venv
41 ./venv/bin/python -m pip install --quiet --no-cache-dir --upgrade pip
42 ./venv/bin/python -m pip install --no-cache-dir --no-compile "$srcdir/$_wheel[proxy]"
43}
44
45package() {
46 local sitepkg="$pkgdir/usr/lib/python3.12/site-packages"
47 install -dm755 "$sitepkg"
48
49 # Copy the venv's vendored deps, then strip bootstrap + bytecode noise.
50 cp -a venv/lib/python3.12/site-packages/. "$sitepkg/"
51 rm -rf \
52 "$sitepkg"/pip "$sitepkg"/pip-*.dist-info \
53 "$sitepkg"/setuptools "$sitepkg"/setuptools-*.dist-info \
54 "$sitepkg"/wheel "$sitepkg"/wheel-*.dist-info \
55 "$sitepkg"/_distutils_hack "$sitepkg"/pkg_resources \
56 "$sitepkg"/distutils-precedence.pth
57 find "$sitepkg" -depth -type d -name __pycache__ -exec rm -rf {} +
58
59 install -dm755 "$pkgdir/usr/bin"
60 cat > "$pkgdir/usr/bin/headroom" <<'EOF'
61#!/usr/bin/python3.12
62import sys
63from headroom.cli import main
64if __name__ == '__main__':
65 sys.exit(main())
66EOF
67 chmod 755 "$pkgdir/usr/bin/headroom"
68}
69

Changes since previous scan

--- PKGBUILD @ 2026-07-20 00:19
+++ PKGBUILD @ 2026-08-03 00:08
@@ -2,7 +2,7 @@
pkgname=headroom-ai-bin
_pyname=headroom_ai
-pkgver=0.28.0
+pkgver=0.32.1
pkgrel=1
pkgdesc="Context optimization layer for LLM applications - cut token costs by 50-90% (binary wheel, Python 3.12)"
arch=('x86_64')
@@ -16,7 +16,7 @@
options=('!strip' '!debug')
# Upstream switched from pure-Python (hatchling) to Rust+maturin in 0.21.x.
-# 0.28.0 ships a stable-ABI cp310-abi3 wheel for x86_64 Linux. We install it into
+# 0.32.1 ships a stable-ABI cp310-abi3 wheel for x86_64 Linux. We install it into
# a python3.12 venv: abi3 wheels run on any Python >=3.10, and pinning python3.12
# (a fixed-version package) keeps the vendored venv stable across Arch's rolling
# /usr/bin/python bumps.
@@ -31,9 +31,9 @@
# so the [proxy] set is effectively required just for `headroom --help` to load.
_pytag=cp310-abi3-manylinux_2_28_x86_64
_wheel="$_pyname-$pkgver-$_pytag.whl"
-source=("$_wheel::https://files.pythonhosted.org/packages/04/20/f6891ab873a097211ac194ad7934f126e2ed08f971d4125968eafce11b8a/$_wheel")
+source=("$_wheel::https://files.pythonhosted.org/packages/58/20/95bd0854e1081cda23679cedaf6c4f093cff9ea0d79b762d2f74bb6e0cb7/$_wheel")
noextract=("$_wheel")
-sha256sums=('f793545d2955c6d651d5267e0bf52dd0f14c7362deb43384e7958986c5b5e9e9')
+sha256sums=('00190bb57ae063199bd1460ec8cf50845d9293a8724c21fcef4dfb5cca27df2e')
build() {
rm -rf venv

Scan history

Scanned at (UTC)SeverityRules
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 21:14:52 MEDIUM 1
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

Report a package

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

0 / 4000
Your suggestion