Skip to content

chore(ci): windows binary audit fix and more code-signing verification#7245

Merged
SWvheerden merged 1 commit intotari-project:developmentfrom
leet4tari:build-bins-leet-windows-audit
Jun 23, 2025
Merged

chore(ci): windows binary audit fix and more code-signing verification#7245
SWvheerden merged 1 commit intotari-project:developmentfrom
leet4tari:build-bins-leet-windows-audit

Conversation

@leet4tari
Copy link
Copy Markdown
Contributor

@leet4tari leet4tari commented Jun 23, 2025

Description
Windows binary audit fix
move code-signing verification into common powerShell
add per Windows exe verify before Windows installer build
Move linux-arm64 from cross-rs compile to native runner on Ubuntu 22.04

Motivation and Context
Make sure that audit is included for Windows binaries
Verify Windows exes before build Windows installer
Fix linux-arm64 builds

How Has This Been Tested?
Builds and works as expected in CI workflows

Summary by CodeRabbit

  • New Features

    • Introduced a script to verify digital signatures of Windows executable files, enhancing security checks in the release process.
  • Chores

    • Updated build configuration for Linux ARM64 to use a specific runner environment and disable cross-compilation.
    • Improved CI workflow for Windows by simplifying and centralizing signature verification steps and adjusting audit step execution for better compatibility.

…nto common powerShell, add per Windows exe verify before Windows installer build. Move linux-arm64 from cross-rs compile to native runner on Ubuntu 22.04
@leet4tari leet4tari requested a review from a team as a code owner June 23, 2025 13:16
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Jun 23, 2025

Walkthrough

This change updates the CI workflow for building binaries. It modifies the build environment for the Linux ARM64 target, refines Windows signature verification steps by introducing a new PowerShell script, and adjusts audit steps for compatibility. A new script, check_signatures.ps1, is added for verifying digital signatures on Windows executables.

Changes

File(s) Change Summary
.github/workflows/build_binaries.json Changed Linux ARM64 build to use ubuntu-22.04-arm and disabled cross-compilation.
.github/workflows/build_binaries.yml Updated Windows signature verification steps, added new check step, adjusted audit directory logic.
buildtools/check_signatures.ps1 Added a new PowerShell script for verifying digital signatures on Windows executables.

Sequence Diagram(s)

sequenceDiagram
    participant CI as GitHub Actions
    participant Script as check_signatures.ps1
    participant Signtool as signtool.exe
    participant PowerShell as Get-AuthenticodeSignature

    CI->>Script: Run check_signatures.ps1 with directory or file list
    Script->>Signtool: Locate signtool.exe
    alt For each .exe file
        Script->>PowerShell: Validate signature with Get-AuthenticodeSignature
        Script->>Signtool: Validate signature with signtool.exe verify /pa
        Script-->>CI: Report warning if validation fails
    end
    Script-->>CI: Exit with success or failure code
Loading

Possibly related PRs

Suggested reviewers

  • SWvheerden

Poem

In the warren of code, a new script appears,
To check every signature, allay all our fears.
With PowerShell magic and signtool in tow,
Our binaries are safer, as workflows now flow.
🐇✨ Hopping through CI, the rabbit approves—
Secure and verified, our project improves!


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 078cad8 and a1fa399.

📒 Files selected for processing (3)
  • .github/workflows/build_binaries.json (1 hunks)
  • .github/workflows/build_binaries.yml (4 hunks)
  • buildtools/check_signatures.ps1 (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (7)
  • GitHub Check: test (mainnet, stagenet)
  • GitHub Check: test (nextnet, nextnet)
  • GitHub Check: test (testnet, esmeralda)
  • GitHub Check: ci
  • GitHub Check: cargo check with stable
  • GitHub Check: Cucumber tests / FFI
  • GitHub Check: Cucumber tests / Base Layer
🔇 Additional comments (10)
.github/workflows/build_binaries.json (1)

12-12: LGTM! Improved build strategy for linux-arm64.

The switch from cross-compilation to native ARM64 builds using the dedicated ubuntu-22.04-arm runner should improve build performance and eliminate cross-compilation related issues.

Also applies to: 15-15

buildtools/check_signatures.ps1 (5)

9-27: LGTM! Comprehensive input validation and usage guidance.

The parameter validation logic correctly ensures at least one input method is provided, and the usage examples are clear and helpful for CI integration.


29-47: LGTM! Robust signtool.exe detection strategy.

The search logic correctly targets the x64 version of signtool.exe within the Windows Kits directory structure. The error handling ensures the script fails fast if the required tool is not available.


52-69: LGTM! Flexible file resolution with proper validation.

The logic correctly handles both parameter types and includes appropriate validation to ensure executable files are found before proceeding.


71-99: LGTM! Dual signature verification approach enhances reliability.

The combination of PowerShell's Get-AuthenticodeSignature and external signtool.exe verify /pa provides comprehensive signature validation. The error counting and detailed output will be valuable for CI debugging.


101-107: LGTM! Appropriate exit code handling for CI integration.

Returning the failure count as the exit code provides meaningful feedback to the CI system while still indicating success (0) when all signatures are valid.

.github/workflows/build_binaries.yml (4)

317-319: LGTM! Debug step appropriately disabled.

Commenting out the debug environment variable printing is appropriate for production workflows to reduce log noise and potential information exposure.


549-556: LGTM! Enhanced security with archive pack signature verification.

The new verification step adds an important security check by validating all executables in the distribution directory before creating the archive. This ensures signed binaries are properly verified.


591-591: LGTM! Simplified and standardized installer verification.

Replacing the inline PowerShell signature verification with a call to the centralized check_signatures.ps1 script improves maintainability and consistency across the workflow.


616-618: LGTM! Fixed Windows compatibility issue for audit step.

Removing the working-directory directive and using explicit cd within the script resolves the Windows-specific issue mentioned in the PR objectives while maintaining the same functionality.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@leet4tari leet4tari changed the title chore(ci): Windows binary audit fix and more code-signing verification chore(ci): windows binary audit fix and more code-signing verification Jun 23, 2025
@github-actions
Copy link
Copy Markdown

Test Results (CI)

    3 files    126 suites   46m 1s ⏱️
1 351 tests 1 351 ✅ 0 💤 0 ❌
4 051 runs  4 051 ✅ 0 💤 0 ❌

Results for commit a1fa399.

@github-actions
Copy link
Copy Markdown

Test Results (Integration tests)

 2 files  10 suites   1h 4m 12s ⏱️
30 tests 26 ✅ 1 💤 3 ❌
36 runs  27 ✅ 1 💤 8 ❌

For more details on these failures, see this check.

Results for commit a1fa399.

@SWvheerden SWvheerden merged commit ba4bf25 into tari-project:development Jun 23, 2025
16 of 18 checks passed
sdbondi added a commit to sdbondi/tari that referenced this pull request Jun 24, 2025
* development:
  fix: remove long timeout in interactive_tx till tx is persisted into db (tari-project#7252)
  chore: new release v4.6.1-pre.0 (tari-project#7248)
  fix: minotari_merge_mining_proxy returns Tari block hash even if submit_to_origin is disabled (tari-project#7242)
  chore(ci): windows binary audit fix and more code-signing verification (tari-project#7245)
  fix: database cannot resize on jmt write (tari-project#7244)
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.

2 participants