Skip to content
Merged
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
16 changes: 16 additions & 0 deletions .github/workflows/ai-gatekeeper.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,14 @@ jobs:
for USER in $APPROVERS; do
if [ "$USER" == "$REQUESTER_HANDLE" ]; then
echo "❌ SECURITY VIOLATION: @$USER requested this AI work and cannot be the sole approver."
gh pr comment $PR --body "$(cat <<EOF
**Review Required**

@$USER, you requested this AI-generated PR and cannot be the sole approver. Please add another reviewer (not yourself) to approve this PR before it can be merged.

This is a security measure to ensure AI-generated code is reviewed by someone other than the person who requested it.
EOF
)"
exit 1
fi
done
Expand All @@ -47,6 +55,14 @@ jobs:
echo "⚠️ Devin PR detected, but no GitHub handle found in 'Requested by' line."
if [ "$APPROVER_COUNT" -lt 2 ]; then
echo "❌ IDENTITY UNCERTAINTY: Because the requester's handle is missing, we require at least TWO different human approvals."
gh pr comment $PR --body "$(cat <<EOF
**Additional Review Required**

This is an AI-generated PR, but the requester's GitHub handle could not be identified. As a security measure, at least **two different human approvals** are required before this PR can be merged.

Please add another reviewer to approve this PR.
EOF
)"
exit 1
fi
fi
Expand Down