lmm-api-deploy-bin
The package installs a prebuilt binary from GitHub Releases with strong verification (SHA256, Sigstore, and REVISION check), but grants it sudo rights for specific pacman operations; while the host is not whitelisted, the verification mitigates supply-chain risks, making it low risk.
Triggered rules
zero_votes_recent
Uploaded within the last 14 days with 2 or fewer community votes — little peer review so far.
llm_review
An AI model (qwen/qwen3-235b-a22b-2507) reviewed this and agrees it is LOW (confidence 95%): The package installs a prebuilt binary from GitHub Releases with strong verification (SHA256, Sigstore, and REVISION check), but grants it sudo rights for specific pacman operations; while the host is not whitelisted, the verification mitigates supply-chain risks, making it low risk.
PKGBUILD
# Maintainer: LIghtJUNction <support@lmm.best>
pkgname=lmm-api-deploy-bin
pkgver=0.1.35
pkgrel=2
pkgdesc='LMM API tooling-only production deployment operator (prebuilt)'
arch=('x86_64' 'aarch64')
url='https://github.com/LIghtJUNction/api.lmm.best'
license=('AGPL-3.0-only')
depends=('ca-certificates' 'coreutils' 'libarchive' 'pacman' 'paru' 'sudo' 'systemd' 'util-linux')
makedepends=('cosign')
provides=("lmm-api-deploy=${pkgver}")
conflicts=('lmm-api-deploy')
options=('!strip')
_release_tag="go-v${pkgver}"
_release_revision=c0c029fa92ff140fff175e50d74975cecb8b141b
_artifact="lmm-api-go-${pkgver}-linux"
_release_base="${url}/releases/download/${_release_tag}"
source_x86_64=(
"${_artifact}-amd64.tar.gz::${_release_base}/${_artifact}-amd64.tar.gz"
"${_artifact}-amd64.tar.gz.sha256::${_release_base}/${_artifact}-amd64.tar.gz.sha256"
"${_artifact}-amd64.tar.gz.sigstore.json::${_release_base}/${_artifact}-amd64.tar.gz.sigstore.json"
)
source_aarch64=(
"${_artifact}-arm64.tar.gz::${_release_base}/${_artifact}-arm64.tar.gz"
"${_artifact}-arm64.tar.gz.sha256::${_release_base}/${_artifact}-arm64.tar.gz.sha256"
"${_artifact}-arm64.tar.gz.sigstore.json::${_release_base}/${_artifact}-arm64.tar.gz.sigstore.json"
)
noextract=("${_artifact}-amd64.tar.gz" "${_artifact}-arm64.tar.gz")
sha256sums_x86_64=(
'a79090b35c0288eb52cc5ef6616eb871247526e917fb11ea803ad47bee69cb74'
'55886fb370000c085c7595bd6f9c430e9c909b1f04b717997bc0ccd1d1f4f1bb'
'b78c610c33c5851675bea566b9f9e9abd41a4d661a714e4d3f09a854f96642b4'
)
sha256sums_aarch64=(
'6a7c22fb59907ea8c4a904585968919e34476f2c4ceb6de2c2e8c1865c5f0192'
'5bd89a9e5df7df20b223b0926da5c3ec169194febff20fb52af4c5492ff0c717'
'3d18f9f977c10e09bfca01476f913c349da9d3784142519b1220ac4b75838795'
)
case "${CARCH}" in
x86_64) _release_arch=amd64 ;;
aarch64) _release_arch=arm64 ;;
*) printf 'unsupported architecture: %s\n' "${CARCH}" >&2; return 1 ;;
esac
prepare() {
local archive="${_artifact}-${_release_arch}.tar.gz"
local bundle="${srcdir}/${_artifact}-${_release_arch}"
local expected actual revision
expected=$(awk 'NR == 1 { print $1 }' "${archive}.sha256")
[[ ${expected} =~ ^[[:xdigit:]]{64}$ ]] || return 1
actual=$(sha256sum "${archive}")
[[ ${actual%% *} == "${expected}" ]] || return 1
cosign verify-blob \
--bundle "${archive}.sigstore.json" \
--certificate-identity \
"${url}/.github/workflows/release-go.yml@refs/tags/${_release_tag}" \
--certificate-oidc-issuer 'https://token.actions.githubusercontent.com' \
"${archive}"
bsdtar -xf "${archive}"
[[ -f ${bundle}/lmm-api-go && -x ${bundle}/lmm-api-go ]] || return 1
[[ -f ${bundle}/REVISION && ! -L ${bundle}/REVISION ]] || return 1
revision=$(<"${bundle}/REVISION")
[[ ${revision} == "${_release_revision}" ]] || return 1
if [[ -e ${bundle}/API_ROUTE_CONTRACT_REVISION ]]; then
[[ -f ${bundle}/API_ROUTE_CONTRACT_REVISION && ! -L ${bundle}/API_ROUTE_CONTRACT_REVISION ]] || return 1
[[ $(<"${bundle}/API_ROUTE_CONTRACT_REVISION") =~ ^[0-9a-f]{64}$ ]] || return 1
fi
}
package() {
local bundle="${srcdir}/${_artifact}-${_release_arch}"
local archive="${srcdir}/${_artifact}-${_release_arch}.tar.gz"
local file binary_hash asset_hash
install -Dm0755 "${bundle}/lmm-api-go" \
"${pkgdir}/usr/lib/lmm-api-deploy/lmm-api-go"
install -d -m0755 "${pkgdir}/usr/bin"
ln -s ../lib/lmm-api-deploy/lmm-api-go "${pkgdir}/usr/bin/lmm-api-deploy"
install -Dm0644 /dev/stdin "${pkgdir}/usr/lib/sysusers.d/lmm-api-deploy.conf" <<'EOF'
u lmm-api-deploy - "LMM API deployment operator" /var/lib/lmm-api-go-deploy/operator /usr/bin/nologin
EOF
install -Dm0644 /dev/stdin "${pkgdir}/usr/lib/tmpfiles.d/lmm-api-deploy.conf" <<'EOF'
d /var/lib/lmm-api-go-deploy 0710 root lmm-api-deploy -
d /var/lib/lmm-api-go-deploy/operator 0700 lmm-api-deploy lmm-api-deploy -
EOF
install -Dm0440 /dev/stdin "${pkgdir}/etc/sudoers.d/lmm-api-deploy" <<'EOF'
lmm-api-deploy ALL=(root) NOPASSWD: /usr/bin/pacman ^--upgrade --noconfirm -- /var/lib/lmm-api-go-deploy/work/[A-Za-z0-9][A-Za-z0-9._-]{0,79}/staging/lmm-api-go-bin-[A-Za-z0-9][A-Za-z0-9._+@~-]*\.pkg\.tar\.(zst|xz|gz|bz2|lz4|lrz|lzo|Z)$
lmm-api-deploy ALL=(root) NOPASSWD: /usr/bin/pacman ^--upgrade --noconfirm -- /var/lib/lmm-api-go-deploy/work/[A-Za-z0-9][A-Za-z0-9._-]{0,79}/staging/lmm-api-web-bin-[A-Za-z0-9][A-Za-z0-9._+@~-]*\.pkg\.tar\.(zst|xz|gz|bz2|lz4|lrz|lzo|Z)$
EOF
for file in LICENSE NOTICE THIRD-PARTY-LICENSES.md; do
install -Dm0644 "${bundle}/${file}" \
"${pkgdir}/usr/share/licenses/${pkgname}/${file}"
done
install -Dm0644 "${bundle}/REVISION" \
"${pkgdir}/usr/share/doc/${pkgname}/REVISION"
if [[ -f ${bundle}/API_ROUTE_CONTRACT_REVISION ]]; then
install -Dm0644 "${bundle}/API_ROUTE_CONTRACT_REVISION" \
"${pkgdir}/usr/share/doc/${pkgname}/API_ROUTE_CONTRACT_REVISION"
fi
binary_hash=$(sha256sum "${bundle}/lmm-api-go")
printf '%s\n' "${binary_hash%% *}" >"${srcdir}/OPERATOR_SHA256"
install -Dm0644 "${srcdir}/OPERATOR_SHA256" \
"${pkgdir}/usr/share/doc/${pkgname}/OPERATOR_SHA256"
asset_hash=$(sha256sum "${archive}")
printf '%s\n' "${asset_hash%% *}" >"${srcdir}/RELEASE_ASSET_SHA256"
install -Dm0644 "${srcdir}/RELEASE_ASSET_SHA256" \
"${pkgdir}/usr/share/doc/${pkgname}/RELEASE_ASSET_SHA256"
}
Scan history
| Scanned at (UTC) | Severity | Rules |
|---|---|---|
| 2026-08-22 15:17:41 | Low | 2 |