Skip to content

Fix agentic issue triage auth token to allow threat_detection - #55352

Merged
nagilson merged 1 commit into
dotnet:mainfrom
nagilson:fix-issue-triage-detection-pat
Jul 17, 2026
Merged

nagilson merged 1 commit into
dotnet:mainfrom
nagilson:fix-issue-triage-detection-pat

Conversation

@nagilson

@nagilson nagilson commented Jul 17, 2026 •

Copy link
Copy Markdown
Member

The pat_pool env also needs to be added to the threat_detection safe_outputs on agentic workflows.

I'm seeing threat detection fail which causes this scary looking comment on aw outputs:
image
#55350
Set COPILOT_GITHUB_TOKEN or COPILOT_PROVIDER_API_KEY to enable this provider.

It seems like this was an issue on the sdk tactics workflow as well as its also hitting 503.

This was fixed in recent builds:
github/gh-aw#43917
github/gh-aw#43918

They are addressed in newer versions but the new versions have another bug.
github/gh-aw#45915

I've applied a patch to fix that bug as well, based upon github/gh-aw#45915 (comment).

Summary

  • Bump the aw version to fix a bug so that the env applies to needs, and thus threat_detection
  • Add a proxy patch to the GH CLI invocations so that the bug in the new aw version does not surface

@nagilson
nagilson requested a review from Copilot July 17, 2026 22:10
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 2 pipeline(s).
1 pipeline(s) were filtered out due to trigger conditions.
There may be pipelines that require an authorized user to comment /azp run to run.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 agentic Issue Triage workflow configuration to provide a Copilot auth token to the threat_detection phase, addressing failures where threat detection can’t authenticate to the Copilot provider.

Changes:

  • Adds a safe-outputs.threat-detection.engine.env mapping to pass COPILOT_GITHUB_TOKEN to the threat detection engine.
  • Updates the generated workflow lock file to reflect the new safe-outputs configuration and detection metadata.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
.github/workflows/issue-triage.md Adds threat-detection safe-outputs env configuration for Copilot authentication.
.github/workflows/issue-triage.lock.yml Regenerated gh-aw compiled workflow reflecting the new threat detection safe-outputs/env wiring.

Comment thread .github/workflows/issue-triage.md Resolved
…ound

Bump gh-aw to v0.82.9 and recompile issue-triage and add-tactics-template-on-comment. The detection job now gains pat_pool in its needs (github/gh-aw#43917 fix in dotnet#44202), so threat detection authenticates with the pooled Copilot PAT instead of resolving to an empty token. Also route GitHub tools and Safe Outputs through the CLI proxy (tools.cli-proxy + github.mode: gh-proxy) to avoid the awmg-mcpg native HTTP MCP firewall denial (github/gh-aw#45915).
@nagilson
nagilson force-pushed the fix-issue-triage-detection-pat branch from 3de104a to b5affd9 Compare July 17, 2026 22:37
@nagilson
nagilson marked this pull request as ready for review July 17, 2026 22:47
@nagilson
nagilson requested a review from jeffhandley July 17, 2026 22:48
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 2 pipeline(s).
1 pipeline(s) were filtered out due to trigger conditions.
There may be pipelines that require an authorized user to comment /azp run to run.

@jeffhandley jeffhandley left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks great! I noticed safe_outputs does not gain needs: pat_pool, but I confirmed it doesn't actually need it because it doesn't invoke an agent itself.

This branch had an error being deployed

1 failed deployment
copilot-pat-pool — b5affd91 Deployed Jul 17, 2026 by nagilson via pre_activation #2
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.

3 participants