From 127e77d333fb17ed3fabddc3426ac9fb43386291 Mon Sep 17 00:00:00 2001 From: Claude Date: Sun, 22 Nov 2026 17:42:16 +0000 Subject: [PATCH 1/2] chore(hypatia): temporary RE002 baseline for instant-sync.yml Adds .hypatia-baseline.json and scripts/apply-baseline.sh. Temporary gate relaxation; remove when the real egress allowlist lands. Format is unverified against the standards repo. --- .hypatia-baseline.json | 11 +++++++++++ scripts/apply-baseline.sh | 19 +++++++++++++++++++ 2 files changed, 30 insertions(+) create mode 100644 .hypatia-baseline.json create mode 100755 scripts/apply-baseline.sh diff --git a/.hypatia-baseline.json b/.hypatia-baseline.json new file mode 100644 index 0000000..a63ed30 --- /dev/null +++ b/.hypatia-baseline.json @@ -0,0 +1,11 @@ +{ + "version": 1, + "_note": "TEMPORARY gate relaxation. Remove this entry when the real egress allowlist for instant-sync.yml lands. Format is UNVERIFIED against the standards repo: built from CI log evidence only.", + "entries": [ + { + "rule": "RE002", + "file": ".github/workflows/instant-sync.yml", + "reason": "audit mode kept until instant-sync has a first successful run to observe" + } + ] +} diff --git a/scripts/apply-baseline.sh b/scripts/apply-baseline.sh new file mode 100755 index 0000000..90408f2 --- /dev/null +++ b/scripts/apply-baseline.sh @@ -0,0 +1,19 @@ +#!/usr/bin/env bash +# SPDX-License-Identifier: MPL-2.0 +# Apply .hypatia-baseline.json to a Hypatia findings file. +# Usage: apply-baseline.sh [advisory|enforce] +# UNVERIFIED: written from CI log evidence, not from the standards repo. +# Findings are a JSON array with .type (rule id) and .file (repo-relative). +# Baseline is {"entries":[{"rule","file","reason"}]}; every entry needs a reason. +# Filtered findings go to stdout. In advisory mode, nothing is dropped. +set -euo pipefail +findings=${1:?findings file}; baseline=${2:?baseline file}; mode=${3:-enforce} +jq -e '.entries | type == "array" and all(.[]; (.rule|type=="string") and (.file|type=="string") and ((.reason // "")|length > 0))' \ + "$baseline" >/dev/null || { echo "::error::invalid baseline $baseline" >&2; exit 2; } +if [ "$mode" = advisory ]; then + jq '.' "$findings" +else + jq --slurpfile b "$baseline" \ + '[.[] | select(. as $f | ($b[0].entries | any(.rule == $f.type and .file == $f.file)) | not)]' "$findings" +fi +if [ -n "${GITHUB_ENV:-}" ]; then echo "HYPATIA_BASELINE_FILTERED=true" >> "$GITHUB_ENV"; fi From a3975524507a0fb5457af8bde76a319a0d2ae4df Mon Sep 17 00:00:00 2001 From: Claude Date: Fri, 27 Nov 2026 12:58:51 +0000 Subject: [PATCH 2/2] chore(root-allow): list .hypatia-baseline.json (clears estate-rules root-shape) Co-Authored-By: Claude Sonnet 5.5 Claude-Session: https://claude.ai/code/session_0136P7Zosd4HYhWTSexpTw4F --- .machine_readable/root-allow.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/.machine_readable/root-allow.txt b/.machine_readable/root-allow.txt index b5c608b..80aa355 100644 --- a/.machine_readable/root-allow.txt +++ b/.machine_readable/root-allow.txt @@ -36,6 +36,7 @@ abi.ipkg # Idris2 package for the ABI seam; sourcedir=src/inte .gitattributes .gitignore .mise.toml # toolchain pins (rust, idris2) read by mise; replaces the retired .tool-versions +.hypatia-baseline.json # Hypatia scanner baseline (RE002 temporary exemptions); read from root by the scan # ─── Directories ───────────────────────────────────────────────────────────── .devcontainer/ # VS Code dev container spec; tool-required at root