asmx-g3-git
maintainer TaiHusk
· 0 votes
· scanned 2026-08-03 00:08:14.047287
LOW
View on AUR ↗
Why flagged
The npm install commands in build() are for dev dependencies (typescript, @types/node) and project dependencies via package.json, which is part of the checked-out git source; this is normal for Node.js projects and not an undeclared external package install.
Triggered rules
LOW
AI review downgraded a static finding
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 90%): The npm install commands in build() are for dev dependencies (typescript, @types/node) and project dependencies via package.json, which is part of the checked-out git source; this is normal for Node.js projects and not an undeclared external package install.
1 higher static finding superseded - not the current verdict (shown for transparency)
MEDIUM
npm/yarn/pnpm install of an undeclared external package
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:25
npm install --save-dev typescript -
PKGBUILD:26
npm install --save-dev @types/node
PKGBUILD
2 offending line(s) highlighted
1
pkgname=asmx-g3-git
2
pkgver=r17.c89a3ce
3
pkgrel=1
4
pkgdesc="AsmX G3 Compiler - a compiler for AsmX language"
5
arch=('any')
6
url="https://github.com/AsmXFoundation/AsmX-G3"
7
license=('MIT')
8
depends=('nodejs' 'bash')
9
makedepends=('git' 'npm' 'jq' 'typescript')
10
provides=('asmx-g3')
11
conflicts=('asmx-g3')
12
source=("git+https://github.com/AsmXFoundation/AsmX-G3.git")
13
sha256sums=('SKIP')
14
15
pkgver() {
16
cd AsmX-G3
17
printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
18
}
19
20
build() {
21
# Navigate to the correct directory containing package.json
22
cd "$srcdir/AsmX-G3"
23
24
# install TypeScript and Node.js typings (local dev deps)
25
npm install --save-dev typescript
26
npm install --save-dev @types/node
27
28
# install dependencies but skip project "install" script
29
npm install --ignore-scripts
30
31
# build with TypeScript compiler
32
npm run build
33
}
34
35
package() {
36
cd "$srcdir/AsmX-G3"
37
38
# install module into /usr/lib/node_modules/asmx-g3
39
npm install --ignore-scripts --prefix "$pkgdir/usr/lib/node_modules/asmx-g3" .
40
41
# remove invalid symlink created by npm
42
rm -f "$pkgdir/usr/lib/node_modules/asmx-g3/node_modules/.bin/asmx"
43
rm -rf "$pkgdir/usr/lib/node_modules/asmx-g3/node_modules/asmx-g3"
44
45
# copy all sources from src
46
cp -r --no-preserve=mode,ownership "$srcdir/AsmX-G3/src/." \
47
"$pkgdir/usr/lib/node_modules/asmx-g3/"
48
49
# copy node_modules including llvm.js
50
cp -r --no-preserve=mode,ownership "$srcdir/AsmX-G3/node_modules/." \
51
"$pkgdir/usr/lib/node_modules/asmx-g3/node_modules/"
52
53
# fix permissions for binary
54
chmod 755 "$pkgdir/usr/lib/node_modules/asmx-g3/bin/asmx"
55
56
# create symlink for executable
57
install -dm755 "$pkgdir/usr/bin"
58
ln -sf "/usr/lib/node_modules/asmx-g3/bin/asmx" "$pkgdir/usr/bin/asmx"
59
60
# clean references to $srcdir/$pkgdir in package.json
61
find "$pkgdir" -name package.json -print0 | xargs -r -0 sed -i '/_where/d'
62
63
# remove internal npm keys from package.json
64
local tmppackage="$(mktemp)"
65
local pkgjson="$pkgdir/usr/lib/node_modules/asmx-g3/package.json"
66
jq '.|=with_entries(select(.key|test("_.+")|not))' "$pkgjson" > "$tmppackage"
67
mv "$tmppackage" "$pkgjson"
68
chmod 644 "$pkgjson"
69
70
# install documentation
71
install -Dm644 "$srcdir/AsmX-G3/README.md" "$pkgdir/usr/share/doc/$pkgname/README.md"
72
}
73
Scan history
| Scanned at (UTC) | Severity | Rules |
|---|---|---|
| 2026-08-03 00:08:14 | LOW | 2 |
| 2026-08-02 00:16:08 | LOW | 2 |
| 2026-08-01 00:11:18 | LOW | 2 |
| 2026-07-31 00:14:10 | LOW | 2 |
| 2026-07-30 00:17:23 | LOW | 2 |
| 2026-07-29 00:25:53 | LOW | 2 |
| 2026-07-28 00:07:28 | LOW | 2 |
| 2026-07-27 00:24:32 | LOW | 2 |
| 2026-07-26 00:07:32 | LOW | 2 |
| 2026-07-25 00:13:44 | LOW | 2 |
| 2026-07-24 00:02:28 | LOW | 2 |
| 2026-07-23 00:14:47 | LOW | 2 |
| 2026-07-22 00:29:32 | LOW | 2 |
| 2026-07-21 00:24:15 | LOW | 2 |
| 2026-07-20 00:19:49 | LOW | 2 |
| 2026-07-19 00:17:08 | LOW | 2 |
| 2026-07-18 00:14:48 | LOW | 2 |
| 2026-07-17 00:06:16 | LOW | 2 |
| 2026-07-16 00:05:41 | LOW | 2 |
| 2026-07-15 00:09:25 | LOW | 2 |