profer-git
The `bunx electron-builder` call executes a package from the npm registry but electron-builder is a well-known, widely-used build tool for Electron apps; the rest of the build follows standard AUR Electron packaging patterns (building from the project's own git source, using system electron), so there is no clear malicious behaviour, just the inherent supply-chain risk of pulling npm dependencies at build time.
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 `bunx electron-builder` call executes a package from the npm registry but electron-builder is a well-known, widely-used build tool for Electron apps; the rest of the build follows standard AUR Electron packaging patterns (building from the project's own git source, using system electron), so there is no clear malicious behaviour, just the inherent supply-chain risk of pulling npm dependencies at build time.
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:119
bunx electron-builder --linux dir -c.electronDist="${ELECTRON_DIST}" --config electron-builder.yml
PKGBUILD
1 offending line(s) highlighted# Maintainer: zxp19821005 <zxp19821005 at 163 dot com>
pkgname=profer-git
_pkgname=profer
pkgver=0.16.22.r1.g424a9df
_electronversion=43
_nodeversion=24
pkgrel=1
pkgdesc="General AI Agent desktop application based on Claude Agent SDK and Pi runtime: multi-model access, collaborative sub-agent, timed task automation, tablet remote access, and team workspace."
arch=('any')
url="https://profer.cn"
_ghurl="https://github.com/Yuan-lai-ru-ci/ProferAI"
license=('AGPL-3.0-only')
conflicts=("${pkgname%-git}")
provides=("${pkgname%-git}=${pkgver%.r*}")
depends=(
"electron${_electronversion}"
'nodejs'
'bun'
'git'
'python'
'python-lxml'
'python-yaml'
'python-pillow'
'python-defusedxml'
)
makedepends=(
'npm'
'nvm'
'gendesk'
'jq'
)
source=(
"${pkgname//-/.}::git+${_ghurl}.git"
"${pkgname%-git}.js"
"${pkgname%-git}.sh"
)
sha256sums=('SKIP'
'562897be8a17076176f8d985c0d7bc1c685f2e7c9b3a932339ce015963243627'
'ace275e253744ca62d2572776df26b947f3c89616239985003126db635fc300e')
_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/*" -printf '%h\n' 2>/dev/null \
| while read -r d; do [[ -d "${d}/resources" ]] && { echo "$d"; return 0; }; done
}
_get_electron_version() {
local _v=$(find "$(_get_project_dir)" -name package.json ! -path '*/node_modules/*' -exec jq -r '.. | (.electron? // empty) | strings' {} + 2>/dev/null | sed 's/^[^0-9]*//' | grep -E '^[0-9]' | head -1 | sed 's/\..*//')
_v=${_v:-$(grep -hoE 'electron[@":][^0-9]*[0-9]+\.[0-9.]+' "$(_get_project_dir)"/*lock* 2>/dev/null | grep -oE '[0-9]+\.[0-9.]+' | head -1 | sed 's/\..*//')}
[[ "$_v" =~ ^[0-9] ]] || return 1
(( ${_v} == _electronversion )) && echo -e "\033[1;32mElectron version: ${_v}\033[0m" || echo -e "\033[1;31mElectron version: ${_v} (expected ${_electronversion})\033[0m"
}
_set_electron_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//')"
}
_set_bun_build_env() {
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)"
_get_electron_version
sed -i -e "
s/@electronversion@/${_electronversion}/g
s/@appname@/${pkgname%-git}/g
" "${srcdir}/${pkgname%-git}.sh" "${srcdir}/${pkgname%-git}.js"
gendesk -q -f -n \
--pkgname="${pkgname%-git}" \
--pkgdesc="${pkgdesc}" \
--categories="Development" \
--name="${_pkgname}" \
--exec="${pkgname%-git} %U"
_ensure_local_nvm
_set_electron_build_env
_set_bun_build_env
export NODE_ENV=development
bun install
cd "$(_get_project_dir)/apps/electron"
jq --arg ver "${SYSTEM_ELECTRON_VERSION}" '.devDependencies.electron = $ver' package.json > package.json.tmp && mv package.json.tmp package.json
}
build() {
cd "$(_get_project_dir)/apps/electron"
_ensure_local_nvm
_set_electron_build_env
_set_bun_build_env
export NODE_ENV=production
bun run build
bun run sync:runtime-deps
bunx electron-builder --linux dir -c.electronDist="${ELECTRON_DIST}" --config electron-builder.yml
rm -rf "$(_get_app_dir)/resources/default_app.asar"
}
package() {
install -Dm755 "${srcdir}/${pkgname%-git}.sh" "${pkgdir}/usr/bin/${pkgname%-git}"
install -Dm644 "${srcdir}/${pkgname%-git}.js" -t "${pkgdir}/usr/lib/${pkgname%-git}"
cp -a "$(_get_app_dir)/resources/." "${pkgdir}/usr/lib/${pkgname%-git}/"
install -Dm644 "$(_get_project_dir)/apps/electron/icon.png" "${pkgdir}/usr/share/icons/hicolor/64x64/apps/${pkgname%-git}.png"
install -Dm644 "$(_get_project_dir)/${pkgname%-git}.desktop" -t "${pkgdir}/usr/share/applications"
install -Dm644 "$(_get_project_dir)/LICENSE" -t "${pkgdir}/usr/share/licenses/${pkgname}"
}
Scan history
| Scanned at (UTC) | Severity | Rules |
|---|---|---|
| 2026-11-06 10:14:10 | Low | 3 |
| 2026-11-06 10:12:05 | Medium | 2 |