libpdfium-nojs
Triggered rules
llm_review
The static rules flagged this MEDIUM, but an AI model (qwen/qwen3-235b-a22b-07-25) reviewed the full PKGBUILD and judged it LOW (confidence 95%): The package builds from official project repositories (pdfium.googlesource.com, chromium.googlesource.com), which are legitimate sources for Pdfium and its dependencies; the external downloads via curl are for a publicly available, non-executable Python script used in the build process and do not introduce remote code execution or supply-chain risks, as the script is part of the standard Chromium build tooling and is used transparently to generate headers.
2 higher static findings superseded - not the current verdict (shown for transparency)
external_download_not_in_source
curl/wget fetches a URL on a non-allowlisted host that is not part of source=(), so it is not checksum-verified by makepkg.
-
PKGBUILD:53
chrome_version="$(curl https://versionhistory.googleapis.com/v1/chrome/platforms/linux/channels/stable/versions/all/releases | grep 'version' | head -1 | cut -d'.' -f 3)" -
PKGBUILD:88
curl https://chromium.googlesource.com/chromium/src/+/main/tools/generate_shim_headers/generate_shim_headers.py?format=TEXT \
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:15
source=("git+https://pdfium.googlesource.com/pdfium" -
PKGBUILD:16
"git+https://chromium.googlesource.com/chromium/src/build.git"
PKGBUILD
4 offending line(s) highlighted# Maintainer: Felix Kauselmann <licorn@gmail.com>
pkgname=libpdfium-nojs
pkgver=7871.r1.c052afb72a
pkgrel=1
pkgdesc="Open-source PDF rendering engine."
arch=('x86_64')
url="https://pdfium.googlesource.com/pdfium/"
license=('BSD')
depends=('freetype2' 'lcms2' 'libjpeg-turbo' 'openjpeg2' 'icu' 'harfbuzz')
conflicts=('libpdfium-bin')
provides=('libpdfium')
makedepends=('git' 'python' 'gn' 'ninja' 'fast_float')
source=("git+https://pdfium.googlesource.com/pdfium"
"git+https://chromium.googlesource.com/chromium/src/build.git"
"git+https://chromium.googlesource.com/chromium/src/third_party/abseil-cpp"
"git+https://chromium.googlesource.com/chromium/src/third_party/simdutf"
"libpdfium.pc"
)
md5sums=('SKIP'
'SKIP'
'SKIP'
'SKIP'
'feb270967925a0844b1b9a9e15288eb3')
pkgver() {
cd $srcdir/pdfium
# Version = branch name/number + number of commits since branch creation
# + short head
printf "%s.r%s.%s" $(git rev-parse --abbrev-ref HEAD | cut -d '/' -f2)\
$(git rev-list --count main..) $(git rev-parse --short HEAD)
}
prepare() {
cd "$srcdir/pdfium"
ln -sf $srcdir/build build
ln -sf $srcdir/abseil-cpp third_party/abseil-cpp
ln -sf $srcdir/simdutf third_party/simdutf
# Pdfium is developed alongside Chromium and does not provide releases
# Upstream recommends using Chromium's dev channels instead
# Extract pdfium branch name used in stable channel from chrome version history and do
# a checkout
chrome_version="$(curl https://versionhistory.googleapis.com/v1/chrome/platforms/linux/channels/stable/versions/all/releases | grep 'version' | head -1 | cut -d'.' -f 3)"
# chrome_version="$(curl https://versionhistory.googleapis.com/v1/chrome/platforms/linux/channels/beta/versions/all/releases | grep 'version' | head -1 | cut -d'.' -f 3)"
# chrome_version="$(curl https://versionhistory.googleapis.com/v1/chrome/platforms/linux/channels/dev/versions/all/releases | grep 'version' | head -1 | cut -d'.' -f 3)"
git checkout "chromium/$chrome_version"
# Extract build repo revision needed from DEPS file and do a checkout
cd "$srcdir/pdfium/build"
# Use a newer build revision to work around a build system bug in v6367
if [[ $chrome_version -gt 7049 ]]
then
git checkout $(awk '/build_revision/ {print substr($2,2,40)}' $srcdir/pdfium/DEPS) -q
else
git checkout 3dd73ffc3708962da298795d99f35fc06ed0defc -q
fi
# Extract abseil-cpp repo revision needed from DEPS file and do a checkout
cd "$srcdir/pdfium/third_party/abseil-cpp"
git checkout $(awk '/abseil_revision/ {print substr($2,2,40)}' $srcdir/pdfium/DEPS) -q
# Patch abseil build to be static
sed -i 's/component(/static_library(/' BUILD.gn
sed -i 's/is_component_build(/false/' BUILD.gn
# Use system fast_float
mkdir -p third_party/fast_float/src/include/
ln -sf /usr/include/fast_float third_party/fast_float/src/include/
# Use system provided icu library (unbundling)
mkdir -p "$srcdir/pdfium/third_party/icu"
ln -sf "$srcdir/build/linux/unbundle/icu.gn" "$srcdir/pdfium/third_party/icu/BUILD.gn"
# Download and decode shim header script needed to unbundle icu (gittiles is weird)
mkdir -p "$srcdir/pdfium/tools/generate_shim_headers/"
echo "Downloading generate_shim_headers script from Chromium."
curl https://chromium.googlesource.com/chromium/src/+/main/tools/generate_shim_headers/generate_shim_headers.py?format=TEXT \
| base64 --decode > "$srcdir/pdfium/tools/generate_shim_headers/generate_shim_headers.py"
echo "Done."
# Create fake gclient_args.gni file to satisfy include list for build/config/compiler/compiler.gni
touch "$srcdir/build/config/gclient_args.gni"
echo "build_with_chromium = false" > "$srcdir/build/config/gclient_args.gni"
# Exclude test fonts from build
cd "$srcdir/pdfium/testing/"
sed -i '/"\/\/third_party\/test_fonts",/s/^/#/g' BUILD.gn
}
build() {
cd "$srcdir/pdfium"
local _flags=(
'is_clang=false'
'use_sysroot=false'
'is_debug=false'
'symbol_level=0'
'pdf_enable_v8=false'
'pdf_enable_xfa=false'
'treat_warnings_as_errors=false'
'use_system_libjpeg=true'
'use_system_zlib=true'
'pdf_bundle_freetype=false'
'use_system_freetype=true'
'use_system_lcms2=true'
'use_system_libpng=true'
'use_custom_libcxx=false'
'pdf_is_standalone = true'
'use_system_libopenjpeg2 = true'
'is_component_build = true'
'pdf_use_partition_alloc = false'
'use_system_harfbuzz = true'
)
gn gen out/Release --args="${_flags[*]}"
ninja -C out/Release pdfium
# Set pdfium version in pc file
sed "s/@VERSION@/${pkgver}/g" -i "${srcdir}/libpdfium.pc"
}
package() {
cd "$srcdir/pdfium"
install -D -m644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
install -D public/*.h --target-directory="${pkgdir}/usr/include/pdfium"
install -D public/cpp/* --target-directory="${pkgdir}/usr/include/pdfium/cpp"
install -D docs/* --target-directory="${pkgdir}/usr/share/doc/pdfium"
install -Dm755 out/Release/libpdfium.so --target-directory="${pkgdir}/usr/lib"
install -Dm644 ${srcdir}/libpdfium.pc --target-directory=${pkgdir}/usr/lib/pkgconfig
}
Scan history
| Scanned at (UTC) | Severity | Rules |
|---|---|---|
| 2026-08-03 00:08:14 | LOW | 3 |
| 2026-08-02 00:16:08 | LOW | 3 |
| 2026-08-01 00:11:18 | LOW | 3 |
| 2026-07-31 00:14:10 | LOW | 3 |
| 2026-07-30 00:17:23 | LOW | 3 |
| 2026-07-29 00:25:53 | LOW | 3 |
| 2026-07-28 00:07:28 | LOW | 3 |
| 2026-07-27 00:24:32 | LOW | 3 |
| 2026-07-26 00:07:32 | LOW | 3 |
| 2026-07-25 00:13:44 | LOW | 3 |
| 2026-07-24 00:02:28 | LOW | 3 |
| 2026-07-23 00:14:47 | LOW | 3 |
| 2026-07-22 00:29:32 | LOW | 3 |
| 2026-07-21 00:24:15 | LOW | 3 |
| 2026-07-20 00:19:49 | LOW | 3 |
| 2026-07-19 00:17:08 | LOW | 3 |
| 2026-07-18 00:14:48 | LOW | 3 |
| 2026-07-17 00:06:16 | LOW | 3 |
| 2026-07-16 00:05:41 | LOW | 3 |
| 2026-07-15 00:09:25 | LOW | 3 |