4444 - uses : actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
4545 with :
4646 fetch-depth : 0
47+ persist-credentials : false
4748 - uses : actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6
4849 with :
4950 python-version : ${{ matrix.python-version }}
51+ - name : Harden ephemeral Linux runner home chain
52+ if : runner.os == 'Linux'
53+ shell : bash
54+ run : |
55+ set -euo pipefail
56+ mapfile -d '' -t account_home_chain < <(python -I -S -B -c 'import os, pathlib, pwd; home = pathlib.Path(pwd.getpwuid(os.geteuid()).pw_dir); current = pathlib.Path(home.anchor); chain = [current]; [(chain.append(current := current / component)) for component in home.parts[1:]]; print(*(str(path) for path in chain), sep="\0", end="\0")')
57+ sudo setfacl --remove-all --remove-default -- "${account_home_chain[@]}"
58+ sudo chmod go-w -- "${account_home_chain[@]}"
59+ account_home="${account_home_chain[${#account_home_chain[@]}-1]}"
60+ private_tmp="$account_home/codexqb-ci-tmp"
61+ install -d -m 0700 -- "$private_tmp"
62+ printf 'TMPDIR=%s\n' "$private_tmp" >> "$GITHUB_ENV"
5063 - name : Run the short dependency-free gate
5164 run : make check-fast
5265 - name : Run dependency-free unit contracts
7285 - uses : actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
7386 with :
7487 fetch-depth : 0
88+ persist-credentials : false
7589 - uses : actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6
7690 with :
7791 python-version : ${{ matrix.python-version }}
92+ - name : Harden ephemeral Linux runner home chain
93+ if : runner.os == 'Linux'
94+ shell : bash
95+ run : |
96+ set -euo pipefail
97+ mapfile -d '' -t account_home_chain < <(python -I -S -B -c 'import os, pathlib, pwd; home = pathlib.Path(pwd.getpwuid(os.geteuid()).pw_dir); current = pathlib.Path(home.anchor); chain = [current]; [(chain.append(current := current / component)) for component in home.parts[1:]]; print(*(str(path) for path in chain), sep="\0", end="\0")')
98+ sudo setfacl --remove-all --remove-default -- "${account_home_chain[@]}"
99+ sudo chmod go-w -- "${account_home_chain[@]}"
100+ account_home="${account_home_chain[${#account_home_chain[@]}-1]}"
101+ private_tmp="$account_home/codexqb-ci-tmp"
102+ install -d -m 0700 -- "$private_tmp"
103+ printf 'TMPDIR=%s\n' "$private_tmp" >> "$GITHUB_ENV"
78104 - name : Run Goal and Apply behavior gates
79105 run : make check-behavior
80106
@@ -85,9 +111,22 @@ jobs:
85111 - uses : actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
86112 with :
87113 fetch-depth : 0
114+ persist-credentials : false
88115 - uses : actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6
89116 with :
90117 python-version : " 3.13"
118+ - name : Harden ephemeral Linux runner home chain
119+ if : runner.os == 'Linux'
120+ shell : bash
121+ run : |
122+ set -euo pipefail
123+ mapfile -d '' -t account_home_chain < <(python -I -S -B -c 'import os, pathlib, pwd; home = pathlib.Path(pwd.getpwuid(os.geteuid()).pw_dir); current = pathlib.Path(home.anchor); chain = [current]; [(chain.append(current := current / component)) for component in home.parts[1:]]; print(*(str(path) for path in chain), sep="\0", end="\0")')
124+ sudo setfacl --remove-all --remove-default -- "${account_home_chain[@]}"
125+ sudo chmod go-w -- "${account_home_chain[@]}"
126+ account_home="${account_home_chain[${#account_home_chain[@]}-1]}"
127+ private_tmp="$account_home/codexqb-ci-tmp"
128+ install -d -m 0700 -- "$private_tmp"
129+ printf 'TMPDIR=%s\n' "$private_tmp" >> "$GITHUB_ENV"
91130 - name : Run package contract and extraction gates
92131 run : make check-package
93132 - name : Run public release privacy validation
@@ -129,10 +168,13 @@ jobs:
129168 test -f "$tmpdir/plugin/.codex-plugin/plugin.json"
130169 test ! -e "$tmpdir/plugin/tests"
131170 test ! -e "$tmpdir/source/CodexQB/.git"
132- cd "$tmpdir/source/CodexQB"
133- CODEXQB_VALIDATE_SKIP_UNITTESTS=1 \
134- CODEXQB_VALIDATE_SKIP_BEHAVIOR_SMOKE=1 \
135- bash scripts/validate.sh
171+ python3 -I -S -B scripts/run_extracted_validation.py \
172+ --expected-head "$GITHUB_SHA" \
173+ --zip "$tmpdir/CodexQB-source-worktree.zip" \
174+ --root "$tmpdir/source/CodexQB" \
175+ --profile static \
176+ --skip-unit-tests \
177+ --skip-behavior-smoke
136178
137179 required :
138180 name : required / CodexQB
@@ -161,9 +203,22 @@ jobs:
161203 - uses : actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
162204 with :
163205 fetch-depth : 0
206+ persist-credentials : false
164207 - uses : actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6
165208 with :
166209 python-version : " 3.13"
210+ - name : Harden ephemeral Linux runner home chain
211+ if : runner.os == 'Linux'
212+ shell : bash
213+ run : |
214+ set -euo pipefail
215+ mapfile -d '' -t account_home_chain < <(python -I -S -B -c 'import os, pathlib, pwd; home = pathlib.Path(pwd.getpwuid(os.geteuid()).pw_dir); current = pathlib.Path(home.anchor); chain = [current]; [(chain.append(current := current / component)) for component in home.parts[1:]]; print(*(str(path) for path in chain), sep="\0", end="\0")')
216+ sudo setfacl --remove-all --remove-default -- "${account_home_chain[@]}"
217+ sudo chmod go-w -- "${account_home_chain[@]}"
218+ account_home="${account_home_chain[${#account_home_chain[@]}-1]}"
219+ private_tmp="$account_home/codexqb-ci-tmp"
220+ install -d -m 0700 -- "$private_tmp"
221+ printf 'TMPDIR=%s\n' "$private_tmp" >> "$GITHUB_ENV"
167222 - name : Install release validation dependencies
168223 run : python -m pip install --requirement requirements-ci.txt
169224 - name : Run strict release validation
0 commit comments