From 8189f46ffe5bd3618d48f14f005aa5b7b3e0d173 Mon Sep 17 00:00:00 2001 From: don-petry <36422719+don-petry@users.noreply.github.com> Date: Tue, 14 Apr 2026 15:10:08 +0000 Subject: [PATCH] fix(compliance-audit): handle boolean false in settings checks The jq alternative operator (//) treats boolean false as falsy, causing settings like has_wiki: false to be reported as null instead of false. This means the has_wiki check (and any other boolean-false check) always fires even when the repository setting is correctly set to false. Fix: use '| tostring' with an explicit null guard instead of //. Closes petry-projects/bmad-bgreat-suite#89 --- scripts/compliance-audit.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/compliance-audit.sh b/scripts/compliance-audit.sh index 8550bf3fb..418d9b8f1 100755 --- a/scripts/compliance-audit.sh +++ b/scripts/compliance-audit.sh @@ -300,7 +300,7 @@ check_repo_settings() { for entry in "${REQUIRED_SETTINGS_BOOL[@]}"; do IFS=':' read -r key expected severity detail <<< "$entry" local actual - actual=$(echo "$settings" | jq -r ".$key // \"null\"") + actual=$(echo "$settings" | jq -r ".$key | if . == null then \"null\" else tostring end") if [ "$actual" != "$expected" ]; then add_finding "$repo" "settings" "$key" "$severity" \ "$detail (current: \`$actual\`, expected: \`$expected\`)" \