zcode-bin
The package downloads a prebuilt .deb from the project's own CDN (cdn-zcode.z.ai), which is plausibly official; the source is not from a swappable host like a personal file locker, and the build process only repackages and patches paths in the official binary, with no evidence of malicious behavior.
Triggered rules
llm_review
The static rules flagged this MEDIUM, but an AI model (qwen/qwen3-235b-a22b-2507) reviewed the full PKGBUILD and judged it LOW (confidence 95%): The package downloads a prebuilt .deb from the project's own CDN (cdn-zcode.z.ai), which is plausibly official; the source is not from a swappable host like a personal file locker, and the build process only repackages and patches paths in the official binary, with no evidence of malicious behavior.
1 higher static finding superseded - not the current verdict (shown for transparency)
source_untrusted_domain
One or more source=() URLs point to a host outside the trusted allowlist (github.com, gitlab.com, codeberg.org, pypi.org, …).
-
PKGBUILD:32
"${pkgname%-bin}-${pkgver}-x86_64.deb::https://cdn-zcode.z.ai/zcode/electron/releases/${pkgver}/linux-x64/${_pkgname}-${pkgver}-linux-x64.deb"
PKGBUILD
1 offending line(s) highlighted# Maintainer: AnRan <2318621872 at qq dot com>
# Contributor: zxp19821005 <zxp19821005 at 163 dot com> (launcher script approach)
pkgname=zcode-bin
_pkgname=ZCode
pkgver=3.11.2
_electronversion=41
pkgrel=1
pkgdesc="ZCode - AI-powered code editor by ZAI"
arch=('x86_64')
url="https://zcode.z.ai/"
license=('LicenseRef-ZCode')
depends=(
"electron${_electronversion}"
'python'
'python-reportlab'
'python-lxml'
'python-pillow'
'python-defusedxml'
'libstdc++'
'nodejs'
'libgcc'
'ripgrep'
'xdg-utils'
)
makedepends=(
'asar'
)
options=(
'!strip'
)
source=(
"${pkgname%-bin}-${pkgver}-x86_64.deb::https://cdn-zcode.z.ai/zcode/electron/releases/${pkgver}/linux-x64/${_pkgname}-${pkgver}-linux-x64.deb"
"LICENSE"
"${pkgname%-bin}.sh"
)
# First entry: upstream .deb, pinned by zcode-update-checker.sh on each update.
# LICENSE and zcode.sh are local repo files tracked by git, kept as SKIP.
sha256sums=('7d13b838631302cf61e1b8040cb67f349ec23566795897f1746432c5c5d77d5b'
'SKIP'
'SKIP')
_get_app_dir() {
find "${srcdir}" -type f -name "resources.pak" -exec dirname {} + | head -n 1
}
_check_electron_version() {
echo "Verifying Electron version..."
local _app_dir=$(_get_app_dir)
local _main_exe=""
if [[ -n "${_app_dir}" ]]; then
_main_exe=$(find "${_app_dir}" -maxdepth 1 -type f -executable -printf '%s %p\n' | sort -nr | head -n 1 | cut -d' ' -f2-)
fi
if [[ -n "${_main_exe}" ]]; then
local _elec_ver=$(strings "${_main_exe}" | grep '^Chrome/[0-9.]* Electron/[0-9]' | cut -d'/' -f3 | cut -d'.' -f1 | head -n 1)
if [[ -n "${_elec_ver}" ]]; then
if [[ "${_elec_ver}" != "${_electronversion}" ]]; then
echo -e "\033[1;31mWarning: Electron version mismatch! Detected: ${_elec_ver}, Expected: ${_electronversion}\033[0m"
else
echo -e "Electron version verified: \033[1;31m${_elec_ver}\033[0m"
fi
fi
else
echo -e "\033[1;33mNote: Could not find Electron binary for version verification.\033[0m"
fi
}
prepare() {
bsdtar -xf "${srcdir}/data."*
_check_electron_version
# Substitute placeholders in launcher script
sed -i -e "
s/@electronversion@/${_electronversion}/g
s/@appname@/${pkgname%-bin}/g
s/@runname@/app.asar/g
s/@cfgdirname@/${_pkgname}/g
" "${srcdir}/${pkgname%-bin}.sh"
# Fix .desktop file: remove /opt/ZCode/ prefix so Exec references the launcher directly
sed -i "s/\/opt\/${_pkgname}\///g" "${srcdir}/usr/share/applications/${pkgname%-bin}.desktop"
# Unpack app.asar, patch process.resourcesPath, and repack
local _app_dir=$(_get_app_dir)
asar e "${_app_dir}/resources/app.asar" "${srcdir}/app.asar.unpacked"
rm -rf "${_app_dir}/resources/app.asar"
find "${srcdir}/app.asar.unpacked/out" -type f -exec sed -i "s/process.resourcesPath/'\/usr\/lib\/${pkgname%-bin}'/g" {} +
asar p "${srcdir}/app.asar.unpacked" "${_app_dir}/resources/app.asar"
rm -rf "${srcdir}/app.asar.unpacked"
# Use system ripgrep instead of bundled
ln -sf "/usr/bin/rg" "${_app_dir}/resources/tools/ripgrep/rg"
# Remove unnecessary files to reduce package size
rm -rf \
"${_app_dir}/resources/"{apparmor-profile,package-type} \
"${_app_dir}/resources/app.asar.unpacked/node_modules/@lydell" \
"${_app_dir}/resources/app.asar.unpacked/node_modules/node-pty/"{bin,deps/winpty,prebuilds/{darwin-*,win32-*,linux-arm64}}
}
package() {
# Install launcher script
install -Dm755 "${srcdir}/${pkgname%-bin}.sh" "${pkgdir}/usr/bin/${pkgname%-bin}"
# Install app resources
install -Dm755 -d "${pkgdir}/usr/lib/${pkgname%-bin}"
local _app_dir=$(_get_app_dir)
cp -a "${_app_dir}/resources/." "${pkgdir}/usr/lib/${pkgname%-bin}/"
# Install .desktop file
install -Dm644 "${srcdir}/usr/share/applications/${pkgname%-bin}.desktop" -t "${pkgdir}/usr/share/applications"
# Install icons
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 license
install -Dm644 "${srcdir}/LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}
Changes since previous scan
--- PKGBUILD @ 2026-09-05 00:16+++ PKGBUILD @ 2026-09-17 00:27@@ -2,7 +2,7 @@ # Contributor: zxp19821005 <zxp19821005 at 163 dot com> (launcher script approach) pkgname=zcode-bin _pkgname=ZCode-pkgver=3.10.1+pkgver=3.11.2 _electronversion=41 pkgrel=1 pkgdesc="ZCode - AI-powered code editor by ZAI"@@ -35,7 +35,7 @@ ) # First entry: upstream .deb, pinned by zcode-update-checker.sh on each update. # LICENSE and zcode.sh are local repo files tracked by git, kept as SKIP.-sha256sums=('1deceec01e0545a4c7f8e26516269b1e845dfc3524598b1655e38bc61acbf08b'+sha256sums=('7d13b838631302cf61e1b8040cb67f349ec23566795897f1746432c5c5d77d5b' 'SKIP' 'SKIP') Scan history
| Scanned at (UTC) | Severity | Rules |
|---|---|---|
| 2026-09-17 00:27:14 | Low | 2 |
| 2026-09-16 00:03:17 | Low | 2 |
| 2026-09-15 00:25:31 | Low | 2 |
| 2026-09-14 00:27:57 | Low | 2 |
| 2026-09-13 00:19:54 | Low | 2 |
| 2026-09-12 00:25:17 | Low | 2 |
| 2026-09-11 00:19:22 | Low | 2 |
| 2026-09-10 00:22:44 | Low | 2 |
| 2026-09-09 00:04:09 | Low | 2 |
| 2026-09-08 00:18:08 | Low | 2 |
| 2026-09-07 00:30:15 | Low | 2 |
| 2026-09-06 00:17:06 | Low | 2 |
| 2026-09-05 03:59:20 | Medium | 1 |
| 2026-09-05 00:16:27 | Low | 2 |
| 2026-09-04 00:03:13 | Low | 2 |
| 2026-09-03 00:15:47 | Low | 2 |
| 2026-09-02 00:02:31 | Low | 2 |
| 2026-09-01 03:46:42 | Medium | 1 |
| 2026-09-01 00:11:19 | Low | 2 |
| 2026-08-31 00:19:57 | Low | 2 |