You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit ec4b6a7
Browse filesBrowse the repository at this point in the historyBrowse files
fix: Reject non-basename _vendor.json entries in --skills prune
The prune deletes rm "$dest/$pf" for each prior-stamp .files entry; a
tampered/edited _vendor.json with a path component (e.g. ../../CANARY)
would escape the skill dir. _vendor.json is a committed file any PR can
edit, so refuse any entry that is not a plain basename (reject */*, .,
.., _vendor.json) before the delete. Test tampers a stamp with a
traversal entry and asserts the run fails and the outside file survives.
clawgenti hardening suggestion on #26.
Signed-off-by: Gloire Rubambiza <[email protected]>
Assisted-By: Claude (Anthropic AI) <[email protected]>
if bash "$VENDOR" --source "$SRC" --skills "$SK">/dev/null 2>&1;then
184
+
echo"FAIL: --skills accepted a non-basename stamp entry"; fail=1
185
+
elseecho"PASS: --skills refuses a non-basename stamp entry";fi
186
+
if [ -f"$canary" ];thenecho"PASS: path-traversal prune did not escape the skill dir";elseecho"FAIL: prune deleted a file outside the skill dir"; fail=1;fi
187
+
rm -f "$canary"
188
+
178
189
# --- --skills: a source missing for ONE skill fails loud, NO dir half-vendored ---
0 commit comments