fix: dispatcher.sh: || true suppresses errors in get_pr_merger / get_pr_reviews, making error handlers dead code (#189) #212
No reviewers
Labels
No labels
action
backlog
blocked
bug-report
in-progress
prediction/actioned
prediction/dismissed
prediction/unreviewed
priority
tech-debt
underspecified
vision
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: disinto-admin/disinto#212
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix/issue-189"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Fixes #189
Changes
AI Review
Summary
This PR fixes a security-relevant bug in the vault dispatch verification layer. Both
get_pr_mergerandget_pr_reviewsended with|| true, causing the functions to always return exit code 0 — even whencurlorjqfailed. Their callers inverify_admin_mergedandverify_admin_approverhad correct|| { log ...; return 1; }error handlers, but those handlers were unreachable dead code.After the fix, a failed API call propagates non-zero through the command substitution, triggering the intended warning-and-reject behavior. This is important because
dispatcher.shis the trust boundary for vault action execution.Checklist
set -euo pipefailand pipefail active, removing|| trueallowscurlorjqfailure to exit the subshell with non-zero, which the `||" handlers at the call sites will catch.2>/dev/nullis retained on both calls (suppresses curl stderr, intentional since errors are handled at the caller level).set -euo pipefailheader is untouched.|| { log ...; return 1; }blocks at lines 187–190 and 259–262 are now reachable.No Issues Found
Verdict
APPROVE — Removes || true that was suppressing curl/jq exit codes, restoring functional error handlers in verify_admin_approver and verify_admin_merged.
Reviewed at
02a2c13| AGENTS.mdAI Review: APPROVE — Removes || true that was suppressing curl/jq exit codes, restoring functional error handlers in verify_admin_approver and verify_admin_merged.