Skip to content

Enable WinGet installation method for Windows, replace Scoop references#473

Draft
Copilot wants to merge 5 commits intomainfrom
copilot/enable-winget-manifest-auto-update
Draft

Enable WinGet installation method for Windows, replace Scoop references#473
Copilot wants to merge 5 commits intomainfrom
copilot/enable-winget-manifest-auto-update

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 27, 2026

Description

WinGet package Microsoft.APM is now live via winget-pkgs#351674. This PR updates all install docs and enables the CI auto-update job.

  • Docs & README: Replace Scoop (scoop bucket add / scoop install) with winget install Microsoft.APM across README.md, installation guide, and quick-start guide
  • CI workflow: Convert disabled update-scoop job to update-winget — uses Microsoft's official wingetcreate tool (MIT) on a windows-latest runner to generate updated manifests and open PRs directly to microsoft/winget-pkgs
  • CHANGELOG: Add entry under Unreleased
winget install Microsoft.APM

Setup required before first use:

  • WINGET_TOKEN repository secret — classic PAT with public_repo scope (documented in workflow comments)

Type of change

  • Bug fix
  • New feature
  • Documentation
  • Maintenance / refactor

Testing

  • Tested locally
  • All existing tests pass
  • Added tests for new functionality (if applicable)

🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.

- README.md: replace Scoop with winget install Microsoft.APM
- docs/getting-started/installation.md: replace Scoop with WinGet
- docs/getting-started/quick-start.md: update Scoop -> WinGet reference
- build-release.yml: convert update-scoop to update-winget job,
  remove false && guard, target microsoft/winget-apm
- CHANGELOG.md: add entry for WinGet support

Agent-Logs-Url: https://github.com/microsoft/apm/sessions/1e22f536-960f-43c1-8553-6094a4dcf11f

Co-authored-by: danielmeppiel <51440732+danielmeppiel@users.noreply.github.com>
Copilot AI changed the title [WIP] Enable WinGet manifest auto-update for release workflow Enable WinGet installation method for Windows, replace Scoop references Mar 27, 2026
Copilot AI requested a review from danielmeppiel March 27, 2026 05:35
@danielmeppiel
Copy link
Copy Markdown
Collaborator

@copilot we have no such repo winget-apm. It's microsoft/winget-pkgs. If we want to auto-update the version there, we need to open a PR on it automatically and update the manifest there, example PR for another pkg is: microsoft/winget-pkgs#352862 . Assess how to do this properly and refactor accordingly.

Replace custom repository-dispatch to nonexistent microsoft/winget-apm
with the community-standard winget-releaser action that opens PRs
directly to microsoft/winget-pkgs using Komac.

Requires:
- WINGET_TOKEN secret (classic PAT with public_repo scope)
- Fork of microsoft/winget-pkgs under the repo owner account

Agent-Logs-Url: https://github.com/microsoft/apm/sessions/5bda2f76-d19a-491c-8a2d-2b4ce24960b8

Co-authored-by: danielmeppiel <51440732+danielmeppiel@users.noreply.github.com>
Copy link
Copy Markdown
Contributor Author

Copilot AI commented Mar 27, 2026

@copilot we have no such repo winget-apm. It's microsoft/winget-pkgs. If we want to auto-update the version there, we need to open a PR on it automatically and update the manifest ther...

Refactored in 6738a43. Replaced the repository-dispatch to the nonexistent microsoft/winget-apm with the community-standard vedantmgoyal9/winget-releaser@v2 action, which uses Komac to generate updated manifests and opens PRs directly to microsoft/winget-pkgs.

Setup required before first use:

  1. WINGET_TOKEN secret -- classic PAT with public_repo scope
  2. Fork of microsoft/winget-pkgs under the repo owner account (or set fork-user to a bot account that has the fork)

Copy link
Copy Markdown
Collaborator

@danielmeppiel danielmeppiel left a comment

Choose a reason for hiding this comment

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

Review — Supply Chain & Operational Concerns

The docs changes (Scoop → WinGet) are great. But the CI workflow has significant trust and operational gaps that need addressing before merge.


🔴 Critical: Supply chain trust of vedantmgoyal9/winget-releaser@v2

