security: re-pin secret scanner onto the real gitleaks gate (#55) #33
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # SPDX-License-Identifier: MPL-2.0 | |
| # abi-ffi-gate.yml — enforce that the Zig FFI conforms to the Idris2 ABI. | |
| # | |
| # The Idris2 ABI (src/interface/abi) is the source of truth. This gate fails if | |
| # the Zig FFI (src/interface/ffi) drifts from it: a declared C function with no | |
| # export, a mismatched result-code map, or an unrendered template token. A | |
| # second job builds + tests the Zig FFI under the pinned Zig 0.14.0. A third job | |
| # typechecks the Idris2 ABI itself (idris2 --typecheck) so the proofs cannot rot | |
| # into a non-compiling state while the structural gate stays green — the ABI was | |
| # authored and locally verified but never compiler-checked in CI (G34). | |
| name: ABI-FFI Gate | |
| on: | |
| pull_request: | |
| push: | |
| branches: [main, master] | |
| permissions: | |
| contents: read | |
| jobs: | |
| conformance: | |
| name: ABI ↔ FFI structural conformance | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install Julia 1.11.5 | |
| run: | | |
| curl -fsSL https://julialang-s3.julialang.org/bin/linux/x64/1.11/julia-1.11.5-linux-x86_64.tar.gz -o /tmp/julia.tar.gz | |
| tar -xf /tmp/julia.tar.gz -C /tmp | |
| echo "/tmp/julia-1.11.5/bin" >> "$GITHUB_PATH" | |
| - name: Run ABI-FFI gate | |
| run: | | |
| julia --version # confirms the pinned 1.11.5 is on PATH, not the runner default | |
| julia scripts/abi-ffi-gate.jl | |
| zig-build: | |
| name: Zig FFI builds + tests (Zig 0.14.0) | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install Zig 0.14.0 | |
| run: | | |
| curl -fsSL https://ziglang.org/download/0.14.0/zig-linux-x86_64-0.14.0.tar.xz -o /tmp/zig.tar.xz | |
| tar -xf /tmp/zig.tar.xz -C /tmp | |
| echo "/tmp/zig-linux-x86_64-0.14.0" >> "$GITHUB_PATH" | |
| - name: zig test FFI | |
| run: zig test src/interface/ffi/src/main.zig -lc | |
| idris2-abi: | |
| name: Idris2 ABI typecheck (Idris2 0.7.0) | |
| runs-on: ubuntu-latest | |
| # Prebuilt pack image (SHA-pinned) — avoids a ~10-min Chez/Idris2 source | |
| # build. Same image the Axiom.jl idris2-abi-check job runs against. | |
| container: | |
| image: ghcr.io/stefan-hoeck/idris2-pack@sha256:de9781906050dc44704ec6de0108c86f899ef17b2642932b79e00245d613b8ad | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: idris2 --version | |
| run: idris2 --version | |
| - name: Typecheck ABI package (Types, Layout, Foreign, Proofs, Semantics, Invariants, FfiSeam, Capstone) | |
| working-directory: src/interface/abi | |
| run: idris2 --typecheck julianiser-abi.ipkg |