Skip to content

chore: clear genuine Hypatia findings (stale src/abi docs, setup.sh, .envrc) - #27

Merged
hyperpolymath merged 1 commit into
mainfrom
claude/hypatia-findings-cleanup
Jun 21, 2026
Merged

chore: clear genuine Hypatia findings (stale src/abi docs, setup.sh, .envrc)#27
hyperpolymath merged 1 commit into
mainfrom
claude/hypatia-findings-cleanup

Conversation

@hyperpolymath

Copy link
Copy Markdown
Owner

Context

After #26 bumped the standards reusables to d72fe5a, the Hypatia scanner upgraded (915139d → current) and now reports 11 advisory findings. Investigation (running the real scanner against this repo) found ~4 genuine + ~7 false-positives. This PR fixes the genuine, in-repo subset. It is the cleanup approved after "investigate upstream first."

This PR does not turn the hypatia check green on its own. The red check is an upstream regression: standards/.github/workflows/hypatia-scan-reusable.yml dropped --exit-zero + || true from the scan step, so the advisory scanner ("warn but don't fail — fix forward") now hard-fails on any ≥medium finding. Restoring that guard (owner-only, one line) is what greens the check; this PR just removes the genuine findings underneath.

Changes

Docs — structural_drift/SD022 ×6 (stale path after #20 removed the FFI stubs)

src/abi/ doesn't exist; the real RSR slot is src/interface/abi/. Corrected the path in:

  • docs/practice/AI-CONVENTIONS.adoc, docs/RSR_OUTLINE.adoc, QUICKSTART-DEV.adoc, docs/governance/MAINTENANCE-CHECKLIST.adoc, .machine_readable/INTENT.contractile
  • docs/developer/ABI-FFI-README.adoc was an unfilled template (still had a {{project}} placeholder + a {{~ delete this line ~}} instruction) describing a non-existent Idris2/Zig FFI surface → replaced with a short, honest "no FFI surface" stub pointing at the real src/interface/{abi,ffi,generated}/ placeholders and PROOF-NEEDS.md. (This is the one larger edit — easy to revert if you'd rather keep/rewrite the original.)

setup.shcode_safety/shell_download_then_run (CWE-494)

  • Replaced curl … just.systems/install.sh | bash (2 sites) with an install_just_upstream() helper that downloads then runs (no pipe-to-shell), with opt-in JUST_VERSION pinning and JUST_INSTALL_SHA256 verification. Native package managers (incl. nix/guix) are still tried first; the upstream installer is only the last-resort fallback.
  • Updated the header usage example to the download-then-run form.

.envrcsecret_detected "Generic API key" (the 1 "critical")

Not fixed here (scanner false-positives — belong upstream in hyperpolymath/hypatia)

  • WF017 on instant-sync.yml — repo already uses the correct two-step secret-presence gate (if: steps.gate.outputs.has_token); the rule only recognizes same-step gating.
  • SC-014 StaticAnalysis — check_sast matches governance.yml's docstring substring "codeql" instead of the real codeql.yml (which does declare language: actions).
  • SC-013 DependencyPinning — triggered by commented-out @v4 examples in release.yml; it doesn't strip YAML comments. All live actions are SHA-pinned.

Verification

  • ✅ No src/abi/ references remain (grep), all corrected paths resolve to real dirs.
  • .envrc has no commented export API_KEY/DATABASE_URL lines.
  • setup.sh has no curl … | sh/bash pipes and passes sh -n.
  • ✅ Stub references (src/interface/*, PROOF-NEEDS.md) all exist.

🤖 Generated with Claude Code

https://claude.ai/code/session_01UCnxjXkN6uDj9YSANuGEgR


Generated by Claude Code

… setup.sh, .envrc

Addresses the actionable subset of the Hypatia advisory findings surfaced by the
scanner upgrade in #26. The remaining ~7 are scanner false-positives (WF017 two-step
gate, SC-013 comment stripping, SC-014 codeql substring) for an upstream fix.

Docs (structural_drift SD022 x6 — stale path after #20's FFI removal):
- correct `src/abi/` -> the real RSR slot `src/interface/abi/` in AI-CONVENTIONS,
  RSR_OUTLINE, QUICKSTART-DEV, MAINTENANCE-CHECKLIST, INTENT.contractile
- replace the unfilled-template docs/developer/ABI-FFI-README.adoc (it still carried
  a `{{project}}` placeholder and a template-instruction line and described a
  non-existent FFI surface) with an honest "no FFI surface" stub pointing at the RSR
  placeholders and PROOF-NEEDS.md

setup.sh (code_safety shell_download_then_run / CWE-494):
- replace `curl ... just.systems/install.sh | bash` with a download-then-run helper
  (no pipe-to-shell), with opt-in JUST_VERSION pin and JUST_INSTALL_SHA256 verify;
  native package managers (incl. nix/guix) are still tried first
- update the header usage example to the download-then-run form

.envrc (secret_detected "Generic API key" — false-positive, commented placeholder):
- remove the residual `# export DATABASE_URL=...` / `# export API_KEY=...` lines
  (re-lands the fix intended in #25 that never reached main)

This does not by itself turn the hypatia check green — that needs the upstream
reusable to restore `--exit-zero`/`|| true` on the scan step so it follows its
documented advisory ("warn but don't fail") policy.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UCnxjXkN6uDj9YSANuGEgR
@hyperpolymath
hyperpolymath marked this pull request as ready for review June 21, 2026 12:08
@hyperpolymath
hyperpolymath merged commit 57f3d7a into main Jun 21, 2026
13 of 14 checks passed
@hyperpolymath
hyperpolymath deleted the claude/hypatia-findings-cleanup branch June 21, 2026 12:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants