librechat
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 a legitimate project source and the flagged npm install is part of the normal build process; the privileged install in .install is standard for systemd services and creating system users, not malicious.
2 higher static findings 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:40
npm install --no-save unrun
privileged_install
The package grants elevated privileges or installs an update path outside pacman: a /etc/sudoers.d rule (often passwordless), a setuid/setgid binary, or a self-update script/service that can fetch and run future code with no checksum verification. The initial install may be verified, but the ongoing privilege + update surface is a real supply-chain / privilege-escalation risk.
-
.install:29
chmod g+s /usr/lib/librechat
PKGBUILD
1 offending line(s) highlighted# Maintainer: Vitaliy VVS Star <vitaliy <dot> star <at> Gmail-DOT-Com>
# shellcheck shell=bash disable=SC2034,SC2154
pkgname=librechat
pkgver=0.8.7
pkgrel=1
pkgdesc="Open-source ChatGPT clone fully customizable and compatible with any AI provider"
arch=('x86_64')
url="https://github.com/danny-avila/LibreChat"
license=('MIT')
depends=(gcc-libs glibc nodejs libvips)
optdepends=(
'mongodb: default DB used by LibreChat'
'nginx: http service to optionally serve the librechat webapp'
'meilisearch: improved chat indexing and search'
)
makedepends=('npm' 'node-gyp' 'pkgconf')
install=librechat.install
backup=(etc/librechat/librechat.env etc/librechat/librechat.yaml)
options=(!strip)
source=(
"$pkgname-$pkgver.tar.gz::https://github.com/danny-avila/LibreChat/archive/refs/tags/v$pkgver.tar.gz"
librechat.install librechat.env librechat.service librechat.sysusers librechat-server.sh
)
sha256sums=('de94ba3ecc8053f0cf494071da19882e2fe509bfd9f32451f1f12cb715b8e7b6'
'063927ce15c895c49252b1d0e12dbf7aa15c6a335630576db7cee0c4beaf964f'
'c1996fb6baa3f6decfdf27cac916ab6a9eb49bd9ff28e5a350dc9396c96ff0e4'
'6d8d9cbf687b9978ca33be6ae270fe2a6a65938ee945d3dca5435531ba5cadf8'
'98e0aa0ac2e301a82d1d9cb567f361cb86af09a9b7b7bf65a526098fc4789339'
'0dc9d536ad4740e19ac8346a7e8372b5e65cd0653755db339edc126d019ea955')
build() {
cd "LibreChat-$pkgver"
# Install dependencies
npm config set cache "$srcdir/.npm-cache"
npm ci
# tsdown requires unrun module which isn't resolved by npm ci
npm install --no-save unrun
# Build the frontend
npm run frontend
npm prune --omit=dev
}
package() {
cd "LibreChat-$pkgver"
# push compiled tree to usrlib restricted to user+group
chmod -R g=u . #copy user->group perms
# package node service
install -dm2775 "$pkgdir/usr/lib/${pkgname}"
cp -a . "$pkgdir/usr/lib/${pkgname}"
# package client webapp
install -dm775 "$pkgdir/usr/share/webapps/${pkgname}"
cp -a client/dist/* "$pkgdir/usr/share/webapps/${pkgname}"
# clean left over npm .cache directories
find "${pkgdir}" -path "*/node_modules/.cache" -type d -exec rm -rf {} + 2>/dev/null || true
# launch wrapper with env
install -dm755 "$pkgdir/usr/bin"
install -Dm755 "$srcdir/librechat-server.sh" "$pkgdir/usr/bin/librechat-server"
# service and service user creation
install -Dm644 "$srcdir/$pkgname.service" "$pkgdir/usr/lib/systemd/system/$pkgname.service"
install -Dm644 "$srcdir/$pkgname.sysusers" "$pkgdir/usr/lib/sysusers.d/$pkgname.conf"
# Config and sample
install -Dm644 "$srcdir/LibreChat-$pkgver/librechat.example.yaml" "$pkgdir/etc/librechat/librechat.yaml"
install -Dm644 "$srcdir/librechat.env" "$pkgdir/etc/librechat/librechat.env"
# Add some docs
install -Dm644 "$srcdir/LibreChat-$pkgver"/{client/nginx.conf,rag.yml,README.md,CHANGELOG.md} -t "$pkgdir/usr/share/doc/$pkgname/" || true
# Populate sample env on top of our defaults
cat .env.example >>"$pkgdir/etc/librechat/librechat.env"
# Add latest examples from source package
install -Dm644 "$srcdir/LibreChat-$pkgver/.env.example" "$pkgdir/etc/librechat/librechat.example.env"
install -Dm644 "$srcdir/LibreChat-$pkgver/librechat.example.yaml" -t "$pkgdir/etc/librechat"
install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}
# vim:set ts=2 sw=2 et:
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 09:20:02 | MEDIUM | 2 |
| 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 |