mattermost-desktop-git
maintainer Neferin
· 0 votes
· scanned 2026-08-03 00:08:14.047287
LOW
View on AUR ↗
Why flagged
The npx command runs electron-builder locally on the project's own source code, which is a standard part of building the desktop application from its git repository; no untrusted remote code execution occurs.
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 95%): The npx command runs electron-builder locally on the project's own source code, which is a standard part of building the desktop application from its git repository; no untrusted remote code execution occurs.
1 higher static finding superseded - not the current verdict (shown for transparency)
MEDIUM
npx/bunx/deno executes a remote package
remote_code_tool
`npx`/`bunx`/`pnpm dlx`/`deno run <url>` downloads AND runs a remote package at build time — the moral equivalent of piping a download into a shell. Severity downgraded: Node.js consumer context.
-
PKGBUILD:60
npx electron-builder --linux tar.gz --x64 --publish=never
PKGBUILD
1 offending line(s) highlighted
1
# Maintainer: Julian Pollinger <julian@pollinger.dev>
2
3
pkgname=mattermost-desktop-git
4
_pkgname=mattermost-desktop
5
pkgver=5.12.0.c9514850
6
pkgrel=1
7
pkgdesc="Mattermost Desktop for Linux (git)"
8
arch=('x86_64')
9
10
url="https://github.com/mattermost/desktop"
11
license=('Apache')
12
_electron=electron34
13
14
makedepends=('jq' 'nodejs' 'npm' 'git' 'asar' 'rpm-tools' 'moreutils')
15
depends=($_electron 'libxcrypt-compat' 'alsa-lib' 'gtk3' 'libnotify' 'nss' 'libxss' 'libxtst' 'xdg-utils' 'libutil-linux' 'libappindicator-gtk3' 'libsecret')
16
optdepends=()
17
18
conflicts=('mattermost-desktop')
19
provides=("${_pkgname}")
20
21
source=('git+https://github.com/mattermost/desktop.git#branch=master' ${_pkgname}.desktop ${_pkgname}.sh)
22
sha256sums=('SKIP'
23
'29d8bdc503ec71d69efa8b73655a230df00c18667c875a73cb8de31a6d86dd2a'
24
'1c2bf48b6397d04a5a536c5c9f4960db53249c838c380f03f808c612b00ba4c6')
25
26
prepare() {
27
28
cd 'desktop'
29
30
sed -e "s/@ELECTRON@/$_electron/" "../$_pkgname.sh" > "$_pkgname.sh"
31
32
local _electronVersion="$(< "/usr/lib/$_electron/version")"
33
34
jq '.linux["target"] = [ "dir" ]' electron-builder.json | sponge electron-builder.json
35
36
37
jq ' .devDependencies["electron"] = $electronVersion |
38
del(.devDependencies["electron-rebuild"]) |
39
.config.target = $electronVersion |
40
.config.runtime = $electronRuntime' \
41
--arg electronRuntime "$_electron" \
42
--arg electronVersion "$_electronVersion" \
43
package.json |
44
sponge package.jsons
45
sed -i -e '/package:/s/tar.gz deb rpm/dir/' package.json
46
47
48
_npmargs="--cache $srcdir/npm-cache --no-audit --no-fund"
49
50
CFLAGS="-Wno-implicit-function-declaration" npm $_npmargs install
51
}
52
53
build() {
54
cd 'desktop'
55
56
export NODE_ENV=production
57
_npmargs="--cache $srcdir/npm-cache --no-audit --no-fund"
58
59
npm $_npmargs --offline run build-prod
60
npx electron-builder --linux tar.gz --x64 --publish=never
61
}
62
63
package() {
64
cd 'desktop'
65
66
install -Dm0644 -t "$pkgdir/usr/lib/$_pkgname/" release/linux-unpacked/resources/app.asar
67
cp -a release/linux-unpacked/resources/app.asar.unpacked "$pkgdir/usr/lib/$_pkgname/"
68
install -Dm0644 -t "$pkgdir/usr/share/licenses/$_pkgname/" LICENSE.txt
69
install -Dm0644 src/assets/linux/app_icon.png "$pkgdir/usr/share/icons/$_pkgname.png"
70
install -Dm0755 "$_pkgname.sh" "$pkgdir/usr/bin/$_pkgname"
71
install -Dm0644 -t "$pkgdir/usr/share/applications/" "$srcdir/$_pkgname.desktop"
72
73
}
74
75
pkgver() {
76
cd 'desktop'
77
echo -e "$(cat package.json | jq '.version' | sed 's/\"//' | sed 's/.develop.*//').$(git rev-parse --short HEAD)" | sed 's/v//' | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
78
}
79
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 |