Skip to content

Reduce workflow credential exposure#7270

Merged
moonbox3 merged 2 commits into
microsoft:mainfrom
moonbox3:moonbox3/mask-github-app-config
Jul 22, 2026
Merged

Reduce workflow credential exposure#7270
moonbox3 merged 2 commits into
microsoft:mainfrom
moonbox3:moonbox3/mask-github-app-config

Conversation

@moonbox3

@moonbox3 moonbox3 commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Motivation & Context

Workflow run logs currently expose configuration metadata that does not need to be public, and DevFlow depends on a separately managed user credential for Copilot requests. These values and credentials should be minimized while preserving the established authentication behavior and rollout controls.

Description & Review Guide

  • What are the major changes? Read non-mode authentication configuration from environment secrets in all six affected workflows. Grant only the two DevFlow execution jobs copilot-requests: write and use their run-scoped GitHub token for Copilot authentication.
  • What is the impact of these changes? GitHub masks the configuration inputs in workflow logs, and DevFlow no longer requires a separately rotated Copilot credential. The authentication rollout mode remains an environment variable.
  • What do you want reviewers to focus on? Confirm that every affected workflow consistently uses the masked configuration context and that the Copilot permission is limited to the jobs that make Copilot requests.

Related Issue

Fixes #7269

Contribution Checklist

  • The code builds clean without any errors or warnings
  • All unit tests pass, and I have added new tests where possible
  • The PR follows the Contribution Guidelines
  • This PR is linked to an issue and there is no other open PR for this issue (see Related Issue above).
  • This is not a breaking change. If it is a breaking change, add the breaking change label (or add "[BREAKING]" to the title prefix, before or after any language prefix) — a workflow keeps the label and title prefix in sync automatically.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: d9fa4e9c-c32d-42fb-8ee4-4772473e6479
Copilot AI review requested due to automatic review settings July 22, 2026 23:32
@moonbox3
moonbox3 temporarily deployed to github-app-auth July 22, 2026 23:32 — with GitHub Actions Inactive
@moonbox3
moonbox3 temporarily deployed to github-app-auth July 22, 2026 23:32 — with GitHub Actions Inactive
@moonbox3
moonbox3 temporarily deployed to github-app-auth July 22, 2026 23:32 — with GitHub Actions Inactive
@moonbox3 moonbox3 changed the title Mask workflow authentication configuration Update workflow authentication configuration Jul 22, 2026
@moonbox3
moonbox3 temporarily deployed to github-app-auth July 22, 2026 23:33 — with GitHub Actions Inactive
@moonbox3
moonbox3 temporarily deployed to github-app-auth July 22, 2026 23:34 — with GitHub Actions Inactive

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 GitHub automation workflows to reduce metadata exposure in run logs by sourcing non-mode GitHub App authentication configuration from masked secrets, while keeping the rollout/auth mode controlled via vars.GH_APP_AUTH_MODE as requested in #7269.

Changes:

  • Replaced vars.GH_APP_* (non-mode auth config) with secrets.GH_APP_* across the affected workflows.
  • Kept mode as vars.GH_APP_AUTH_MODE to preserve the existing rollout control mechanism.
  • Applied the same masking approach consistently to both call sites in workflows that request tokens multiple times.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.

Show a summary per file
File Description
.github/workflows/stale-issue-pr-ping.yml Switches GitHub App auth configuration inputs to secrets.* for masking in scheduled/manual stale ping automation.
.github/workflows/limit-community-prs.yml Updates both token acquisition steps to use secrets.*, keeping mode in vars.* while masking other auth config.
.github/workflows/label-pr.yml Uses secrets.* for GitHub App auth configuration in the PR labeling workflow (pull_request_target).
.github/workflows/label-issues.yml Uses secrets.* for GitHub App auth configuration in the issue labeling workflow.
.github/workflows/issue-triage.yml Uses secrets.* for GitHub App auth configuration in issue triage automation while keeping mode in vars.*.
.github/workflows/devflow-pr-review.yml Uses secrets.* for GitHub App auth configuration in the PR review workflow while preserving existing mode control.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: d9fa4e9c-c32d-42fb-8ee4-4772473e6479
@moonbox3
moonbox3 temporarily deployed to github-app-auth July 22, 2026 23:43 — with GitHub Actions Inactive
@moonbox3 moonbox3 changed the title Update workflow authentication configuration Reduce workflow credential exposure Jul 22, 2026
@moonbox3
moonbox3 temporarily deployed to github-app-auth July 22, 2026 23:43 — with GitHub Actions Inactive
@moonbox3
moonbox3 marked this pull request as ready for review July 22, 2026 23:49
@moonbox3
moonbox3 temporarily deployed to github-app-auth July 22, 2026 23:49 — with GitHub Actions Inactive
@moonbox3
moonbox3 merged commit 2d34dee into microsoft:main Jul 22, 2026
24 of 25 checks passed
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.

Reduce workflow credential exposure

3 participants