Skip to content

Support remote YAML and ZIP and local ZIP manifests with administrator opt-in - #6651

Open
Daniel (dB.) Doubrovkine (dblock) wants to merge 1 commit into
microsoft:masterfrom
dblock:dblock/github-source-url
Open

Daniel (dB.) Doubrovkine (dblock) wants to merge 1 commit into
microsoft:masterfrom
dblock:dblock/github-source-url

Conversation

@dblock

@dblock Daniel (dB.) Doubrovkine (dblock) commented Nov 4, 2026 •

Copy link
Copy Markdown

📖 Description

Adds HTTPS .yaml, .yml, and .zip URL support, plus local ZIP support, to --manifest.

❓ Motivation

Package authors can publish a manifest alongside an installer and provide a one-line installation command without submitting to the community package repository or requiring users to download manifests manually.

🖥️ Usage

Enable the administrator setting from an elevated terminal:

winget settings --enable RemoteManifestFiles

Then use either format:

winget install --manifest https://example.com/package.yaml
winget install --manifest https://example.com/manifests.zip
winget install --manifest .\manifests.zip

Demo

Using the locally built CLI with the published ExCalc preview manifests:

Start-Process -FilePath (Resolve-Path 'src\x64\Debug\AppInstallerCLI\winget.exe').Path -Verb RunAs -ArgumentList 'settings --enable RemoteManifestFiles' -Wait
src\x64\Debug\AppInstallerCLI\winget.exe install --manifest https://github.com/dblock/excalc-rs/releases/download/latest-preview/Vestris.Excalc.preview.yaml

Observed output (through installer launch):

  ██████████████████████████████  1.76 KB / 1.76 KB
Found excalc [Vestris.Excalc] Version 26.11.5492
This application is licensed to you by its owner.
Microsoft is not responsible for, nor does it grant any licenses to, third-party packages.
Downloading https://github.com/dblock/excalc-rs/releases/download/latest-preview/excalc-26.11.5492-x86_64.msi
  ██████████████████████████████  2.57 MB / 2.57 MB
Successfully verified installer hash
Starting package install...

The ZIP form was also tested:

src\x64\Debug\AppInstallerCLI\winget.exe install --manifest https://github.com/dblock/excalc-rs/releases/download/latest-preview/Vestris.Excalc.preview.manifests.zip

Observed output (through installer launch):

  ██████████████████████████████  1.74 KB / 1.74 KB
Found excalc [Vestris.Excalc] Version 26.11.5492
This application is licensed to you by its owner.
Microsoft is not responsible for, nor does it grant any licenses to, third-party packages.
Successfully verified installer hash
Starting package install...

Both YAML and ZIP demos reached installer launch. Installation completion has not yet been confirmed.

ℹ️ Details

Remote manifests are disabled by default behind the new RemoteManifestFiles administrator setting. Remote URLs require only RemoteManifestFiles; local paths still require LocalManifestFiles. The existing local-manifest group policy applies to both. The remote setting is checked before any download.

YAML URLs must contain a complete singleton manifest. ZIPs can contain exactly one singleton manifest or one package version's multi-file manifests, optionally nested inside directories. Multiple packages or versions are rejected rather than inferred from the archive filename. URLs must use HTTPS and end in .yaml, .yml, or .zip; credentials, query strings, fragments, and nonstandard ports are unsupported.

Local and remote manifest providers implement a common interface exposing their required administrator setting and manifest loading. Command validation and loading share the same provider factory; the remote provider owns downloading and download cleanup. Both providers use shared archive loading with scanning, extraction, single-manifest selection, and cleanup; original local archives are preserved. Providers live in separate header/source pairs under ManifestProviders, with matching provider and factory test files; workflow integration tests cover locale application for both providers. The existing downloader, ZIP scan/extraction, manifest parser, installer selection, and hash verification are reused. Temporary downloads and extracted files are cleaned up after parsing or failure. No source or publisher consent is persisted, and --source behavior is unchanged.

🔗 References

Related feature request: #6266 (user feedback: #6266 (comment))

🔍 Validation

  • Current head f207def6 built the Debug x64 CLI and tests. All 32 focused Catch2 cases passed (534 assertions), covering remote YAML/ZIP loading, invalid URLs and archives, multiple-manifest rejection, opt-in gating, local paths, cleanup, administrator settings, and group policy.
  • Refreshed the executable runtime DLL and resources. The CLI refused a remote install URL with instructions to enable RemoteManifestFiles rather than LocalManifestFiles. Earlier validation successfully inspected a real combined ExCalc singleton via a local path. Tests cover all combinations of local and remote administrator settings and verify group-policy denial for both manifest types.
  • Rebuilt the provider refactor and verified live YAML and ZIP URLs with show --manifest, plus the missing-local-path error. Relative and absolute local ZIP paths were also verified, including uppercase ZIP extensions and rejection of malformed or ambiguous archives. No installer was launched by these checks.
  • Archive contents are committed as reviewable YAML directory trees under TestData/ManifestArchives. MSBuild ZipDirectory packages them during the build; no ZIP binaries or generator script are committed.
  • Automated validation did not install software or change machine-wide settings. The manual demo above enabled RemoteManifestFiles and reached installer launch; installation completion is not yet confirmed.

✅ Checklist

🤖 AI Assistance

  • AI assistance was used and has been disclosed in this PR
  • No AI assistance was used

📋 Issue Type

  • Bug fix
  • Feature
  • Task
Microsoft Reviewers: Open in CodeFlow

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
There may be pipelines that require an authorized user to comment /azp run to run.

@github-actions

This comment has been minimized.

@dblock Daniel (dB.) Doubrovkine (dblock) changed the title Add invocation-only GitHub manifest sources Add invocation-only GitHub and downloadable manifest sources Nov 4, 2026
@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@dblock
Daniel (dB.) Doubrovkine (dblock) force-pushed the dblock/github-source-url branch 2 times, most recently from 02ca726 to 25c23d9 Compare November 4, 2026 18:45
@dblock Daniel (dB.) Doubrovkine (dblock) changed the title Add invocation-only GitHub and downloadable manifest sources Add invocation-only URL manifest sources Nov 4, 2026
@dblock Daniel (dB.) Doubrovkine (dblock) changed the title Add invocation-only URL manifest sources Support remote YAML and ZIP manifests with administrator opt-in Nov 4, 2026
@dblock
Daniel (dB.) Doubrovkine (dblock) force-pushed the dblock/github-source-url branch 6 times, most recently from 77af14b to d193c53 Compare November 4, 2026 20:02
@dblock Daniel (dB.) Doubrovkine (dblock) changed the title Support remote YAML and ZIP manifests with administrator opt-in Support remote YAML and ZIP and local ZIP manifests with administrator opt-in Nov 4, 2026
Extend --manifest to load HTTPS singleton YAML files and ZIP archives containing one package version. Require the RemoteManifestFiles administrator setting before downloading, preserve local-manifest gates, and clean up temporary files. Generate archive fixtures from existing YAML during the test build.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 92a6065f-7ee8-4254-bcb7-2c5c2ae0a14b
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.

1 participant