Skip to content

Commit d6e5684

Browse files
hyperpolymathclaude
andcommitted
ci(governance-reusable): inline tooling-version-integrity gate + annotate trufflehog soft-gate
P3 propagation: the estate-wide workflow_call reusable now enforces R0 (just>=1.19.0 floor, blocking when just present) and R1 (unversioned family-tool install, blocking) inline and dependency-free, so every repo invoking governance-reusable inherits the burble#39 guard with one existing `uses:` line — no per-repo PR, no script vendoring. R4 stays advisory via the standards lint. Also dogfoods Rule 4: the pre-existing bare continue-on-error on the trufflehog step now carries a by-design rationale, so the canonical template is itself policy-clean. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 7d6e728 commit d6e5684

1 file changed

Lines changed: 34 additions & 0 deletions

File tree

.github/workflows/governance-reusable.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -241,6 +241,36 @@ jobs:
241241
exit 1
242242
fi
243243
echo "✅ Security policy check passed"
244+
- name: Tooling version integrity
245+
# Estate Tooling Version Integrity policy (root cause: burble#39).
246+
# Inline + dependency-free so it runs in any caller repo.
247+
# R0 just>=1.19.0 floor (blocking when just present) and R1
248+
# unversioned family-tool install (blocking) are hard; R4
249+
# unexplained continue-on-error is advisory-first per the
250+
# documented "advisory now, --strict later" gating doctrine.
251+
run: |
252+
set -uo pipefail
253+
FAMILY='just|must|trust|adjust|bust|dust|intend'
254+
if command -v just >/dev/null 2>&1; then
255+
jv=$(just --version 2>/dev/null | cut -d' ' -f2)
256+
maj=${jv%%.*}; rest=${jv#*.}; min=${rest%%.*}
257+
if [ -z "$jv" ] || ! { [ "${maj:-0}" -gt 1 ] || { [ "${maj:-0}" -eq 1 ] && [ "${min:-0}" -ge 19 ]; }; }; then
258+
echo "❌ [R0] just ${jv:-?} < 1.19.0 — import? unsupported"; exit 1
259+
fi
260+
echo "✅ [R0] just $jv >= 1.19.0"
261+
else
262+
echo "ℹ️ [R0] just not on PATH — skipped"
263+
fi
264+
R1=0
265+
if [ -d .github/workflows ]; then
266+
while IFS= read -r hit; do
267+
[ -n "$hit" ] || continue
268+
echo "❌ [R1] unversioned family-tool install: $hit"
269+
R1=$((R1+1))
270+
done < <(grep -rnE "^[[:space:]]*tool:[[:space:]]*(${FAMILY})[[:space:]]*$" .github/workflows 2>/dev/null || true)
271+
fi
272+
[ "$R1" -gt 0 ] && { echo "❌ [R1] $R1 unversioned family-tool install(s) — pin tool: <name>@<ver>"; exit 1; }
273+
echo "✅ Tooling version integrity passed (R1 clean; R4 advisory via standards/tasks/tooling-integrity-lint.sh)"
244274
245275
quality:
246276
name: Code quality + docs
@@ -258,6 +288,10 @@ jobs:
258288
path: ./
259289
base: ${{ github.event.pull_request.base.sha || github.event.before }}
260290
head: ${{ github.sha }}
291+
# by-design: trufflehog is a best-effort advisory scan; a scanner
292+
# diff/range hiccup must not fail the whole governance gate. The
293+
# blocking secret check is the inline grep in the security job.
294+
# (Tooling Version Integrity Rule 4 — documented soft-gate.)
261295
continue-on-error: true
262296
- name: Check TODO/FIXME
263297
run: |

0 commit comments

Comments
 (0)