pi-harness-bin
The package extracts and modifies an AppImage from an untrusted release URL, which could allow supply-chain attacks if the AppImage is swapped; while it rebuilds parts of the app, the original binary is still executed and comes from a non-whitelisted, potentially swappable source.
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 found a suspicious pattern they could not resolve, so an AI model (qwen/qwen3-235b-a22b-2507) reviewed it and judged it MEDIUM (confidence 85%): The package extracts and modifies an AppImage from an untrusted release URL, which could allow supply-chain attacks if the AppImage is swapped; while it rebuilds parts of the app, the original binary is still executed and comes from a non-whitelisted, potentially swappable source.
PKGBUILD
# Maintainer: zxp19821005 <zxp19821005 at 163 dot com>
pkgname=pi-harness-bin
_pkgname=Pi-Harness
pkgver=2.0.0
_electronversion=44
pkgrel=1
pkgdesc="Operational Superset Harness and Desktop Control Plane for Pi Coding Agent."
arch=('x86_64')
url="https://github.com/wangmiaozero/pi-harness"
license=('AGPL-3.0-only')
provides=("${pkgname%-bin}=${pkgver}")
conflicts=("${pkgname%-bin}")
depends=(
"electron${_electronversion}"
'nodejs'
'npm'
'pi-coding-agent'
)
makedepends=(
'asar'
)
source=(
"${pkgname%-bin}-${pkgver}-x86_64.AppImage::${url}/releases/download/v${pkgver}/${_pkgname}-${pkgver}.AppImage"
"${pkgname%-bin}.sh"
)
sha256sums=('294abe652853e5d1a6f8ec6ed1423693dbba89f5076ab20de117c93cd47b1747'
'dfcd6603d29c7b8d88e019b517a2e5c1a7b5ab905a0961a8b81adfa508b258b8')
_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
}
_check_electron_version() {
local _v=$(strings "$(find "$(_get_app_dir)" -maxdepth 1 -type f \
-executable -printf '%s %p\n' | sort -nr | head -1 | cut -d' ' -f2-)" \
| grep -oP 'Electron/\K[0-9]+' | head -1)
[[ -z "$_v" ]] && { echo -e "\033[1;33mNote: Could not check version.\033[0m"; return; }
(( _v == _electronversion )) && c=32 || c=31
echo -e "Electron version: \033[1;${c}m$_v$([[ $c -eq 31 ]] && echo " (expected $_electronversion)")\033[0m"
}
prepare() {
sed -i -e "
s/@electronversion@/${_electronversion}/g
s/@appname@/${pkgname%-bin}/g
" "${srcdir}/${pkgname%-bin}.sh"
if [ ! -x "${srcdir}/${pkgname%-bin}-${pkgver}-${CARCH}.AppImage" ];then
chmod +x "${srcdir}/${pkgname%-bin}-${pkgver}-${CARCH}.AppImage"
fi
if [ -d "${srcdir}/squashfs-root" ];then
rm -rf "${srcdir}/squashfs-root"
fi
"${srcdir}/${pkgname%-bin}-${pkgver}-${CARCH}.AppImage" --appimage-extract > /dev/null
_check_electron_version
sed -i "s/AppRun --no-sandbox/${pkgname%-bin}/g" "$(_get_app_dir)/${pkgname%-bin}.desktop"
asar e "$(_get_app_dir)/resources/app.asar" "${srcdir}/app.asar.unpacked"
find "${srcdir}/app.asar.unpacked/out" -type f -exec sed -i "s/process.resourcesPath/\'\/usr\/lib\/${pkgname%-bin}\'/g" {} +
find "${srcdir}" -type d \( -name "*darwin*" -o -name "*win32*" -o -name "*-arm*" \) -exec rm -rf {} +
asar p "${srcdir}/app.asar.unpacked" "$(_get_app_dir)/resources/app.asar"
find "$(_get_app_dir)/resources" -type d -perm 700 -exec chmod 755 {} +
}
package() {
install -Dm755 "${srcdir}/${pkgname%-bin}.sh" "${pkgdir}/usr/bin/${pkgname%-bin}"
install -Dm755 -d "${pkgdir}/usr/lib/${pkgname%-bin}"
cp -a "$(_get_app_dir)/resources/." "${pkgdir}/usr/lib/${pkgname%-bin}/"
find "${srcdir}" -type f \( -name "*.png" -o -name "*.svg" \) -path "*share/icons/*" | while read -r _i; do
_extension="${_i##*.}"
_icon_path="${_i#*share/icons/}"
_target_dir="/usr/share/icons/$(dirname "${_icon_path}")"
install -Dm644 "${_i}" "${pkgdir}${_target_dir}/${pkgname%-bin}.${_extension}"
done
install -Dm644 "$(_get_app_dir)/${pkgname%-bin}.desktop" -t "${pkgdir}/usr/share/applications"
}
Changes since previous scan
--- PKGBUILD @ 2026-10-14 00:06+++ PKGBUILD @ 2026-10-17 00:21@@ -1,7 +1,7 @@ # Maintainer: zxp19821005 <zxp19821005 at 163 dot com> pkgname=pi-harness-bin _pkgname=Pi-Harness-pkgver=1.9.0+pkgver=2.0.0 _electronversion=44 pkgrel=1 pkgdesc="Operational Superset Harness and Desktop Control Plane for Pi Coding Agent."@@ -23,10 +23,11 @@ "${pkgname%-bin}-${pkgver}-x86_64.AppImage::${url}/releases/download/v${pkgver}/${_pkgname}-${pkgver}.AppImage" "${pkgname%-bin}.sh" )-sha256sums=('042d82172e8681d9767784e6c7e2ba7f872a8db3e5ee5f6d2ce832b3bd7f764e'+sha256sums=('294abe652853e5d1a6f8ec6ed1423693dbba89f5076ab20de117c93cd47b1747' 'dfcd6603d29c7b8d88e019b517a2e5c1a7b5ab905a0961a8b81adfa508b258b8') _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+ 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 } _check_electron_version() { local _v=$(strings "$(find "$(_get_app_dir)" -maxdepth 1 -type f \@@ -49,25 +50,23 @@ fi "${srcdir}/${pkgname%-bin}-${pkgver}-${CARCH}.AppImage" --appimage-extract > /dev/null _check_electron_version- local _app_dir="$(_get_app_dir)"- sed -i "s/AppRun --no-sandbox/${pkgname%-bin}/g" "${_app_dir}/${pkgname%-bin}.desktop"- asar e "${_app_dir}/resources/app.asar" "${srcdir}/app.asar.unpacked"+ sed -i "s/AppRun --no-sandbox/${pkgname%-bin}/g" "$(_get_app_dir)/${pkgname%-bin}.desktop"+ asar e "$(_get_app_dir)/resources/app.asar" "${srcdir}/app.asar.unpacked" find "${srcdir}/app.asar.unpacked/out" -type f -exec sed -i "s/process.resourcesPath/\'\/usr\/lib\/${pkgname%-bin}\'/g" {} + find "${srcdir}" -type d \( -name "*darwin*" -o -name "*win32*" -o -name "*-arm*" \) -exec rm -rf {} +- asar p "${srcdir}/app.asar.unpacked" "${_app_dir}/resources/app.asar"- find "${_app_dir}/resources" -type d -perm 700 -exec chmod 755 {} ++ asar p "${srcdir}/app.asar.unpacked" "$(_get_app_dir)/resources/app.asar"+ find "$(_get_app_dir)/resources" -type d -perm 700 -exec chmod 755 {} + } package() { install -Dm755 "${srcdir}/${pkgname%-bin}.sh" "${pkgdir}/usr/bin/${pkgname%-bin}" install -Dm755 -d "${pkgdir}/usr/lib/${pkgname%-bin}"- local _app_dir="$(_get_app_dir)"- cp -a "${_app_dir}/resources/." "${pkgdir}/usr/lib/${pkgname%-bin}/"+ cp -a "$(_get_app_dir)/resources/." "${pkgdir}/usr/lib/${pkgname%-bin}/" find "${srcdir}" -type f \( -name "*.png" -o -name "*.svg" \) -path "*share/icons/*" | while read -r _i; do _extension="${_i##*.}" _icon_path="${_i#*share/icons/}" _target_dir="/usr/share/icons/$(dirname "${_icon_path}")" install -Dm644 "${_i}" "${pkgdir}${_target_dir}/${pkgname%-bin}.${_extension}" done- install -Dm644 "${_app_dir}/${pkgname%-bin}.desktop" -t "${pkgdir}/usr/share/applications"+ install -Dm644 "$(_get_app_dir)/${pkgname%-bin}.desktop" -t "${pkgdir}/usr/share/applications" } Scan history
| Scanned at (UTC) | Severity | Rules |
|---|---|---|
| 2026-10-17 00:21:55 | Medium | 2 |
| 2026-10-16 00:12:47 | Medium | 2 |
| 2026-10-15 00:28:05 | Medium | 2 |
| 2026-10-14 15:20:15 | Medium | 2 |
| 2026-10-14 00:06:47 | Medium | 2 |
| 2026-10-13 07:16:10 | Medium | 2 |