Skip to content

governance: Validate Hypatia Baseline red on main — the gate builds the scanner from a pin that predates our own fix for the class it fires on #855

Description

@hyperpolymath

Symptom

governance / Validate Hypatia Baseline is red on main and has been the only
real red there. Run 35783374301, job 106934294699, 38s (a real verdict, not a
startup death):

##[error]Gate failed: 5 unfiltered finding(s) at or above 'info'

A standing red on main is itself a detector-blinding condition: while it sits
there, nobody can tell a NEW gate failure from this one.

What the five findings are

n rule severity location
3 security_errors / secret_detected critical lib/hypatia/scanner_suppression.ex:252
2 code_safety / zig_ptr_cast, zig_align_cast high ffi/zig/src/main.zig

Both clusters are false positives, and they fail for different reasons.

The three secrets: a detector matching the prose that describes it

Line 252 is a comment that documents the three @secret_patterns which match on
form alone — it spells out api_key = "...", secret = "...", password = "...".
All three patterns match the comment that documents them. Same family as the
RE005 defect in #834, where the rule "matched the prose arguing against the thing
it was looking for". Documenting a false-positive class creates instances of it.

The two Zig casts: the mandatory opaque-handle idiom

Already filed as #834. ffi/zig/src/main.zig declares pub const Handle = opaque {},
so recovering *HandleState requires exactly @ptrCast(@alignCast(handle)). The
rule matches a bare ~r/@ptrCast/ at :high and reports at main.zig:1 rather than
the cast site, so no per-line directive can reach it.

Root cause of the secrets half — the gate runs a scanner older than our own fix

The governance gate builds the scanner from a pinned commit and scans HEAD.
They are different commits.

  • pin: 0e913426, 2026-09-06 (HYPATIA_PIN in hyperpolymath/standards
    .github/workflows/governance-reusable.yml)
  • scanned tree: main @ 8e8943f, 2026-09-22

bc8812e ("label-aware secret suppression", #782, 2026-09-14) is an ancestor of
main and is not an ancestor of the pin — verified with git merge-base --is-ancestor in both directions. The pinned lib/hypatia/scanner_suppression.ex
has 4 occurrences of the label/context-suppression identifiers; HEAD's has 12.

Our own cure for this exact false-positive class is in the repo and absent from
the scanner enforcing the gate.

This also constrains which cures are even possible: compiled-in suppression
(@default_exemptions, @training_corpus_paths) lives in the scanner and cannot
affect this gate. Only scanned-tree mechanisms can — .hypatia-ignore,
.hypatia-baseline.json, and inline # hypatia: allow directives.

Acceptance criteria

Structural follow-up (not this issue)

Bumping HYPATIA_PIN past bc8812e would cure the secrets half at the source,
but that pin is a required status check on ~120 caller repos, so it is a
cross-repo change with that blast radius. Filed separately against standards.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    automationBots, schedulers, dispatch, self-healing, fan-outbugSomething is broken or behaves incorrectlycicdCI/CD: workflows, actions, lockfiles, pins, runners, release gatesgovernancePolicy, rulesets, standards, compliance, and their enforcement

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions