@spardutti/claude-skills 2.41.1 → 2.41.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/hooks/ship-gate.sh
CHANGED
|
@@ -176,7 +176,7 @@ if [ -z "$FILES" ]; then
|
|
|
176
176
|
echo " in a language this gate does not know: $UNKNOWN"
|
|
177
177
|
echo " If they are source, add the extension in .claude/gauntlet.conf:"
|
|
178
178
|
echo " GAUNTLET_SOURCE_EXT=\"\$GAUNTLET_SOURCE_EXT|${UNKNOWN%% *}\""
|
|
179
|
-
|
|
179
|
+
printf ' If they are not, add it to GAUNTLET_IGNORE_EXT the same way.\n receipt written, the PR can go ahead. Report it as UNPROVEN, not PASS.\n'
|
|
180
180
|
printf 'UNPROVEN %s unknown-extensions\n' "$(date -u +%FT%TZ)" > "$RECEIPT"
|
|
181
181
|
exit 2
|
|
182
182
|
fi
|
|
@@ -464,7 +464,7 @@ case $STATUS in
|
|
|
464
464
|
1) echo "ship-gate: FAIL in ${SECONDS}s — deal with the findings above, then run this again."
|
|
465
465
|
echo " To ship anyway: bash .claude/hooks/ship-gate.sh --force"
|
|
466
466
|
rm -f "$RECEIPT" ;;
|
|
467
|
-
2)
|
|
467
|
+
2) printf 'ship-gate: UNPROVEN in %ss — nothing is wrong, but nothing was proven either\n receipt written, the PR can go ahead. Report it as UNPROVEN, not PASS.\n' "$SECONDS"
|
|
468
468
|
printf 'UNPROVEN %s\n' "$(date -u +%FT%TZ)" > "$RECEIPT" ;;
|
|
469
469
|
esac
|
|
470
470
|
exit $STATUS
|
|
@@ -62,8 +62,10 @@ if [ "$TOOL" = "Bash" ]; then
|
|
|
62
62
|
STRIPPED=$(printf '%s' "$CMD" | sed 's![12]*>>*[[:space:]]*/dev/null!!g')
|
|
63
63
|
WRITES=""
|
|
64
64
|
case "$STRIPPED" in
|
|
65
|
-
*">"*|*"
|
|
65
|
+
*">"*|*"sed -i"*) WRITES=1 ;;
|
|
66
66
|
esac
|
|
67
|
+
# Whole words only: "git add api/x.py" contains "dd ".
|
|
68
|
+
printf '%s' "$STRIPPED" | grep -qE '(^|[[:space:];|&(])(tee|cp|mv|truncate|dd)[[:space:]]' && WRITES=1
|
|
67
69
|
case "$CMD" in
|
|
68
70
|
*"<<"*|*python*" -c"*|*node*" -e"*|*perl*" -e"*|*ruby*" -e"*) WRITES=1 ;;
|
|
69
71
|
esac
|
|
@@ -24,7 +24,9 @@ SKILL_NAME=$(printf '%s' "$INPUT" | grep -o '"skill":"[^"]*"' | head -1 | sed 's
|
|
|
24
24
|
if [ -n "$SKILL_NAME" ]; then
|
|
25
25
|
# Sanitize: only allow [A-Za-z0-9_-] in the marker filename.
|
|
26
26
|
SAFE_NAME=$(printf '%s' "$SKILL_NAME" | tr -cd 'A-Za-z0-9_-')
|
|
27
|
-
|
|
27
|
+
# Only skills the CLI installed get acked; built-ins and hand-made skills have no rules for us.
|
|
28
|
+
MANIFEST="$(dirname "$(cd "$(dirname "$0")" && pwd)")/.claude-skills.json"
|
|
29
|
+
if [ -n "$SAFE_NAME" ] && tr -d ' \n' 2>/dev/null < "$MANIFEST" | grep -o '"skills":\[[^]]*\]' | grep -q "\"$SAFE_NAME\""; then
|
|
28
30
|
touch "/tmp/claude-skill-loaded-$KEY-$SAFE_NAME"
|
|
29
31
|
# The ack path holds a key the model cannot know, so without this line its
|
|
30
32
|
# first write is always denied just to learn it.
|
package/hooks/skill-gate.sh
CHANGED
|
@@ -85,8 +85,10 @@ if [ "$TOOL" = "Bash" ]; then
|
|
|
85
85
|
STRIPPED=$(printf '%s' "$CMD" | sed 's![12]*>>*[[:space:]]*/dev/null!!g')
|
|
86
86
|
WRITES=""
|
|
87
87
|
case "$STRIPPED" in
|
|
88
|
-
*">"*|*"
|
|
88
|
+
*">"*|*"sed -i"*) WRITES=1 ;;
|
|
89
89
|
esac
|
|
90
|
+
# Whole words only: "git add api/x.py" contains "dd ".
|
|
91
|
+
printf '%s' "$STRIPPED" | grep -qE '(^|[[:space:];|&(])(tee|cp|mv|truncate|dd)[[:space:]]' && WRITES=1
|
|
90
92
|
# An interpreter given inline code or a heredoc can write anything, and the
|
|
91
93
|
# shell shows no redirect at all — this is the shape that got past the gate.
|
|
92
94
|
case "$CMD" in
|