Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions hooks/scripts/read_config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,12 @@ if [ -z "$KEY" ]; then
exit 0
fi

# Allowlist: only accept known config keys to prevent regex injection
case "$KEY" in
git|session_capture) ;;
*) echo "$DEFAULT"; exit 0 ;;
esac

# Find project root — use CLAUDE_PROJECT_DIR if set, otherwise walk up
PROJECT_DIR="${CLAUDE_PROJECT_DIR:-$(pwd)}"
CONFIG_FILE="$PROJECT_DIR/.arscontexta"
Expand Down