Skip to content

Add portable Authenticode PowerShell cmdlets#8

Merged
Marc-André Moreau (mamoreau-devolutions) merged 10 commits into
masterfrom
mamoreau-devolutions/portable-authenticode-cmdlets
May 22, 2026
Merged

Add portable Authenticode PowerShell cmdlets#8
Marc-André Moreau (mamoreau-devolutions) merged 10 commits into
masterfrom
mamoreau-devolutions/portable-authenticode-cmdlets

Conversation

@mamoreau-devolutions
Copy link
Copy Markdown
Contributor

Summary

  • Adds a portable PowerShell 7.4 / .NET 8 module (Devolutions.Psign) with Get-PortableSignature and Set-PortableSignature backed by the Rust psign_portable shared library through P/Invoke.
  • Introduces reusable portable core/FFI crates for signing and inspection across PE, CAB, MSI, ZIP Authenticode, PowerShell scripts/modules, and MSIX/AppX.
  • Adds migration-focused cmdlet coverage: content mode, IncludeChain, RFC3161 timestamping, explicit anchor trust policy, portable cert-store thumbprint selection, Force/WhatIf behavior, and rich PortableSignature metadata.
  • Adds PowerShell module build/package scripts, CI workflow, docs, and exhaustive module E2E tests.

Validation

  • cargo fmt --all --check
  • cargo clippy --workspace --all-targets --locked -- -D warnings
  • cargo test --workspace --locked
  • dotnet build .\dotnet\Devolutions.Psign.PowerShell\Devolutions.Psign.PowerShell.csproj -c Release
  • pwsh -NoLogo -NoProfile -File .\PowerShell\tests\Invoke-PortableSignatureTests.ps1 -Configuration Release
  • pwsh -NoLogo -NoProfile -File .\PowerShell\package.ps1 -Configuration Release

Introduce the portable core/FFI, PowerShell 7.4 module cmdlets, MSIX signing support, module-directory signing, expanded end-to-end tests, packaging, CI, and documentation.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Default IncludeChain to NotRoot and add XML/MOF PowerShell script marker signing support so ps1xml files sign and verify through the portable cmdlets. Extend module directory coverage and E2E tests for the new behavior.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Keep fmt-and-lockfile focused on rustfmt and lockfile validation, move the heavier portable clippy/test matrix into a separate cached portable-checks job to make the formatting gate complete faster without dropping coverage.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Split the slow ci-unix portable checks into parallel clippy, crate-test, and matrixed CLI-test jobs. Keep a lightweight portable-checks aggregate job so required-check semantics are preserved while reducing wall-clock time for the cli_pe_digest feature runs.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Stage the FFI shared library as psign-core.dll, libpsign-core.so, or libpsign-core.dylib and update the PowerShell module resolver to import psign-core. Rename the C ABI symbols to the psign_core prefix while keeping the Cargo target name as psign_core because Rust target names cannot contain hyphens.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Build psign-core shared libraries alongside psign-tool in the release matrix, sign Windows DLLs through the existing release signing flow, and package the PowerShell module from downloaded native artifacts. Add PSGallery publishing based on the Pinget release workflow using PSGALLERY_NUGET_API_KEY.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@mamoreau-devolutions Marc-André Moreau (mamoreau-devolutions) merged commit 5358c83 into master May 22, 2026
38 of 39 checks passed
@mamoreau-devolutions Marc-André Moreau (mamoreau-devolutions) deleted the mamoreau-devolutions/portable-authenticode-cmdlets branch May 22, 2026 14:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant