opencode-git
The package downloads a JSON file from an untrusted host for offline model data, but it is not executable and does not enable remote code execution; the main source is from GitHub and the build uses locked dependencies.
Triggered rules
llm_review
The static rules flagged this MEDIUM, but an AI model (qwen/qwen3-235b-a22b-07-25) reviewed the full PKGBUILD and judged it LOW (confidence 95%): The package downloads a JSON file from an untrusted host for offline model data, but it is not executable and does not enable remote code execution; the main source is from GitHub and the build uses locked dependencies.
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:24
'models.dev-api.json::https://models.dev/api.json'
PKGBUILD
1 offending line(s) highlighted# Maintainer: pngdeity <pngdeity@tutanota.com>
# Contributor: robertfoster <morf3089@gmail.com>
_pkgname=opencode
pkgname=${_pkgname}-git
_githubname=anomalyco/opencode
pkgver=1.14.48.r38.gcddab63
pkgrel=1
pkgdesc="The open source coding agent"
url="https://github.com/${_githubname}"
arch=(aarch64 x86_64)
license=(MIT)
provides=("$_pkgname")
conflicts=("$_pkgname")
depends=(curl fzf git glibc icu ripgrep)
makedepends=(bun git)
optdepends=('wl-clipboard: clipboard support on Wayland'
'xclip: clipboard support on X11')
options=('!debug' '!strip')
source=(
"$_pkgname::git+${url}.git"
# Live AI model catalog from models.dev — embedded at build time so
# opencode can display available models without runtime network access.
'models.dev-api.json::https://models.dev/api.json'
)
sha256sums=('SKIP'
'SKIP')
_target_arch() {
case "${CARCH}" in
'x86_64')
printf 'x64-baseline\n'
;;
'aarch64')
printf 'arm64\n'
;;
*)
printf 'Unsupported architecture: %s\n' "${CARCH}" >&2
return 1
;;
esac
}
pkgver() {
cd "$_pkgname"
local version tag base rev hash
version=$(sed -n 's/^[[:space:]]*"version": "\([^"]*\)",$/\1/p' packages/opencode/package.json | head -n1)
tag="v${version}"
base=$(git merge-base HEAD "${tag}")
rev=$(git rev-list --count "${base}..HEAD")
hash=$(git rev-parse --short=7 HEAD)
printf '%s.r%s.g%s\n' "${version}" "${rev}" "${hash}"
}
prepare() {
cd "$_pkgname"
bun install --frozen-lockfile --ignore-scripts
}
build() {
cd "$_pkgname"
OPENCODE_VERSION=$pkgver \
MODELS_DEV_API_JSON="${srcdir}/models.dev-api.json" \
bun run --cwd packages/opencode build --single --baseline --skip-install
}
check() {
cd "$_pkgname/packages/opencode"
# Tests currently fail due to https://github.com/oven-sh/bun/issues/30014
# Revisit once the bug is fixed.
#
# export GIT_CONFIG_GLOBAL=$PWD/gitconfig
# git config --global user.email "builduser@archlinux.org"
# git config --global user.name "Build User"
# bun test --timeout=20000 --parallel
}
package() {
local target
cd "$_pkgname"
target="$(_target_arch)"
install -Dm755 \
"packages/opencode/dist/opencode-linux-${target}/bin/opencode" \
"${pkgdir}/usr/bin/opencode"
SHELL=/bin/bash "${pkgdir}/usr/bin/opencode" completion \
| install -Dm644 /dev/stdin "${pkgdir}/usr/share/bash-completion/completions/opencode"
SHELL=/bin/zsh "${pkgdir}/usr/bin/opencode" completion \
| install -Dm644 /dev/stdin "${pkgdir}/usr/share/zsh/site-functions/_opencode"
install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}
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 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 00:11:19 | Low | 2 |
| 2026-08-31 00:19:57 | Low | 2 |
| 2026-08-30 00:04:14 | Low | 2 |
| 2026-08-29 00:29:17 | Low | 2 |