libpdfium-nojs
The package builds from official Chromium and PDFium source repositories, with downloads from googlesource.com which, while not on a standard whitelist, are legitimate project hosts; the curl calls fetch only build scripts or version data, not executable binaries, and all sources are version-controlled and checksummed where possible, posing minimal risk.
Triggered rules
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 builds from official Chromium and PDFium source repositories, with downloads from googlesource.com which, while not on a standard whitelist, are legitimate project hosts; the curl calls fetch only build scripts or version data, not executable binaries, and all sources are version-controlled and checksummed where possible, posing minimal risk.
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:57
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:92
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=8059.r3.39f0ed4a65
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"
"git+https://chromium.googlesource.com/external/github.com/jk-jeon/dragonbox.git#branch=upstream/master"
"libpdfium.pc"
)
md5sums=('SKIP'
'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
ln -sf $srcdir/dragonbox third_party/dragonbox/src
# 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 "$srcdir/pdfium/third_party/fast_float/src/include/"
ln -sfn /usr/include/fast_float "$srcdir/pdfium/third_party/fast_float/src/include/fast_float"
# 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[*]}" --script-executable=python3
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-11-01 00:21:48 | Low | 3 |
| 2026-10-31 00:07:41 | Low | 3 |
| 2026-10-30 00:29:30 | Low | 3 |
| 2026-10-29 00:13:55 | Low | 3 |
| 2026-10-28 00:06:54 | Low | 3 |
| 2026-10-27 00:23:28 | Low | 3 |
| 2026-10-26 00:12:40 | Low | 3 |
| 2026-10-25 00:20:48 | Low | 3 |
| 2026-10-24 00:14:55 | Low | 3 |
| 2026-10-23 00:02:19 | Low | 3 |
| 2026-10-22 00:13:10 | Low | 3 |
| 2026-10-21 00:12:50 | Low | 3 |
| 2026-10-20 00:10:31 | Low | 3 |
| 2026-10-19 00:03:55 | Low | 3 |
| 2026-10-18 00:06:55 | Low | 3 |
| 2026-10-17 00:21:55 | Low | 3 |
| 2026-10-16 00:12:47 | Low | 3 |
| 2026-10-15 00:28:05 | Low | 3 |
| 2026-10-14 00:06:47 | Low | 3 |
| 2026-10-13 00:23:45 | Low | 3 |