Skip to content

Commit a38f8df

Browse files
committed
Merge origin/main into feature/operation-progress-v2
2 parents ac9284f + 1f832f0 commit a38f8df

162 files changed

Lines changed: 36937 additions & 414 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.github/workflows/build-release.yml‎

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -219,6 +219,13 @@ jobs:
219219
throw "Windows app host was not produced at unigetui_bin/UniGetUI.exe"
220220
}
221221
222+
# The elevated policy-write helper is authenticated by exact path at runtime, and it must
223+
# be present here so the code-signing step below signs it and the integrity tree that is
224+
# generated afterwards covers it.
225+
if (-not (Test-Path "unigetui_bin/Assets/Utilities/UniGetUI.PolicyElevator.exe")) {
226+
throw "Elevated policy helper was not staged at unigetui_bin/Assets/Utilities/UniGetUI.PolicyElevator.exe"
227+
}
228+
222229
$MaxShippedPdbSizeBytes = 1MB
223230
$PdbsToRemove = Get-ChildItem "unigetui_bin" -Filter "*.pdb" -File -Recurse | Where-Object {
224231
$_.Length -gt $MaxShippedPdbSizeBytes
@@ -250,6 +257,14 @@ jobs:
250257
-CertificateName '${{ secrets.CODE_SIGNING_CERTIFICATE_NAME }}' `
251258
-TimestampServer '${{ vars.CODE_SIGNING_TIMESTAMP_SERVER }}'
252259
260+
# The helper is the one binary whose signature is checked at runtime by the host before
261+
# it is elevated, so an unsigned helper must fail the release rather than ship.
262+
$HelperPath = Join-Path $PWD "unigetui_bin/Assets/Utilities/UniGetUI.PolicyElevator.exe"
263+
$HelperSignature = Get-AuthenticodeSignature $HelperPath
264+
if ($HelperSignature.Status -ne "Valid") {
265+
throw "Elevated policy helper is not validly signed (status: $($HelperSignature.Status))."
266+
}
267+
253268
- name: Build installer
254269
shell: pwsh
255270
run: |

‎.github/workflows/codeql.yml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ jobs:
5757

5858
# Initializes the CodeQL tools for scanning.
5959
- name: Initialize CodeQL
60-
uses: github/codeql-action/init@v4.37.9
60+
uses: github/codeql-action/init@v4.38.0
6161
with:
6262
languages: ${{ matrix.language }}
6363
build-mode: ${{ matrix.build-mode }}
@@ -85,6 +85,6 @@ jobs:
8585
exit 1
8686
8787
- name: Perform CodeQL Analysis
88-
uses: github/codeql-action/analyze@v4.37.9
88+
uses: github/codeql-action/analyze@v4.38.0
8989
with:
9090
category: "/language:${{matrix.language}}"

‎UniGetUI.iss‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,8 @@ begin
130130
// Elevator (gsudo cache) and pinget live in {app} and lock their own files.
131131
TaskKillWait('UniGetUI Elevator.exe');
132132
TaskKillWait('pinget.exe');
133+
// The elevated policy helper is short-lived, but it lives in {app} and can hold a file lock.
134+
TaskKillWait('UniGetUI.PolicyElevator.exe');
133135
Sleep(1000); // let the OS release file handles before copying
134136
135137
end;
@@ -346,3 +348,9 @@ Filename: "{app}\{#MyAppExeName}"; Parameters: "--migrate-wingetui-to-unigetui";
346348
Filename: {sys}\taskkill.exe; Parameters: "/f /im WingetUI.exe"; Flags: skipifdoesntexist runhidden; RunOnceId: "KillWingetUI"
347349
Filename: {sys}\taskkill.exe; Parameters: "/f /im UniGetUI.exe"; Flags: skipifdoesntexist runhidden; RunOnceId: "KillUniGetUI"
348350
Filename: {sys}\taskkill.exe; Parameters: "/f /im UniGetUI.Avalonia.exe"; Flags: skipifdoesntexist runhidden; RunOnceId: "KillUniGetUIAvalonia"
351+
Filename: {sys}\taskkill.exe; Parameters: "/f /im UniGetUI.PolicyElevator.exe"; Flags: skipifdoesntexist runhidden; RunOnceId: "KillUniGetUIPolicyElevator"
352+
353+
[UninstallDelete]
354+
; The elevated policy helper is authenticated by exact path, so a leftover copy must never
355+
; survive an uninstall.
356+
Type: files; Name: "{app}\Assets\Utilities\UniGetUI.PolicyElevator.exe"

‎scripts/build.ps1‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,13 @@ if (-not (Test-Path $WindowsAppHostPath)) {
9696
throw "Windows app host was not produced at $WindowsAppHostPath"
9797
}
9898

99+
# The elevated policy-write helper is authenticated by exact path at runtime, so a missing or
100+
# misplaced helper must fail the build rather than silently ship an install that cannot elevate.
101+
$PolicyElevatorPath = Join-Path $BinDir "Assets\Utilities\UniGetUI.PolicyElevator.exe"
102+
if (-not (Test-Path $PolicyElevatorPath)) {
103+
throw "Elevated policy helper was not staged at $PolicyElevatorPath"
104+
}
105+
99106
# Keep smaller symbols for useful local crash source information, and prune oversized ones.
100107
$MaxShippedPdbSizeBytes = 1MB
101108

‎src/Languages/lang_en.json‎

Lines changed: 598 additions & 1 deletion
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)