Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
e5b3803
feat(agent,agent-installer): add transactional policy store
CBenoit Aug 29, 2026
721d7d5
fix(agent): stabilize policy validation on CI
CBenoit Aug 29, 2026
1a785d7
fix(agent): capture restricted E2E output
CBenoit Aug 29, 2026
63149e4
fix(agent): persist restricted E2E diagnostics
CBenoit Aug 29, 2026
2268fa0
fix(agent): assert effective write authorization
CBenoit Aug 29, 2026
1a02ce6
build(deps): refresh package policy contract
CBenoit Sep 3, 2026
a94670e
build(deps): update package policy contract
CBenoit Sep 3, 2026
a43707f
build(deps): update package policy contract
CBenoit Sep 3, 2026
d77de66
build(deps): update package policy contract
CBenoit Sep 3, 2026
ef978b8
fix(agent): use policy draft schema identity
CBenoit Sep 3, 2026
c526ff8
fix(dgw,agent,agent-installer): harden policy management
CBenoit Sep 3, 2026
d90a198
fix(agent-installer): marshal file disposition correctly
CBenoit Sep 3, 2026
a9f3a0b
fix(dgw,agent): embed event catalogs in production
CBenoit Sep 3, 2026
5fdb283
fix(agent-installer): skip unsafe policy migration
CBenoit Sep 3, 2026
6109172
fix(agent): reject ineffective policy matches
CBenoit Sep 3, 2026
82a2f96
fix(agent): clarify policy attempt auditing
CBenoit Sep 3, 2026
76d9fb7
fix(agent,agent-installer): bind security checks
CBenoit Sep 3, 2026
721eb2f
test(miri): skip native crypt handle tests
CBenoit Sep 3, 2026
ccd7aef
fix(agent,agent-installer): close policy security gaps
CBenoit Sep 3, 2026
13099eb
fix(agent): bound pipe identity capture
CBenoit Sep 3, 2026
4629e9f
build(deps): use published policy crates
CBenoit Sep 3, 2026
bdfe604
fix(agent): harden broker caller authentication
CBenoit Sep 4, 2026
d3e5f6d
fix(agent-installer): pin migration commit marker
CBenoit Sep 4, 2026
70142ce
test(agent): accept DACL herpaderping rejection
CBenoit Sep 4, 2026
f93e539
fix(agent): make policy replacement conditional
CBenoit Sep 4, 2026
cd77124
test(agent): align stacked policy routes
CBenoit Sep 4, 2026
04d6e47
chore: reconcile stacked lint expectations
CBenoit Sep 4, 2026
e2da9e1
fix(agent): reject junctions before directory creation
CBenoit Sep 4, 2026
5cef56d
fix(agent): secure policy directory transitions
CBenoit Sep 4, 2026
642f90f
fix(agent): secure policy filesystem transitions
CBenoit Sep 4, 2026
085bd09
fix(agent,agent-installer): bind process identity safely
CBenoit Sep 4, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 47 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -699,7 +699,11 @@ jobs:
if: ${{ matrix.os == 'windows' }}
run: |
Enter-VsDevShell
$path = (Get-Command -Type Application mc).Source | Split-Path -Parent
$mc = Get-Command -Name mc.exe -CommandType Application -All | Select-Object -First 1
if ($null -eq $mc -or -not (Test-Path -LiteralPath $mc.Source -PathType Leaf)) {
throw "mc.exe was not found in the Visual Studio developer environment"
}
$path = Split-Path -Parent $mc.Source
Write-Output "windows_sdk_ver_bin_path=$path" | Out-File -FilePath $env:GITHUB_OUTPUT -Append -Encoding utf8
shell: pwsh

Expand Down Expand Up @@ -953,6 +957,9 @@ jobs:
# NASM is required by aws-lc-rs (used as rustls crypto backend)
choco install nasm

# Install Visual Studio Developer PowerShell Module for cmdlets such as Enter-VsDevShell
Install-Module VsDevShell -Force

# We need to add the NASM binary folder to the PATH manually.
Write-Output "$Env:ProgramFiles\NASM" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append

Expand All @@ -966,6 +973,19 @@ jobs:
if: ${{ matrix.os == 'windows' }}
uses: microsoft/setup-msbuild@v3

- name: Find mc.exe
id: find_mc
if: ${{ matrix.os == 'windows' }}
run: |
Enter-VsDevShell
$mc = Get-Command -Name mc.exe -CommandType Application -All | Select-Object -First 1
if ($null -eq $mc -or -not (Test-Path -LiteralPath $mc.Source -PathType Leaf)) {
throw "mc.exe was not found in the Visual Studio developer environment"
}
$path = Split-Path -Parent $mc.Source
Write-Output "windows_sdk_ver_bin_path=$path" | Out-File -FilePath $env:GITHUB_OUTPUT -Append -Encoding utf8
shell: pwsh

