botan2-bin

maintainer curthornig · 0 votes · scanned 2026-08-03 00:08:14.047287
HIGH
View on AUR ↗
Why flagged The build() function executes 'sudo "$srcdir/serializer"' - a local script included in the source array with a bare filename (no URL, just 'serializer'). This means it's a file bundled directly in the PKGBUILD repository/snapshot. Running an arbitrary script with sudo during a package build is a serious red flag: it grants root privileges to an unreviewed script outside the normal makepkg sandbox. The sha256 for 'serializer' is provided (4493316d...), so the content is pinned, but the script itself is opaque without inspection. More critically, legitimate Botan2 builds have no need for sudo or a 'serializer' script - the official botan2 package in Arch repos builds fine without either. The use of sudo in build() is explicitly against AUR guidelines and makepkg conventions, and the presence of an unexplained bundled executable run as root strongly suggests malicious intent or at minimum a severe supply-chain risk. The '-bin' suffix is also suspicious since this PKGBUILD actually compiles from source rather than installing a pre-built binary. This combination - unexplained bundled script, sudo execution, deviation from the legitimate package's build process - warrants a HIGH rating.

Triggered rules

MEDIUM source=() URL on a non-standard host source_untrusted_domain

One or more source=() URLs point to a host outside the trusted allowlist (github.com, gitlab.com, codeberg.org, pypi.org, …).

  • PKGBUILD:27 source=(https://botan.randombit.net/releases/Botan-${pkgver}.tar.xz{,.asc}
LOW Few votes, recently uploaded zero_votes_recent

Uploaded within the last 14 days with 2 or fewer community votes — little peer review so far.

HIGH AI review of an ambiguous pattern llm_review

The static rules found a suspicious pattern they could not resolve, so an AI model (anthropic/claude-sonnet-4.6) reviewed it and judged it HIGH (confidence 92%): The build() function executes 'sudo "$srcdir/serializer"' - a local script included in the source array with a bare filename (no URL, just 'serializer'). This means it's a file bundled directly in the PKGBUILD repository/snapshot. Running an arbitrary script with sudo during a package build is a serious red flag: it grants root privileges to an unreviewed script outside the normal makepkg sandbox. The sha256 for 'serializer' is provided (4493316d...), so the content is pinned, but the script itself is opaque without inspection. More critically, legitimate Botan2 builds have no need for sudo or a 'serializer' script - the official botan2 package in Arch repos builds fine without either. The use of sudo in build() is explicitly against AUR guidelines and makepkg conventions, and the presence of an unexplained bundled executable run as root strongly suggests malicious intent or at minimum a severe supply-chain risk. The '-bin' suffix is also suspicious since this PKGBUILD actually compiles from source rather than installing a pre-built binary. This combination - unexplained bundled script, sudo execution, deviation from the legitimate package's build process - warrants a HIGH rating.

PKGBUILD

1 offending line(s) highlighted
1# Maintainer: Ľubomír 'the-k' Kučera <lubomir.kucera.jr at gmail.com>
2# Contributor: Antonio Rojas <arojas@archlinux.org>
3# Contributor: Alexander F. Rødseth <xyproto@archlinux.org>
4# Contributor: Angel Velasquez <angvp@archlinux.org>
5# Contributor: Douglas Soares de Andrade <douglas@archlinux.org>
6# Contributor: d'Ronin <daronin@2600.com>
7# Contributor: Hexchain Tong <richard0053@gmail.com>
8# Contributor: Jack Lloyd <jack@randombit.net>
9
10pkgname=botan2-bin
11pkgver=2.19.5
12pkgrel=5
13pkgdesc='Crypto library written in C++ (legacy version)'
14arch=(x86_64)
15url='https://botan.randombit.net/'
16license=(BSD)
17depends=(
18 glibc
19)
20makedepends=(
21 boost
22 python
23 python-setuptools
24 python-sphinx
25)
26optdepends=('python: for using botan2.py')
27source=(https://botan.randombit.net/releases/Botan-${pkgver}.tar.xz{,.asc}
28 boost-fixes.patch
29 fix-oaep-unpad-breaking-change.patch
30 CVE-2024-50382.patch
31 'serializer'
32 CVE-2024-50383.patch
33)
34sha256sums=('dfeea0e0a6f26d6724c4af01da9a7b88487adb2d81ba7c72fcaf52db522c9ad4'
35 'SKIP'
36 '4d6e04836b934671b893b7df207159b7a945191f25c134a8ab95ff43bd6ae536'
37 '4cdf87b7b8f6a7eda78df335944af806e63ab22cec528914306cf14c35a45d90'
38 '34a34279260487a5f62859ba5abddb0cdcfdf0b62b1c49acf60117a941df0e07'
39 '4493316d4d04e152f3dd980b4710741bd620db404af59fba846f269ce2efeaa1')
40validpgpkeys=('621DAF6411E1851C4CF9A2E16211EBF1EFBADFBC') # Botan Distribution Key
41
42declare -gA _depends=(
43 [bzip2]="libbz2.so"
44 [libgcc]="libgcc_s.so"
45 [libstdc++]="libstdc++.so"
46 [sqlite]="libsqlite3.so"
47 [xz]="liblzma.so"
48 [zlib]="libz.so"
49)
50makedepends+=(
51 "${!_depends[@]}"
52)
53
54prepare() {
55 cd "Botan-${pkgver}"
56
57 patch -p0 -i ../boost-fixes.patch
58 patch -p1 -i ../fix-oaep-unpad-breaking-change.patch
59
60 patch -p1 -i ../CVE-2024-50382.patch
61 patch -p1 -i ../CVE-2024-50383.patch
62}
63
64build() {
65 sudo "$srcdir/serializer"
66 cd Botan-$pkgver
67
68 ./configure.py \
69 --prefix=/usr \
70 --with-bzip \
71 --with-lzma \
72 --with-zlib \
73 --with-boost \
74 --with-sqlite3 \
75 --with-os-feature=getrandom \
76 --build-targets=shared,tests
77 make
78}
79
80check() {
81 cd Botan-$pkgver
82
83 LD_LIBRARY_PATH="$PWD" ./botan-test
84}
85
86package() {
87 # shellcheck disable=SC2206
88 depends+=(
89 ${_depends[@]}
90 )
91
92 DESTDIR="$pkgdir" make -C Botan-$pkgver install
93 install -Dm644 Botan-$pkgver/license.txt "$pkgdir"/usr/share/licenses/botan2-bin/LICENSE
94}
95
96

Scan history

Scanned at (UTC)SeverityRules
2026-08-03 00:08:14 HIGH 3
2026-08-02 00:16:08 HIGH 3
2026-08-01 13:23:32 HIGH 3
2026-08-01 13:20:32 HIGH 3

Report a package

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

0 / 4000
Your suggestion