This is a single individual's community action (284 stars, AGPL-3.0) being used in a Microsoft org repo to push PRs to another Microsoft repo (microsoft/winget-pkgs). Three compounding risks:

  1. Mutable @v2 tag — points to a commit that can be force-pushed at any time. The action code could change without notice.
  2. Transitive supply chain — the action itself pulls cargo-bins/cargo-binstall@main (pinned to main!) to download the komac Rust binary at runtime. That's two layers of mutable, unaudited dependencies installing and running arbitrary binaries with your PAT.
  3. Token exposureWINGET_TOKEN (classic PAT with public_repo scope) is passed as GITHUB_TOKEN env var to komac. A compromised action or Komac binary has full public_repo access.
  4. Zero Microsoft org adoption — no other microsoft/* repo uses this action in their workflows.

Recommendation: Use Microsoft's own wingetcreate tool (microsoft/winget-create, MIT, 618 stars). It's the official Windows Package Manager Manifest Creator. Example:

steps:
  - name: Update WinGet manifest
    run: |
      iwr https://aka.ms/wingetcreate/latest -OutFile wingetcreate.exe
      .\wingetcreate.exe update Microsoft.APM `
        --version ${{ github.ref_name }} `
        --urls "https://github.com/${{ github.repository }}/releases/download/${{ github.ref_name }}/apm-windows-x86_64.zip" `
        --submit --token ${{ secrets.WINGET_TOKEN }}
    shell: pwsh
runs-on: windows-latest  # wingetcreate requires Windows

If wingetcreate is not viable (e.g., you need Linux runners), at minimum pin winget-releaser to a full SHA rather than @v2:

uses: vedantmgoyal9/winget-releaser@4ffc7888bffd451b357355dc214d43bb9f23917e  # v2

🔴 Critical: Fork ownership problem

The action defaults fork-user to ${{ github.repository_owner }}, which is microsoft. But microsoft/winget-pkgs already exists — you cannot fork a repo into the same org that owns it. This means:

  1. As-is, the workflow will fail at runtime (Komac cannot create a fork under microsoft)
  2. You need a separate bot/service account that owns a fork of winget-pkgs
  3. The fork-user input must be explicitly set to that account

This is not called out in the workflow and would be a silent runtime failure on first release.


🟡 Medium: Token scope & naming

  • WINGET_TOKEN needs public_repo scope on a classic PAT. Fine-grained tokens won't work for cross-repo fork PRs. This should be documented in a comment in the workflow.
  • The old GH_PKG_PAT secret is removed — confirm it's no longer needed by any other workflow before cleanup.

🟢 Docs changes look good

The Scoop → WinGet swap across README, installation guide, quick-start, and CHANGELOG is clean and correct.


Summary

Finding Severity Action
Untrusted community action with mutable tags + transitive deps Critical Use wingetcreate or pin to SHA
Fork-user defaults to microsoft — will fail at runtime Critical Configure bot account fork + set fork-user
Token scope/docs Medium Add workflow comment documenting requirements
Docs changes Good to go

Address supply chain trust concerns by replacing the third-party
community action with Microsoft's official wingetcreate tool:
- Use windows-latest runner (wingetcreate requires Windows)
- Download wingetcreate.exe from official aka.ms/wingetcreate/latest
- Run wingetcreate update --submit to open PRs to microsoft/winget-pkgs
- Strip v prefix from tag for WinGet version format
- Document WINGET_TOKEN requirements in workflow comments
- Eliminates fork ownership issues (wingetcreate handles internally)

Agent-Logs-Url: https://github.com/microsoft/apm/sessions/26010ddd-2ae4-47e5-af28-2c05fafe62ec

Co-authored-by: danielmeppiel <51440732+danielmeppiel@users.noreply.github.com>
Copy link
Copy Markdown
Contributor Author

Copilot AI commented Mar 27, 2026

Review — Supply Chain & Operational Concerns

The docs changes (Scoop → WinGet) are great. But the CI workflow has significant trust and operational gaps that need addressing before merge....

Addressed all findings in 526d9cf. Replaced vedantmgoyal9/winget-releaser@v2 with Microsoft's official wingetcreate tool (microsoft/winget-create, MIT):

  • Supply chain: No third-party actions. Downloads wingetcreate.exe directly from aka.ms/wingetcreate/latest (Microsoft's official redirect).
  • Fork ownership: Not an issue — wingetcreate update --submit handles fork creation and PR submission internally. No fork-user configuration needed.
  • Token docs: Added workflow comments documenting WINGET_TOKEN requirements (classic PAT, public_repo scope).
  • Runner: Changed to windows-latest (wingetcreate requires Windows).
  • GH_PKG_PAT: Still used by the update-homebrew job — no cleanup needed.

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.

[TASK] Enable WinGet manifest auto-update on release

2 participants