Why: cleanup, component synchronization, receipt recording and credential handling could contradict the documented development boundaries. Evidence: SELF 75 isolated governance tests and source checks are captured in .task/feature-governance-reliability.md; combination and CI verification follow. Impact: hardens local task and CI tooling, aligns policy and component documentation, and adds continuous regression tests without changing product behavior. Refs: .task/feature-governance-reliability.md; policy/governance.md; policy/platform-admission.md
11 lines
371 B
Bash
11 lines
371 B
Bash
#!/usr/bin/env bash
|
|
# PreToolUse 写路径守卫。解析/依赖错误均拒绝,不能把未知请求当作安全请求。
|
|
set -uo pipefail
|
|
if ! command -v python3 >/dev/null 2>&1; then
|
|
echo 'write-guard: 拒绝——缺少 python3,无法检查写入目标' >&2
|
|
exit 2
|
|
fi
|
|
python3 "$(dirname "$0")/write_guard.py"
|
|
result=$?
|
|
if [ "$result" -ne 0 ]; then exit 2; fi
|