audiobookshelf-git
The npm install in prepare() is for 'pkg', a build tool used to package the application, and is part of the normal build process from the project's own source; the package is built from a git checkout of the official repository, and no untrusted remote code is executed.
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 npm install in prepare() is for 'pkg', a build tool used to package the application, and is part of the normal build process from the project's own source; the package is built from a git checkout of the official repository, and no untrusted remote code is executed.
1 higher static finding superseded - not the current verdict (shown for transparency)
npm_install_external
Runs `npm/yarn/pnpm install <package>` for a package not in source=(), pulling unpinned, unreviewed code at build time. Severity downgraded: the package declares/looks like a Node.js consumer, where build-time installs are expected.
-
PKGBUILD:39
npm install pkg
PKGBUILD
1 offending line(s) highlighted# Maintainer: Kevin S <aur@eldenring.mozmail.com>
pkgname=audiobookshelf-git
pkgver=v2.2.23.r28.gd86a3b3d
pkgrel=1
pkgdesc="Self-hosted audiobook server for managing and playing audiobooks"
arch=('any')
url="https://github.com/advplyr/audiobookshelf"
license=('GPL3')
depends=('ffmpeg')
makedepends=('nodejs' 'npm' 'git')
optdepends=('tone-bin')
provides=("audiobookshelf")
conflicts=("audiobookshelf")
backup=('etc/conf.d/audiobookshelf')
options=(!strip)
source=(${pkgname}::git+"${url}".git
'audiobookshelf.conf.d'
'audiobookshelf.hook'
'audiobookshelf.service'
'audiobookshelf.sysusers'
'audiobookshelf.tmpfiles')
md5sums=('SKIP'
'de5fab845f7f96b49956c7dc21268593'
'749322fc2b48a839a79a638d879e77a4'
'ce89e5d2ce27de70b5e6b53cbaf595f0'
'63619dfc5bb5b2dbecfb1d6037095338'
'90e34ac4e5a79f71af3eaab8cebf1198')
pkgver() {
cd "$pkgname"
git describe --long | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
}
prepare() {
cd "${srcdir}/${pkgname}"
# install build dependencies
npm install pkg
}
build() {
cd "${srcdir}/${pkgname}"
echo ">>> Building Client"
echo "--------------------"
cd client
rm -rf node_modules
npm ci --unsafe-perm=true --allow-root
NODE_OPTIONS=--openssl-legacy-provider npm run generate
cd ..
echo ">>> Building Server"
echo "--------------------"
rm -rf node_modules
npm ci --unsafe-perm=true --allow-root
}
package() {
cd "${srcdir}/${pkgname}"
install -d -m 755 "${pkgdir}/usr/share/audiobookshelf/"
"${srcdir}/${pkgname}"/node_modules/.bin/pkg -t node16-linux -o "${pkgdir}/usr/share/audiobookshelf/audiobookshelf" .
install -D -m 644 "LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
install -D -m 644 "${srcdir}/audiobookshelf.conf.d" "${pkgdir}/etc/conf.d/audiobookshelf"
install -D -m 644 "${srcdir}/audiobookshelf.service" "${pkgdir}/usr/lib/systemd/system/audiobookshelf.service"
install -D -m 644 "${srcdir}/audiobookshelf.sysusers" "${pkgdir}/usr/lib/sysusers.d/audiobookshelf.conf"
install -D -m 644 "${srcdir}/audiobookshelf.tmpfiles" "${pkgdir}/usr/lib/tmpfiles.d/audiobookshelf.conf"
install -D -m 644 "${srcdir}/audiobookshelf.hook" "${pkgdir}/usr/share/doc/${pkgname}/audiobookshelf.hook"
}
Scan history
| Scanned at (UTC) | Severity | Rules |
|---|---|---|
| 2026-09-17 00:27:14 | Low | 2 |
| 2026-09-16 00:03:17 | Low | 2 |
| 2026-09-15 00:25:31 | Low | 2 |
| 2026-09-14 00:27:57 | Low | 2 |
| 2026-09-13 00:19:54 | Low | 2 |
| 2026-09-12 00:25:17 | Low | 2 |
| 2026-09-11 00:19:22 | Low | 2 |
| 2026-09-10 00:22:44 | Low | 2 |
| 2026-09-09 00:04:09 | Low | 2 |
| 2026-09-08 00:18:08 | Low | 2 |
| 2026-09-07 00:30:15 | Low | 2 |
| 2026-09-06 00:17:06 | Low | 2 |
| 2026-09-05 00:16:27 | Low | 2 |
| 2026-09-04 00:03:13 | Low | 2 |
| 2026-09-03 00:15:47 | Low | 2 |
| 2026-09-02 00:02:31 | Low | 2 |
| 2026-09-01 00:11:19 | Low | 2 |
| 2026-08-31 00:19:57 | Low | 2 |
| 2026-08-30 00:04:14 | Low | 2 |
| 2026-08-29 00:29:17 | Low | 2 |