media-compressor-git
The npx/bunx calls (tsc, vite build, electron-builder) are standard build tools invoked from the project's own locally-installed node_modules after 'bun install', not fetching arbitrary remote packages at runtime; the overall pattern is a normal Electron app built from the project's own GitHub source with system electron, posing no meaningful supply-chain risk beyond the usual AUR caveats.
Triggered rules
zero_votes_recent
Uploaded within the last 14 days with 2 or fewer community votes — little peer review so far.
llm_review
The static rules flagged this MEDIUM, but an AI model (anthropic/claude-sonnet-4.6) reviewed the full PKGBUILD and judged it LOW (confidence 70%): The npx/bunx calls (tsc, vite build, electron-builder) are standard build tools invoked from the project's own locally-installed node_modules after 'bun install', not fetching arbitrary remote packages at runtime; the overall pattern is a normal Electron app built from the project's own GitHub source with system electron, posing no meaningful supply-chain risk beyond the usual AUR caveats.
1 higher static finding superseded - not the current verdict (shown for transparency)
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:107
bunx tsc -
PKGBUILD:108
bunx vite build -
PKGBUILD:109
bunx electron-builder --linux dir -c.electronDist="${ELECTRON_DIST}" --config electron-builder.json
PKGBUILD
3 offending line(s) highlighted# Maintainer: zxp19821005 <zxp19821005 at 163 dot com>
pkgname=media-compressor-git
_pkgname='Media Compressor'
pkgver=0.4.0.r9.gf977b43
_electronversion=33
_nodeversion=20
pkgrel=1
pkgdesc="A free, user-friendly application designed to simplify media file compression. Built with React and TypeScript, this lightweight tool helps you reduce file sizes without compromising quality."
arch=('any')
url="https://max-im.github.io/media-compressor/"
_ghurl="https://github.com/Max-im/media-compressor"
license=('MIT')
conflicts=("${pkgname%-git}")
provides=("${pkgname%-git}=${pkgver%.r*}")
depends=(
"electron${_electronversion}-bin"
'ffmpeg'
'nodejs'
)
makedepends=(
'gendesk'
'bun'
'nvm'
'git'
'jq'
'asar'
)
source=(
"${pkgname%-git}.git::git+${_ghurl}"
"${pkgname%-git}.sh"
)
sha256sums=('SKIP'
'dfcd6603d29c7b8d88e019b517a2e5c1a7b5ab905a0961a8b81adfa508b258b8')
_get_project_dir() {
local d
while IFS= read -r d; do
find "$d" -name "package.json" ! -path "*/node_modules/*" 2>/dev/null | grep -q . && { echo "$d"; return; }
done < <(find "${srcdir}" -maxdepth 1 -mindepth 1 -type d ! -name '.*')
}
pkgver() {
cd "$(_get_project_dir)"
set -o pipefail
git describe --long --tags --abbrev=7 | sed 's/\([^-]*-g\)/r\1/;s/-/./g;s/v//g' ||
printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short=7 HEAD)"
}
_ensure_local_nvm() {
local NVM_DIR="${srcdir}/.nvm"
source /usr/share/nvm/init-nvm.sh || [[ $? != 1 ]]
nvm install "${_nodeversion}"
nvm use "${_nodeversion}"
}
_get_app_dir() {
find "${srcdir}" -type f -name "resources.pak" ! -path "*/node_modules/*" -print 2>/dev/null | while read f; do [ -d "${f%/*}/resources" ] && echo "${f%/*}" && break; done
}
_get_electron_version() {
_elec_ver=$(find "$(_get_project_dir)" -name "package.json" ! -path "*/node_modules/*" -print \
| xargs -I{} jq -r '(.devDependencies.electron // .dependencies.electron) // empty' {} 2>/dev/null \
| grep -oE '[0-9]+' | head -1)
[[ -z "${_elec_ver}" ]] && return 1
(( _elec_ver == _electronversion )) && c=32 || c=31
echo -e "Electron version: \033[1;${c}m${_elec_ver}$([[ $c -eq 31 ]] && echo " (expected ${_electronversion})")\033[0m"
}
_set_build_env() {
export ELECTRON_DIST="/usr/lib/electron${_electronversion}"
export ELECTRON_OVERRIDE_DIST_PATH="${ELECTRON_DIST}"
export ELECTRON_SKIP_BINARY_DOWNLOAD=1
export ELECTRON_BUILDER_OFFLINE=true
export SYSTEM_ELECTRON_VERSION="$(electron${_electronversion} -v | sed 's/^v//')"
export HOME="${srcdir}/.home"
export XDG_CACHE_HOME="${HOME}/.cache"
export XDG_CONFIG_HOME="${HOME}/.config"
export XDG_DATA_HOME="${HOME}/.local/share"
export BUN_INSTALL_CACHE_DIR="${HOME}/.bun/cache"
export BUN_INSTALL_GLOBAL_DIR="${HOME}/.bun/global"
export BUN_INSTALL_BIN="${HOME}/.bun/bin"
export BUN_CONFIG_SKIP_SAVE_LOCKFILE=1
export BUN_CONFIG_SKIP_LOAD_LOCKFILE=1
export BUN_DISABLE_DOTENV=1
export DO_NOT_TRACK=1
export BUN_JOBS="$(nproc)"
mkdir -p "${HOME}" "${BUN_INSTALL_CACHE_DIR}" "${BUN_INSTALL_GLOBAL_DIR}" "${BUN_INSTALL_BIN}"
}
prepare() {
cd "$(_get_project_dir)/app"
_get_electron_version
sed -i -e "
s/@electronversion@/${_electronversion}/g
s/@appname@/${pkgname%-git}/g
" "${srcdir}/${pkgname%-git}.sh"
gendesk -q -f -n \
--pkgname="${pkgname%-git}" \
--pkgdesc="${pkgdesc}" \
--categories="Utility" \
--name="${pkgname%-git}" \
--exec="${pkgname%-git} %U"
_ensure_local_nvm
_set_build_env
find src -type f -exec sed -i "s/process.resourcesPath/\'\/usr\/lib\/${pkgname%-git}\'/g" {} +
jq --arg ver "${SYSTEM_ELECTRON_VERSION}" '.devDependencies.electron = $ver' package.json > package.json.tmp && mv package.json.tmp package.json
find src -type f -exec sed -i "s/process.resourcesPath/\'\/usr\/lib\/${pkgname%-git}\'/g" {} +
bun install
}
build() {
cd "$(_get_project_dir)/app"
_ensure_local_nvm
_set_build_env
bunx tsc
bunx vite build
bunx electron-builder --linux dir -c.electronDist="${ELECTRON_DIST}" --config electron-builder.json
ln -sf "/usr/bin/ffprobe" "$(_get_app_dir)/resources/app.asar.unpacked/node_modules/@ffprobe-installer/linux-x64/ffprobe"
ln -sf "/usr/bin/ffprobe" "$(_get_app_dir)/resources/app.asar.unpacked/node_modules/get-video-duration/node_modules/@ffprobe-installer/ffprobe/node_modules/@ffprobe-installer/linux-x64/ffprobe"
ln -sf "/usr/bin/ffmpeg" "$(_get_app_dir)/resources/app.asar.unpacked/node_modules/ffmpeg-static/ffmpeg"
}
package() {
install -Dm755 "${srcdir}/${pkgname%-git}.sh" "${pkgdir}/usr/bin/${pkgname%-git}"
install -Dm755 -d "${pkgdir}/usr/lib/${pkgname%-git}"
rm -rf "$(_get_app_dir)/resources/default_app.asar"
cp -a "$(_get_app_dir)/resources/." "${pkgdir}/usr/lib/${pkgname%-git}/"
install -Dm644 "$(_get_project_dir)/app/${pkgname%-git}.desktop" -t "${pkgdir}/usr/share/applications"
install -Dm644 "$(_get_project_dir)/app/build/icon.png" "${pkgdir}/usr/share/icons/hicolor/512x512/apps/${pkgname%-git}.png"
install -Dm644 "$(_get_project_dir)/LICENSE" -t "${pkgdir}/usr/share/licenses/${pkgname}"
}
Scan history
| Scanned at (UTC) | Severity | Rules |
|---|---|---|
| 2026-10-17 00:21:55 | Low | 3 |
| 2026-10-16 00:12:47 | Low | 3 |
| 2026-10-15 00:28:05 | Low | 3 |
| 2026-10-14 00:06:47 | Low | 3 |
| 2026-10-13 09:18:16 | Low | 3 |
| 2026-10-13 09:16:20 | Medium | 2 |