- name: Build
run: |
if ($Env:RUNNER_OS -eq "Windows") {
Expand All @@ -976,6 +996,7 @@ jobs:
$Env:DAGENT_TUN2SOCKS_EXE = "${{ steps.tun2socks.outputs.tun2socks-executable-path }}"
$Env:DAGENT_WINTUN_DLL = "${{ steps.tun2socks.outputs.wintun-library-path }}"
$Env:DAGENT_MULTI_PWSH_EXECUTABLE = "${{ steps.multi-pwsh.outputs.executable-path }}"
$Env:WindowsSdkVerBinPath = '${{ steps.find_mc.outputs.windows_sdk_ver_bin_path }}'
}

if ($Env:RUNNER_OS -eq "Linux") {
Expand Down Expand Up @@ -1313,7 +1334,22 @@ jobs:
exit $LASTEXITCODE
}

- name: Run Agent policy tester as LocalSystem
- name: Run Agent policy tester (unelevated)
shell: pwsh
run: |
$scriptPath = Resolve-Path -Path "./crates/agent-policy-tester/run-unelevated.ps1"
$tempPath = Join-Path $env:USERPROFILE "AppData\LocalLow\Temp"
$outputPath = Join-Path $tempPath "agent-policy-tester-unelevated.out"
New-Item -ItemType Directory -Path $tempPath -Force | Out-Null
Remove-Item -LiteralPath $outputPath -Force -ErrorAction SilentlyContinue
psexec -accepteula -l pwsh.exe -NoProfile -File $scriptPath -TempPath $tempPath -OutputPath $outputPath
$exitCode = $LASTEXITCODE
Get-Content -LiteralPath $outputPath
if ($exitCode -ne 0) {
exit $exitCode
}

- name: Run Agent policy tester as LocalSystem (elevated)
shell: pwsh
run: |
$scriptPath = Resolve-Path -Path "./crates/agent-policy-tester/run-as-system.ps1"
Expand All @@ -1324,6 +1360,15 @@ jobs:
exit $exitCode
}

# The dev-signature-bypass-only unit tests (elevation/Administrators gating at the
# HTTP route layer; see `now-package-broker::server::tests::elevation_gating`) only
# compile and run under this feature, so they are exercised here alongside the
# other `dev-skip-broker-signature`-dependent steps in this job rather than in the
# default `cargo test --workspace` run.
- name: Run now-package-broker dev-skip-broker-signature tests
shell: pwsh
run: cargo test --locked -p now-package-broker --features dev-skip-broker-signature

- name: Show sccache stats
if: ${{ needs.preflight.outputs.sccache == 'true' && !cancelled() }}
shell: pwsh
Expand Down
10 changes: 8 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions crates/agent-policy-tester/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,12 @@ anyhow = "1"

[target.'cfg(windows)'.dependencies]
fastrand = "2"
now-policy-server-template = "0.4"
serde_json = "1"
tempfile = "3"
tokio = { version = "1", features = ["io-util", "macros", "net", "process", "rt-multi-thread", "time"] }
win-api-wrappers = { path = "../win-api-wrappers" }
windows = { version = "0.61", features = ["Win32_Security"] }

[lints]
workspace = true
2 changes: 1 addition & 1 deletion crates/agent-policy-tester/run-as-system.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ $agentPath = Join-Path $workspacePath "target/debug/devolutions-agent.exe"
$outputPath = Join-Path $PSScriptRoot "agent-policy-tester.out"

try {
& $testerPath $agentPath 2>&1 | Out-File $outputPath
& $testerPath $agentPath elevated 2>&1 | Out-File $outputPath
$exitCode = $LASTEXITCODE
} catch {
$_ | Out-File $outputPath -Append
Expand Down
26 changes: 26 additions & 0 deletions crates/agent-policy-tester/run-unelevated.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
param(
[Parameter(Mandatory = $true)]
[string] $TempPath,

[Parameter(Mandatory = $true)]
[string] $OutputPath
)

$ErrorActionPreference = "Stop"

$workspacePath = (Resolve-Path (Join-Path $PSScriptRoot "../..")).Path
$testerPath = Join-Path $workspacePath "target/debug/agent-policy-tester.exe"
$agentPath = Join-Path $workspacePath "target/debug/devolutions-agent.exe"

try {
$env:TEMP = $TempPath
$env:TMP = $TempPath

& $testerPath $agentPath unelevated 2>&1 | Out-File -LiteralPath $OutputPath
$exitCode = $LASTEXITCODE
} catch {
$_ | Out-File -LiteralPath $OutputPath -Append
exit 1
}

exit $exitCode
Loading
Loading