codex-app-electron-port-bin

maintainer tomakin · 0 votes · scanned 2026-08-03 00:08:14.047287
MEDIUM
View on AUR ↗
Why flagged The PKGBUILD downloads a prebuilt macOS DMG (Codex.dmg) from persistent.oaistatic.com — this is OpenAI's CDN/static asset host, which is a legitimate vendor-controlled domain for OpenAI's Codex desktop app. However, the checksum for the DMG is explicitly set to SKIP with the stated intent of always tracking the 'latest' version at a fixed URL. This means any update OpenAI pushes (or any MITM/CDN compromise) would be silently accepted and installed without integrity verification. The extracted app.asar content is then installed under /opt and executed via Electron, making this executed code. The combination of: (1) no checksum on the primary executable payload, (2) the payload being a binary blob extracted from a DMG and run as an app, and (3) the unofficial repackaging nature of the AUR package constitutes a genuine supply-chain risk. The host itself (oaistatic.com) is legitimate OpenAI infrastructure, which reduces the risk somewhat compared to a random personal host, but the SKIP checksum on executed binary content is a real medium-severity concern regardless of host legitimacy.

Triggered rules

MEDIUM source=() URL on a non-standard host 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:22 "Codex.dmg::https://persistent.oaistatic.com/codex-app-prod/Codex.dmg"
MEDIUM Privileged / out-of-pacman install (sudoers, setuid, or self-update) privileged_install

The package grants elevated privileges or installs an update path outside pacman: a /etc/sudoers.d rule (often passwordless), a setuid/setgid binary, or a self-update script/service that can fetch and run future code with no checksum verification. The initial install may be verified, but the ongoing privilege + update surface is a real supply-chain / privilege-escalation risk.

  • PKGBUILD:72 install -Dm755 "${srcdir}/${pkgname}-autoupdate.sh" \
MEDIUM AI review llm_review

An AI model (anthropic/claude-4.6-sonnet-20260217) reviewed this and agrees it is MEDIUM (confidence 82%): The PKGBUILD downloads a prebuilt macOS DMG (Codex.dmg) from persistent.oaistatic.com — this is OpenAI's CDN/static asset host, which is a legitimate vendor-controlled domain for OpenAI's Codex desktop app. However, the checksum for the DMG is explicitly set to SKIP with the stated intent of always tracking the 'latest' version at a fixed URL. This means any update OpenAI pushes (or any MITM/CDN compromise) would be silently accepted and installed without integrity verification. The extracted app.asar content is then installed under /opt and executed via Electron, making this executed code. The combination of: (1) no checksum on the primary executable payload, (2) the payload being a binary blob extracted from a DMG and run as an app, and (3) the unofficial repackaging nature of the AUR package constitutes a genuine supply-chain risk. The host itself (oaistatic.com) is legitimate OpenAI infrastructure, which reduces the risk somewhat compared to a random personal host, but the SKIP checksum on executed binary content is a real medium-severity concern regardless of host legitimacy.

PKGBUILD

