nodejs-pkg
The PKGBUILD downloads a source tarball from GitHub (with a sha512 checksum) but then explicitly ignores it (noextract) and instead installs directly from the npm registry via 'npm install -g pkg@5.8.1'. This means the integrity check on the GitHub tarball is meaningless — the actual installed content comes from npm without any checksum verification. This is a genuine supply-chain concern: the npm package content is not verified against any declared hash, and a compromised or substituted npm package would be installed silently. The commented-out line shows the correct approach (installing from the local tarball) was intentionally bypassed. This pattern is a real medium-severity supply-chain risk, not a false positive.
Triggered rules
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:20
npm install -g pkg@${pkgver} --user root --prefix "${pkgdir}/usr"
llm_review
An AI model (anthropic/claude-4.6-sonnet-20260217) reviewed this and agrees it is MEDIUM (confidence 85%): The PKGBUILD downloads a source tarball from GitHub (with a sha512 checksum) but then explicitly ignores it (noextract) and instead installs directly from the npm registry via 'npm install -g pkg@5.8.1'. This means the integrity check on the GitHub tarball is meaningless — the actual installed content comes from npm without any checksum verification. This is a genuine supply-chain concern: the npm package content is not verified against any declared hash, and a compromised or substituted npm package would be installed silently. The commented-out line shows the correct approach (installing from the local tarball) was intentionally bypassed. This pattern is a real medium-severity supply-chain risk, not a false positive.
PKGBUILD
1 offending line(s) highlighted# Maintainer: Jonas Heinrich <onny@project-insanity.org>
# Contributor: Popolon <popolon@popolon.org> (just upgraded to 5.8.1 and added the conflict with nodejs-shelljs)
# Contributor: Jonas Heinrich <onny@project-insanity.org>
pkgname=nodejs-pkg
pkgver=5.8.1
pkgrel=1
pkgdesc="Package your Node.js project into an executable"
arch=('x86_64')
url="https://github.com/zeit/pkg"
license=('MIT')
makedepends=('npm')
conflicts=('nodejs-shelljs')
source=("${pkgname}-${pkgver}.tar.gz::https://github.com/zeit/pkg/archive/${pkgver}.tar.gz")
sha512sums=('bdf0c04743e338393b8a942c7ae53e531ad260a7bcb1bca2560238b13a55f214a9f384d4d122679a1ccab0f471fef0beb35a5b197563b5e8ee141854d1558086')
noextract=("${pkgname}-${pkgver}.tar.gz")
package() {
#npm install -g --user root --prefix "${pkgdir}/usr" "${srcdir}/${pkgname}-${pkgver}.tar.gz"
npm install -g pkg@${pkgver} --user root --prefix "${pkgdir}/usr"
# Non-deterministic race in npm gives 777 permissions to random directories.
# See https://github.com/npm/npm/issues/9359 for details.
find "${pkgdir}/usr" -type d -exec chmod 755 {} +
# npm gives ownership of ALL FILES to build user
# https://bugs.archlinux.org/task/63396
chown -R root:root "${pkgdir}"
}
Scan history
| Scanned at (UTC) | Severity | Rules |
|---|---|---|
| 2026-09-17 00:27:14 | Medium | 2 |
| 2026-09-16 00:03:17 | Medium | 2 |
| 2026-09-15 00:25:31 | Medium | 2 |
| 2026-09-14 00:27:57 | Medium | 2 |
| 2026-09-13 00:19:54 | Medium | 2 |
| 2026-09-12 00:25:17 | Medium | 2 |
| 2026-09-11 00:19:22 | Medium | 2 |
| 2026-09-10 00:22:44 | Medium | 2 |
| 2026-09-09 00:04:09 | Medium | 2 |
| 2026-09-08 00:18:08 | Medium | 2 |
| 2026-09-07 00:30:15 | Medium | 2 |
| 2026-09-06 00:17:06 | Medium | 2 |
| 2026-09-05 00:16:27 | Medium | 2 |
| 2026-09-04 00:03:13 | Medium | 2 |
| 2026-09-03 00:15:47 | Medium | 2 |
| 2026-09-02 00:02:31 | Medium | 2 |
| 2026-09-01 00:11:19 | Medium | 2 |
| 2026-08-31 00:19:57 | Medium | 2 |
| 2026-08-30 00:04:14 | Medium | 2 |
| 2026-08-29 00:29:17 | Medium | 2 |