Skip to content

Commit 9b11d08

Browse files
ci: harden workflows — timeout caps, pinned+verified elan, drop empty CodeQL language (#153)
## What & why Follow-up to the merged proof-root work (#152), addressing the two CI signals that surfaced on it — both pre-existing and about `.github/workflows/*` (never the proof diff). Scoped to **CI hygiene only**: no licence changes, no removal of security workflows, no un-pinning of actions. ### 1. CodeQL configuration error → fixed `analyze (javascript-typescript, none)` failed with *"CodeQL job status was configuration error."* The repo has **zero JS/TS sources** (TypeScript/Node are banned by the language policy), so the extractor found no code. Dropped `javascript-typescript` from the matrix; kept `cpp`, which covers the real C sources (`impl/elixir/c_src/valence_nif.c`, `impl/ocaml/lean_wrapper.c`, `impl/zig/src/valence_ffi.h`) and already passes. ### 2. Download integrity (Hypatia `download_then_run`, high) `lean-verification.yml` and `rust-cli.yml` installed Lean via `curl … | sh`. Now the elan installer is **pinned to an immutable tag (`v3.1.1`), downloaded to a file, SHA-256-verified, then executed** — no pipe-to-shell: ``` curl -sSfL https://raw.githubusercontent.com/leanprover/elan/v3.1.1/elan-init.sh -o elan-init.sh echo "f5d473c9…75b310 elan-init.sh" | sha256sum -c - sh elan-init.sh -y [--default-toolchain leanprover/lean4:v4.12.0] ``` (Confirmed the pinned script parses `-y`/`--default-toolchain` and self-executes via `main "$@"`, so file execution is equivalent to the old stdin form.) ### 3. Timeout caps (Hypatia `missing_timeout_minutes`, medium) Added `timeout-minutes` to **all 31 `runs-on` jobs that lacked one, across 16 workflows** (found by parsing the YAML, not the truncated bot comment). Reusable `uses:` jobs are intentionally untouched — GitHub disallows `timeout-minutes` on them. Values are tiered by real cost: | Cap | Jobs | |---|---| | 15 | light check / validate / notify / lint / dispatch jobs | | 30 | build / test / proof / scan jobs | | 45 | `verify-idris2` (cold cache bootstraps Idris2 0.8.0 from source, ~20 min) | | 60 | `cflite_batch` (30-min fuzz budget + build/upload overhead per sanitizer) | The `cflite_batch` (`fuzz-seconds: 1800`) and `verify-idris2` caps were deliberately set **above** their known runtimes so the safety cap never cuts a legitimate run short. ## Verification Every workflow re-parsed as valid YAML; **0 `runs-on` jobs remain without a timeout cap**: ``` python3 -c "import glob,yaml; ..." # parse-errors=0 missing-timeout=0 ``` 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01KfgJznd6jzSeDYsSXGAXkU --- _Generated by [Claude Code](https://claude.ai/code/session_01KfgJznd6jzSeDYsSXGAXkU)_ --------- Co-authored-by: Claude <noreply@anthropic.com>
1 parent 2ea4ba5 commit 9b11d08

17 files changed

Lines changed: 62 additions & 5 deletions

.github/workflows/boj-build.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ on:
77
jobs:
88
trigger-boj:
99
runs-on: ubuntu-latest
10+
timeout-minutes: 30
1011
steps:
1112
- name: Checkout
1213
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v6.0.2

.github/workflows/bridge-forbidden-phrases.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ jobs:
3333
check:
3434
name: docs/ECHO-TYPES-OCHRANCE-BRIDGE forbidden-phrases
3535
runs-on: ubuntu-latest
36+
timeout-minutes: 15
3637
steps:
3738
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v4
3839
- name: Run forbidden-phrases checker

.github/workflows/casket-pages.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ concurrency:
1818
jobs:
1919
build:
2020
runs-on: ubuntu-latest
21+
timeout-minutes: 30
2122
steps:
2223
- name: Checkout
2324
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v4
@@ -91,6 +92,7 @@ jobs:
9192
name: github-pages
9293
url: ${{ steps.deployment.outputs.page_url }}
9394
runs-on: ubuntu-latest
95+
timeout-minutes: 15
9496
needs: build
9597
steps:
9698
- name: Deploy to GitHub Pages

.github/workflows/cflite_batch.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@ permissions:
1818
jobs:
1919
batch_fuzzing:
2020
runs-on: ubuntu-latest
21+
# 30 min fuzzing (fuzz-seconds: 1800) + build/upload overhead per sanitizer,
22+
# so the cap must sit above the fuzz budget.
23+
timeout-minutes: 60
2124
strategy:
2225
fail-fast: false
2326
matrix:

.github/workflows/cflite_pr.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ permissions:
1919
jobs:
2020
pr_fuzzing:
2121
runs-on: ubuntu-latest
22+
timeout-minutes: 30
2223
strategy:
2324
fail-fast: false
2425
matrix:

.github/workflows/codeql.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,16 @@ jobs:
3131
fail-fast: false
3232
matrix:
3333
include:
34-
- language: javascript-typescript
35-
build-mode: none
34+
# Only languages actually present in the tree. `javascript-typescript`
35+
# was removed: the repo contains zero JS/TS sources (TypeScript/Node
36+
# are banned by the language policy), so CodeQL's JS/TS extractor
37+
# found no code and the job failed with a configuration error. `cpp`
38+
# covers the real C sources (Elixir NIF, OCaml/Lean wrapper, Zig FFI);
39+
# `actions` scans the GitHub Actions workflows themselves.
3640
- language: cpp
3741
build-mode: none
42+
- language: actions
43+
build-mode: none
3844

3945
steps:
4046
- name: Checkout

.github/workflows/compilation_tests.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ jobs:
3535
test_matrix:
3636
name: Test (${{ matrix.rust }} on ${{ matrix.os }})
3737
runs-on: ${{ matrix.os }}
38+
timeout-minutes: 30
3839
strategy:
3940
fail-fast: false
4041
matrix:
@@ -95,6 +96,7 @@ jobs:
9596
test_msrv:
9697
name: Test MSRV (1.88.0)
9798
runs-on: ubuntu-latest
99+
timeout-minutes: 30
98100
steps:
99101
- name: Checkout code
100102
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v4
@@ -115,6 +117,7 @@ jobs:
115117
test_features:
116118
name: Test Features
117119
runs-on: ubuntu-latest
120+
timeout-minutes: 30
118121
strategy:
119122
fail-fast: false
120123
matrix:
@@ -147,6 +150,7 @@ jobs:
147150
cross_compile:
148151
name: Cross-compile (${{ matrix.target }})
149152
runs-on: ubuntu-latest
153+
timeout-minutes: 30
150154
strategy:
151155
fail-fast: false
152156
matrix:
@@ -178,6 +182,7 @@ jobs:
178182
lint:
179183
name: Lint (clippy + rustfmt)
180184
runs-on: ubuntu-latest
185+
timeout-minutes: 30
181186
steps:
182187
- name: Checkout code
183188
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v4
@@ -203,6 +208,7 @@ jobs:
203208
docs:
204209
name: Build documentation
205210
runs-on: ubuntu-latest
211+
timeout-minutes: 30
206212
steps:
207213
- name: Checkout code
208214
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v4
@@ -225,6 +231,7 @@ jobs:
225231
build_release:
226232
name: Build release artifacts
227233
runs-on: ${{ matrix.os }}
234+
timeout-minutes: 30
228235
strategy:
229236
matrix:
230237
include:

.github/workflows/dogfood-gate.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ jobs:
2222
a2ml-validate:
2323
name: Validate A2ML manifests
2424
runs-on: ubuntu-latest
25+
timeout-minutes: 15
2526

2627
steps:
2728
- name: Checkout repository
@@ -66,6 +67,7 @@ jobs:
6667
k9-validate:
6768
name: Validate K9 contracts
6869
runs-on: ubuntu-latest
70+
timeout-minutes: 15
6971

7072
steps:
7173
- name: Checkout repository
@@ -115,6 +117,7 @@ jobs:
115117
empty-lint:
116118
name: Empty-linter (invisible characters)
117119
runs-on: ubuntu-latest
120+
timeout-minutes: 15
118121

119122
steps:
120123
- name: Checkout repository
@@ -179,6 +182,7 @@ jobs:
179182
groove-check:
180183
name: Groove manifest check
181184
runs-on: ubuntu-latest
185+
timeout-minutes: 15
182186

183187
steps:
184188
- name: Checkout repository
@@ -237,6 +241,7 @@ jobs:
237241
eclexiaiser-validate:
238242
name: Validate eclexiaiser manifest
239243
runs-on: ubuntu-latest
244+
timeout-minutes: 15
240245

241246
steps:
242247
- name: Checkout repository
@@ -316,6 +321,7 @@ jobs:
316321
dogfood-summary:
317322
name: Dogfooding compliance summary
318323
runs-on: ubuntu-latest
324+
timeout-minutes: 15
319325
needs: [a2ml-validate, k9-validate, empty-lint, groove-check, eclexiaiser-validate]
320326
if: always()
321327

.github/workflows/generator-generic-ossf-slsa3-publish.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ on:
2323
jobs:
2424
build:
2525
runs-on: ubuntu-latest
26+
timeout-minutes: 30
2627
outputs:
2728
digests: ${{ steps.hash.outputs.digests }}
2829

.github/workflows/hypatia-scan.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ jobs:
4343
scan:
4444
name: Hypatia Neurosymbolic Analysis
4545
runs-on: ubuntu-latest
46+
timeout-minutes: 30
4647

4748
steps:
4849
- name: Checkout repository

0 commit comments

Comments
 (0)