Enable WinGet installation method for Windows, replace Scoop references#473
Enable WinGet installation method for Windows, replace Scoop references#473
Conversation
- 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 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>
Refactored in 6738a43. Replaced the Setup required before first use:
|
danielmeppiel
left a comment
There was a problem hiding this comment.
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:
- Mutable
@v2tag — points to a commit that can be force-pushed at any time. The action code could change without notice. - Transitive supply chain — the action itself pulls
cargo-bins/cargo-binstall@main(pinned tomain!) to download thekomacRust binary at runtime. That's two layers of mutable, unaudited dependencies installing and running arbitrary binaries with your PAT. - Token exposure —
WINGET_TOKEN(classic PAT withpublic_reposcope) is passed asGITHUB_TOKENenv var tokomac. A compromised action or Komac binary has fullpublic_repoaccess. - 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 WindowsIf 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:
- As-is, the workflow will fail at runtime (Komac cannot create a fork under
microsoft) - You need a separate bot/service account that owns a fork of
winget-pkgs - The
fork-userinput 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_TOKENneedspublic_reposcope 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_PATsecret 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>
Addressed all findings in 526d9cf. Replaced
|
Description
WinGet package
Microsoft.APMis now live via winget-pkgs#351674. This PR updates all install docs and enables the CI auto-update job.scoop bucket add/scoop install) withwinget install Microsoft.APMacross README.md, installation guide, and quick-start guideupdate-scoopjob toupdate-winget— uses Microsoft's officialwingetcreatetool (MIT) on awindows-latestrunner to generate updated manifests and open PRs directly tomicrosoft/winget-pkgsSetup required before first use:
WINGET_TOKENrepository secret — classic PAT withpublic_reposcope (documented in workflow comments)Type of change
Testing
🔒 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.