#!/bin/bash # beforeReadFile: log file access, allow by default HOOKS_DIR="$(cd "$(dirname "$0")" && pwd)" # shellcheck source=lib.sh . "${HOOKS_DIR}/lib.sh" input=$(cat) path=$(echo "$input" | jq -r '.path // .file_path // .fsPath // "?"') log_event "beforeReadFile" "path=$path" # Allow all reads. Return empty or allow decision. echo '{}' exit 0