8000 SECURITY: gws, codex, zellij, xh, weathr, yazi, zola, gurk, zizmor, nushell: lock rustls-webpki 0.103.16 (CVE-2026-111943) by bryan-minimal · Pull Request #955 · gominimal/pkgs · GitHub
[go: up one dir, main page]

Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions packages/codex/build.ncl
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
let { standaloneTest, subsetOf, Attrs, BuildSpec, Local, Needs, OutputBin, Source, .. } = import "minimal.ncl" in
let base = import "../base/build.ncl" in
let patch = import "../patch/build.ncl" in
let rust = import "../rust/build.ncl" in
let toolchain = import "../toolchain/build.ncl" in
let pkgconf = import "../pkgconf/build.ncl" in
Expand All @@ -17,13 +18,22 @@ let version = "0.155.0" in
name = "codex",
build_deps = [
{ file = "build.sh" } | Local,
# CVE-2026-111943 (eMudhra intermediate key compromise): pins rustls-webpki
# 0.103.16 (RUSTSEC-2026-0382, distrusts the 8 intermediates) and
# webpki-roots / webpki-root-certs 1.0.10 (RUSTSEC-2026-0383, drops emSign ECC
# Root CA - G3) in upstream's Cargo.lock. Lock-only: version + checksum lines
# (plus whatever cargo had to move with them). Drop on the first upstream
# release whose Cargo.lock already has those versions; a version bump that
# keeps it fails at `patch` rather than silently shipping the old lock.
{ file = "cve-2026-111943-webpki-lock.patch" } | Local,
{
url = "https://github.com/openai/codex/archive/refs/tags/rust-v%{version}.tar.gz",
sha256 = "8bb3b5a5693492926b53c51ee2e68822b057d712b2ca1a0ae67878557fd6a2ea",
extract = true,
strip_prefix = "codex-rust-v%{version}",
} | Source,
base,
patch,
rust,
toolchain,
pkgconf,
Expand Down
18 changes: 17 additions & 1 deletion packages/codex/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,23 @@ export RUSTFLAGS="-C linker=gcc"
# Needed for crates that use bindgen / libclang
export LIBCLANG_PATH="$(dirname $(find /usr/lib -name 'libclang*.so' | head -1))"

cargo build --release -p codex-cli
# CVE-2026-111943: move upstream's Cargo.lock to rustls-webpki 0.103.16 and
# webpki-roots / webpki-root-certs 1.0.10 (see build.ncl). Applied by name so a
# missing or stale patch fails the build.
patch -Np1 -i ../cve-2026-111943-webpki-lock.patch
# Prove it landed, fail-closed: the fixed verifier is locked, and no pre-fix
# rustls-webpki 0.103.x or webpki-roots / webpki-root-certs 1.0.x remains.
grep -A1 '^name = "rustls-webpki"$' Cargo.lock | grep -q '^version = "0.103.16"$' || {
echo "ERROR: rustls-webpki 0.103.16 is not in Cargo.lock (CVE-2026-111943)" >&2
exit 1
}
if grep -A1 -E '^name = "(rustls-webpki|webpki-roots|webpki-root-certs)"$' Cargo.lock |
grep -qE '^version = "(0[.]103[.]([0-9]|1[0-5])|1[.]0[.][0-9])"$'; then
echo "ERROR: a pre-CVE-2026-111943 rustls-webpki / webpki-roots is still in Cargo.lock" >&2
exit 1
fi

cargo build --locked --release -p codex-cli

mkdir -p $OUTPUT_DIR/usr/bin
install -m 755 target/release/codex $OUTPUT_DIR/usr/bin/codex
Loading
Loading
0