2 offending line(s) highlighted
1pkgname=codex-app-electron-port-bin
2pkgver=2026.03.03
3pkgrel=1
4pkgdesc="Unofficial Electron-port repackaging of Codex desktop app from macOS DMG"
5arch=('x86_64')
6url="https://github.com/Tomakin/codex-app-electron-port-bin"
7license=('custom')
8options=('!strip')
9depends=('electron' 'bash')
10makedepends=('p7zip' 'asar')
11optdepends=(
12 'nodejs: runtime dependency for Codex CLI and native rebuild helper'
13 'pnpm: needed for native module rebuild helper'
14 'base-devel: needed for native module rebuild helper'
15 'python: needed for native module rebuild helper'
16 'sudo: allows native rebuild helper to update files under /opt'
17 'paru: optional helper for package auto-update command'
18 'yay: optional helper for package auto-update command'
19)
20install="${pkgname}.install"
21source=(
22 "Codex.dmg::https://persistent.oaistatic.com/codex-app-prod/Codex.dmg"
23 "${pkgname}.sh"
24 "${pkgname}-rebuild-native.sh"
25 "${pkgname}-autoupdate.sh"
26 "${pkgname}.desktop"
27 "${pkgname}.install"
28 "${pkgname}.LICENSE"
29)
30noextract=('Codex.dmg')
31# Intentionally SKIP for Codex.dmg to track the latest DMG at the fixed upstream URL.
32sha256sums=(
33 'SKIP'
34 '08175f104f47c50df15504b7d3ed0bbf7c4f80c9451ebcdd2454c5fd1e4c4fe1'
35 '4f8046f265b15c285c1a9b0b58aea18d4c25c4dc3581908334c6dadd462f3a19'
36 '19f503eb576b9f74f85c5d14891c903718d82ea547958e789d79bb455a1440d3'
37 'd127bf3d7be45efc29269658dacc76ec95367c3e9f5b6058a65e3377af5dad8a'
38 'b5839b253081393a8c10946e6486d1a153402c131c4659a3515eb6499b16e6ba'
39 '3d03f0c1bcf7a4567574f1e890ad757e94c0fbcfdad12a3bdfc2b4a20789bf57'
40)
41
42_appdir="/opt/${pkgname}"
43
44prepare() {
45 cd "${srcdir}"
46
47 rm -rf dmg_extracted app_asar
48
49 msg2 "Extracting DMG"
50 7z x "${srcdir}/Codex.dmg" "-odmg_extracted" >/dev/null
51
52 local asar_path="${srcdir}/dmg_extracted/Codex Installer/Codex.app/Contents/Resources/app.asar"
53 if [[ ! -f "${asar_path}" ]]; then
54 echo "app.asar not found at expected path: ${asar_path}" >&2
55 return 1
56 fi
57
58 msg2 "Extracting app.asar"
59 asar extract "${asar_path}" "${srcdir}/app_asar"
60}
61
62package() {
63 cd "${srcdir}"
64
65 install -dm755 "${pkgdir}${_appdir}"
66 cp -a app_asar "${pkgdir}${_appdir}/"
67
68 install -Dm755 "${srcdir}/${pkgname}.sh" \
69 "${pkgdir}/usr/bin/${pkgname}"
70 install -Dm755 "${srcdir}/${pkgname}-rebuild-native.sh" \
71 "${pkgdir}/usr/bin/${pkgname}-rebuild-native"
72 install -Dm755 "${srcdir}/${pkgname}-autoupdate.sh" \
73 "${pkgdir}/usr/bin/${pkgname}-autoupdate"
74 install -Dm644 "${srcdir}/${pkgname}.desktop" \
75 "${pkgdir}/usr/share/applications/${pkgname}.desktop"
76 install -Dm644 "${srcdir}/${pkgname}.LICENSE" \
77 "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
78}
79

Scan history

Scanned at (UTC)SeverityRules
2026-08-03 00:08:14 MEDIUM 3
2026-08-02 00:16:08 MEDIUM 3
2026-08-01 00:11:18 MEDIUM 3
2026-07-31 00:14:10 MEDIUM 3
2026-07-30 00:17:23 MEDIUM 3
2026-07-29 00:25:53 MEDIUM 3
2026-07-28 00:07:28 MEDIUM 3
2026-07-27 00:24:32 MEDIUM 3
2026-07-26 00:07:32 MEDIUM 3
2026-07-25 00:13:44 MEDIUM 3
2026-07-24 00:02:28 MEDIUM 3
2026-07-23 00:14:47 MEDIUM 3
2026-07-22 00:29:32 MEDIUM 3
2026-07-21 00:24:15 MEDIUM 3
2026-07-20 00:19:49 MEDIUM 3
2026-07-19 00:17:08 MEDIUM 3
2026-07-18 00:14:48 MEDIUM 3
2026-07-17 00:06:16 MEDIUM 3
2026-07-16 00:05:41 MEDIUM 3
2026-07-15 00:09:25 MEDIUM 3

Report a package

Reports go to the AURWatch maintainer (one person) and are read by hand. No login required.

0 / 4000
Your suggestion