Skip to content

Commit 65139f6

Browse files
committed
fix(security/compliance): standardized TruffleHog and RSR metadata
2 parents 54e7eee + 357b806 commit 65139f6

32 files changed

Lines changed: 1868 additions & 848 deletions

.claude/hooks/session-start.sh

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
#!/usr/bin/env bash
2+
# SPDX-License-Identifier: MPL-2.0
3+
# SessionStart hook — make Lean available in Claude Code on the web so the
4+
# proofs in proofs/Tangle.lean can be built and verified (the repo's working
5+
# rule: "every edit ends with a Lean compile").
6+
#
7+
# Thin wrapper over proofs/bootstrap-lean.sh (the single source of truth for
8+
# toolchain setup). Synchronous: guarantees Lean is ready before the agent
9+
# loop starts, so it never races a build/verify against a half-installed
10+
# toolchain. Web/remote sessions only; local developers use their own Lean.
11+
set -euo pipefail
12+
13+
[ "${CLAUDE_CODE_REMOTE:-}" = "true" ] || exit 0
14+
15+
REPO="${CLAUDE_PROJECT_DIR:-$(pwd)}"
16+
BOOT="$REPO/proofs/bootstrap-lean.sh"
17+
if [ ! -x "$BOOT" ]; then
18+
echo "session-start: $BOOT not found or not executable; skipping Lean bootstrap."
19+
exit 0
20+
fi
21+
22+
# Install the pinned toolchain (idempotent; ~16s cold, instant when cached).
23+
# A failure must not block the whole session — Lean just won't be ready, and
24+
# the developer can run proofs/bootstrap-lean.sh by hand.
25+
if "$BOOT"; then
26+
# Persist `lean` on PATH for the rest of the session.
27+
if [ -n "${CLAUDE_ENV_FILE:-}" ]; then
28+
"$BOOT" --print-path >> "$CLAUDE_ENV_FILE"
29+
fi
30+
else
31+
echo "session-start: Lean bootstrap failed; continuing without Lean." \
32+
"Run proofs/bootstrap-lean.sh manually once network is available." >&2
33+
fi
34+
exit 0

.claude/settings.json

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"hooks": {
3+
"SessionStart": [
4+
{
5+
"hooks": [
6+
{
7+
"type": "command",
8+
"command": "$CLAUDE_PROJECT_DIR/.claude/hooks/session-start.sh"
9+
}
10+
]
11+
}
12+
]
13+
}
14+
}

.github/workflows/dogfood-gate.yml

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@ jobs:
2222
timeout-minutes: 15
2323
steps:
2424
- name: Checkout repository
25-
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
25+
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
26+
2627
- name: Check for A2ML files
2728
id: detect
2829
run: |
@@ -62,7 +63,8 @@ jobs:
6263
timeout-minutes: 15
6364
steps:
6465
- name: Checkout repository
65-
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
66+
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
67+
6668
- name: Check for K9 files
6769
id: detect
6870
run: |
@@ -107,7 +109,8 @@ jobs:
107109
timeout-minutes: 15
108110
steps:
109111
- name: Checkout repository
110-
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
112+
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
113+
111114
- name: Scan for invisible characters
112115
id: lint
113116
run: |
@@ -168,7 +171,8 @@ jobs:
168171
timeout-minutes: 15
169172
steps:
170173
- name: Checkout repository
171-
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
174+
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
175+
172176
- name: Check for Groove manifest
173177
id: groove
174178
run: |
@@ -225,7 +229,8 @@ jobs:
225229
if: always()
226230
steps:
227231
- name: Checkout repository
228-
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
232+
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
233+
229234
- name: Generate dogfooding scorecard
230235
run: |
231236
SCORE=0

0 commit comments

Comments
 (0)