File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed
Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -192,6 +192,8 @@ runs:
192192 ACTION_PATH : ${{ github.action_path }}
193193 # Get author_association from comment events (the main risk)
194194 COMMENT_ASSOCIATION : ${{ github.event.comment.author_association }}
195+ COMMENT_USER_LOGIN : ${{ github.event.comment.user.login }}
196+ COMMENT_USER_TYPE : ${{ github.event.comment.user.type }}
195197 DEBUG : ${{ inputs.debug }}
196198 run : |
197199 # Only enforce auth for comment-triggered events
@@ -202,6 +204,14 @@ runs:
202204 exit 0
203205 fi
204206
207+ # Allow our own GitHub App bot to trigger reviews (e.g., auto-triage posts /review).
208+ # Both login AND type are checked to prevent spoofing by regular accounts.
209+ if [ "$COMMENT_USER_LOGIN" = "docker-agent[bot]" ] && [ "$COMMENT_USER_TYPE" = "Bot" ]; then
210+ echo "ℹ️ Skipping auth check (trusted bot: $COMMENT_USER_LOGIN)"
211+ echo "authorized=bot" >> $GITHUB_OUTPUT
212+ exit 0
213+ fi
214+
205215 echo "Using comment author_association: $COMMENT_ASSOCIATION"
206216
207217 # Allowed roles (hardcoded for security - cannot be overridden)
You can’t perform that action at this time.
0 commit comments