Skip to content

Commit 56e207e

Browse files
fix(ci): unblock the now-honest static-analysis gate and the Idris2 CI job (#28)
Follow-up to #27, which merged before these two fixes were pushed. Without them `main` is red on `🔴 Gate: Static analysis` and `CI / required`. ## 1. `.envrc` — Hypatia critical `secret_detected` #27 turned the Hypatia step in `static-analysis-gate.yml` from a **fake gate** into a real one. Before #27 it passed without ever scanning, via three separate routes: - `continue-on-error: true` on the scanner build, - `if: steps.build.outputs.ready == 'true'` skipping the scan when that build failed, - `echo "[]" > hypatia-findings.json` overwriting unparseable output with an empty array. #27 pins the scanner to a commit, verifies the SHA, builds it properly, and fails on critical findings. It went red because it **started working** — this is not a regression. The first thing it caught: ``` .envrc:24 # export API_KEY="..." ``` A commented-out placeholder, so a false positive — but the fix is to stop writing assignment-shaped comments rather than to suppress the finding. The guidance is kept in prose, pointing at the gitignored `.env`. The scan also reports **7 `high`** findings (`instant-sync.yml`, `build/setup.sh`, `src/interface/ffi/src/main.zig` ×2, and duplicates). Those do not gate and are left for separate triage rather than being swept in here. ## 2. `ci.yml` — Zig setup failed inside the Idris2 container The pinned `idris2-pack` image ships no `xz` binary, so `setup-zig`'s `.tar.xz` download died: ``` tar (child): xz: Cannot exec: No such file or directory Error: The process '/usr/bin/tar' failed with exit code 2 ``` Installs `xz-utils` first, guarded by a `command -v` check so it is a no-op on images that already have it. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
1 parent 3ffd80e commit 56e207e

2 files changed

Lines changed: 15 additions & 2 deletions

File tree

.envrc

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,9 @@ fi
2020
# Project environment variables
2121
export PROJECT_NAME="Haec"
2222
export RSR_TIER="infrastructure"
23-
# export DATABASE_URL="..."
24-
# export API_KEY="..."
23+
# Project secrets (DATABASE_URL, API_KEY, ...) belong in .env, which is
24+
# gitignored and sourced below. Do not add them here: .envrc is committed,
25+
# and assignment-shaped comments trip secret scanners.
2526

2627
# Source .env if it exists (gitignored)
2728
dotenv_if_exists

.github/workflows/ci.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,18 @@ jobs:
2626
- name: Checkout
2727
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
2828

29+
# The pinned idris2-pack image ships no xz binary, so setup-zig's
30+
# .tar.xz download fails with "tar (child): xz: Cannot exec".
31+
- name: Install xz (needed to unpack the Zig tarball)
32+
shell: bash
33+
run: |
34+
set -euo pipefail
35+
if ! command -v xz >/dev/null 2>&1; then
36+
apt-get update -qq
37+
apt-get install -y -qq --no-install-recommends xz-utils
38+
fi
39+
xz --version | head -1
40+
2941
- name: Set up Zig
3042
uses: goto-bus-stop/setup-zig@abea47f85e598557f500fa1fd2ab7464fcb39406 # v2.2.1
3143
with:

0 commit comments

Comments
 (0)