Skip to content

Add copilot to bot-detection allowlist#15046

Merged
pelikhan merged 3 commits intomainfrom
copilot/add-copilot-to-allowlist
Feb 12, 2026
Merged

Add copilot to bot-detection allowlist#15046
pelikhan merged 3 commits intomainfrom
copilot/add-copilot-to-allowlist

Conversation

Copy link
Contributor

Copilot AI commented Feb 12, 2026

The bot-detection workflow flagged @Copilot (GitHub's Copilot App) as suspicious due to an allowlist mismatch:

  • Line 197 (implementation): [dependabot, renovate, github-actions]
  • Line 328 (documentation): Listed copilot as known legitimate bot

Changes

  • Added copilot to bot allowlist on line 197 to match documented policy
- User type is "Bot" AND not in allowlist: [dependabot, renovate, github-actions]
+ User type is "Bot" AND not in allowlist: [dependabot, renovate, github-actions, copilot]

This eliminates false positive security alerts when Copilot App authors or merges PRs.

Original prompt

This section details on the original issue you should resolve

<issue_title>[q] Add copilot to bot-detection allowlist</issue_title>
<issue_description># Q Workflow Optimization Report

Issues Found (from issue github/gh-aw#15033)

bot-detection.md

  • Issue Context: Issue github/gh-aw#15033 reports that @Copilot was flagged as suspicious (Medium Risk, score 3/12)
  • Root Cause: The bot-detection workflow has an inconsistency between the allowlist definition and documentation
  • Specific Problem:
    • Line 197 allowlist: [dependabot, renovate, github-actions] - missing copilot
    • Line 328 documentation: Lists "copilot" as a known legitimate bot
    • Result: Copilot App triggers Red Flag Add workflow: githubnext/agentics/weekly-research #8 (Identity Headers) incorrectly

Changes Made

.github/workflows/bot-detection.md (Line 197)

  • Before: - User type is "Bot" AND not in allowlist: [dependabot, renovate, github-actions]
  • After: - User type is "Bot" AND not in allowlist: [dependabot, renovate, github-actions, copilot]
  • Reason: Added copilot to match the documentation on line 328 and prevent false positives

Expected Improvements

  • ✅ Eliminates false positive detections of @Copilot GitHub App
  • ✅ Aligns allowlist implementation with documented policy
  • ✅ Prevents unnecessary security alerts for legitimate automation

Context

This fix addresses issue github/gh-aw#15033 where the bot-detection workflow incorrectly flagged @Copilot as suspicious when it authored/merged PR #15026. The Copilot GitHub App is a legitimate automation tool and should be treated the same as other known bots (dependabot, renovate, github-actions).

Validation

  • ✅ Single-line surgical change to allowlist
  • ✅ No lock file changes (will be compiled automatically)
  • ✅ Matches existing documentation on line 328

Fixes github/gh-aw#15033

AI generated by Q

  • expires on Feb 14, 2026, 12:14 AM UTC

[!NOTE]
This was originally intended as a pull request, but the git push operation failed.

Workflow Run: View run details and download patch artifact

The patch file is available in the agent-artifacts artifact in the workflow run linked above.

To apply the patch locally:

# Download the artifact from the workflow run https://github.com/github/gh-aw/actions/runs/21928155640
# (Use GitHub MCP tools if gh CLI is not available)
gh run download 21928155640 -n agent-artifacts

# The patch file will be at agent-artifacts/tmp/gh-aw/aw.patch after download
# Apply the patch
git am agent-artifacts/tmp/gh-aw/aw.patch
Show patch (30 lines)
From b2e4b4327b046d34e3fd4b02b311883a7610cbad Mon Sep 17 00:00:00 2001
From: "github-actions[bot]" <github-actions[bot]@users.noreply.github.com>
Date: Thu, 12 Feb 2026 00:11:38 +0000
Subject: [PATCH] fix(bot-detection): Add copilot to bot allowlist

The copilot user is a legitimate GitHub App that should not be flagged
as suspicious. This change adds 'copilot' to the bot allowlist on line 197
to match the documentation on line 328 which already lists it as a known
legitimate bot.
---
 .github/workflows/bot-detection.md | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/.github/workflows/bot-detection.md b/.github/workflows/bot-detection.md
index bca5c0f..f483d86 100644
--- a/.github/workflows/bot-detection.md
+++ b/.github/workflows/bot-detection.md
@@ -194,7 +194,7 @@ Analyze the account for these 8 specific red flags:
 3. For bots: Verify if it's a legitimate, known bot (dependabot, renovate, github-actions)
 
 **Threshold**: Flag if:
-- User type is "Bot" AND not in allowlist: [dependabot, renovate, github-actions]
+- User type is "Bot" AND not in allowlist: [dependabot, renovate, github-actions, copilot]
 - OR username ends with `[bot]` but isn't a known legitimate bot
 
 ## Analysis Process
-- 
2.52.0

Comments on the Issue (you are @copilot in this section)


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI and others added 2 commits February 12, 2026 00:26
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
- Added "copilot" to bot allowlist on line 197
- Aligns with documentation on line 328
- Prevents false positive detections of @Copilot GitHub App

Fixes #15033

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title [WIP] Add Copilot to bot-detection allowlist Add copilot to bot-detection allowlist Feb 12, 2026
Copilot AI requested a review from pelikhan February 12, 2026 00:29
@pelikhan pelikhan marked this pull request as ready for review February 12, 2026 00:29
Copilot AI review requested due to automatic review settings February 12, 2026 00:29
@pelikhan pelikhan merged commit 7842269 into main Feb 12, 2026
3 checks passed
@pelikhan pelikhan deleted the copilot/add-copilot-to-allowlist branch February 12, 2026 00:29
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the bot-detection workflow documentation to reduce false positives by aligning the bot allowlist with the documented “known legitimate bots” policy, and includes some lockfile regeneration updates related to rate-limit defaults.

Changes:

  • Add copilot to the bot allowlist in .github/workflows/bot-detection.md.
  • Update several generated *.lock.yml workflows to explicitly set GH_AW_RATE_LIMIT_IGNORED_ROLES (default roles) in the pre-activation rate-limit step.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
.github/workflows/bot-detection.md Adds copilot to the allowlist used by the bot-detection guidance.
.github/workflows/workflow-generator.lock.yml Generated workflow update: explicitly sets GH_AW_RATE_LIMIT_IGNORED_ROLES in rate-limit env.
.github/workflows/example-custom-error-patterns.lock.yml Generated workflow update: explicitly sets GH_AW_RATE_LIMIT_IGNORED_ROLES in rate-limit env.
.github/workflows/auto-triage-issues.lock.yml Generated workflow update: explicitly sets GH_AW_RATE_LIMIT_IGNORED_ROLES in rate-limit env.
.github/workflows/ai-moderator.lock.yml Generated workflow update: explicitly sets GH_AW_RATE_LIMIT_IGNORED_ROLES in rate-limit env.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@@ -194,7 +194,7 @@ Analyze the account for these 8 specific red flags:
3. For bots: Verify if it's a legitimate, known bot (dependabot, renovate, github-actions)
Copy link

Copilot AI Feb 12, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The “known bot” examples list in the detection steps still omits copilot, but the allowlist/threshold now includes it. Please update the parenthetical list to include copilot so the guidance is internally consistent (and matches the “Known Legitimate Bots” section later in the doc).

Suggested change
3. For bots: Verify if it's a legitimate, known bot (dependabot, renovate, github-actions)
3. For bots: Verify if it's a legitimate, known bot (dependabot, renovate, github-actions, copilot)

Copilot uses AI. Check for mistakes.
Comment on lines 1140 to +1143
GH_AW_RATE_LIMIT_MAX: "5"
GH_AW_RATE_LIMIT_WINDOW: "60"
GH_AW_RATE_LIMIT_EVENTS: "issues"
GH_AW_RATE_LIMIT_IGNORED_ROLES: "admin,maintain,write"
Copy link

Copilot AI Feb 12, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR description says there are “No lock file changes”, but this PR updates multiple auto-generated *.lock.yml files (including this one) by adding GH_AW_RATE_LIMIT_IGNORED_ROLES. Please either (1) update the PR description/scope to reflect the lockfile regeneration, or (2) drop these generated changes if they were accidental to keep the PR focused on the bot allowlist update.

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[q] Add copilot to bot-detection allowlist

2 participants