Skip to content

Sign the first-party dependency copies packed into the Tools packages - #4959

Merged
pepone merged 2 commits into
mainfrom
fix/sign-tools-dependency-copies
Sep 15, 2026
Merged

pepone merged 2 commits into
mainfrom
fix/sign-tools-dependency-copies

Conversation

@pepone

@pepone pepone commented Sep 14, 2026

Copy link
Copy Markdown
Member

Fixes #4949

The release workflow signed, for each project under src, only the assembly named after the project in that project's own bin folder. IceRpc.Protobuf.Tools and IceRpc.Slice.Tools pack the bin folders of their generators and build telemetry plug-ins into tools/, and those folders also hold copy-local copies of other first-party assemblies. The catalog never listed these copies, so the published Tools packages shipped them unsigned. The 0.6.0 packages on nuget.org have 7 of them (Get-AuthenticodeSignature reports NotSigned):

  • IceRpc.Slice.Tools: tools/IceRpc.dll, tools/IceRpc.Slice.dll, tools/ZeroC.Slice.Codec.dll, tools/ZeroC.Slice.Symbols.dll
  • IceRpc.Protobuf.Tools: tools/IceRpc.dll, tools/IceRpc.Protobuf.dll, tools/ZeroC.Slice.Codec.dll

This PR searches all of src for each project's assembly, so every copy under a bin/Release/net* folder is signed where it is. That is the smaller of the two fixes proposed in the issue, and it also covers any copies the Tools payloads pick up later. The catalog grows from 24 to 67 files. The 36 new entries that no package includes cost some extra signatures. For scale, signing took 51s in the 0.6.0 release job, which finished in 3m20s against a 10-minute timeout.

Verified locally the same way as #4942: after a Release build, I ran each version of the "Collect Files to Sign" script as written in the workflow, appended a marker to every catalog file to stand in for signing, ran dotnet pack --no-build, and checked every first-party dll in the resulting packages:

  • before: 23 marked, 7 unmarked (the 7 copies above)
  • after: 30 marked, 0 unmarked

The "Collect Files to Sign" step is the same on 0.6.x, so this commit cherry-picks cleanly.

What's Changed entry

None — release packaging fix: the first-party assemblies bundled in the Tools packages are now signed like the rest of the package.

IceRpc.Protobuf.Tools and IceRpc.Slice.Tools pack the bin folders of their
generators and build telemetry plug-ins into tools/, including the copy-local
copies of first-party assemblies such as IceRpc.dll. The signing catalog only
listed each project's assembly in its own bin folder, so these copies shipped
unsigned. Search all of src for each project's assembly instead.

Fixes #4949
Copilot AI lite review requested due to automatic review settings September 14, 2026 10:41
@pepone pepone added this to the 0.6.1 milestone Sep 14, 2026
@pepone pepone added build-system ai-audit AI-generated audit finding — needs human triage labels Sep 14, 2026

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The workflow now signs all first-party assemblies included in the Tools packages.

Pull request overview

Updates release signing to cover first-party assembly copies included in Tools packages.

Changes:

  • Searches all src build output folders for project assemblies.
  • Signs copy-local dependencies before packaging.
  • Preserves the existing signing and dotnet pack --no-build flow.
File summaries
File Description
.github/workflows/build-packages.yml Expands signing discovery to include copied assemblies.
Review details
  • Files reviewed: 1/1 changed files
  • Comments generated: 0
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@bernardnormier bernardnormier left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The fix is right. I reproduced the catalog on a local Release build: the wider search adds exactly 43 entries, all
copy-local copies of first-party assemblies, including the 7 that dotnet pack puts into the Tools packages, and it
picks up no reference assembly.

Please drop the ai-audit label: it stays on the issue, not on the PR.

Two things this PR doesn't cover, for separate issues:

  • slicec.exe in IceRpc.Slice.Tools is unsigned too: it has no certificate table, and the slicec release workflow
    has no signing step.
  • A post-pack step that fails the job when a first-party binary in a produced package isn't signed would have caught
    both #4814 and #4949.

Comment thread .github/workflows/build-packages.yml Resolved
@pepone

pepone commented Sep 14, 2026

Copy link
Copy Markdown
Member Author

for slicec.exe I addressed that in the repository that produces it, see icerpc/slicec#825

Co-authored-by: Bernard Normier <bernardnormier@users.noreply.github.com>
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@pepone pepone removed the ai-audit AI-generated audit finding — needs human triage label Sep 15, 2026
@pepone
pepone merged commit e4f4d14 into main Sep 15, 2026
14 checks passed
@pepone
pepone deleted the fix/sign-tools-dependency-copies branch September 15, 2026 19:16
pepone added a commit that referenced this pull request Sep 16, 2026
…#4959)

Fixes #4949

The release workflow signed, for each project under `src`, only the
assembly named after the project in that project's own `bin` folder.
`IceRpc.Protobuf.Tools` and `IceRpc.Slice.Tools` pack the `bin` folders
of their generators and build telemetry plug-ins into `tools/`, and
those folders also hold copy-local copies of other first-party
assemblies. The catalog never listed these copies, so the published
Tools packages shipped them unsigned. The 0.6.0 packages on nuget.org
have 7 of them (`Get-AuthenticodeSignature` reports `NotSigned`):

- `IceRpc.Slice.Tools`: `tools/IceRpc.dll`, `tools/IceRpc.Slice.dll`,
`tools/ZeroC.Slice.Codec.dll`, `tools/ZeroC.Slice.Symbols.dll`
- `IceRpc.Protobuf.Tools`: `tools/IceRpc.dll`,
`tools/IceRpc.Protobuf.dll`, `tools/ZeroC.Slice.Codec.dll`

This PR searches all of `src` for each project's assembly, so every copy
under a `bin/Release/net*` folder is signed where it is. That is the
smaller of the two fixes proposed in the issue, and it also covers any
copies the Tools payloads pick up later. The catalog grows from 24 to 67
files. The 36 new entries that no package includes cost some extra
signatures. For scale, signing took 51s in the 0.6.0 release job, which
finished in 3m20s against a 10-minute timeout.

Verified locally the same way as #4942: after a Release build, I ran
each version of the "Collect Files to Sign" script as written in the
workflow, appended a marker to every catalog file to stand in for
signing, ran `dotnet pack --no-build`, and checked every first-party dll
in the resulting packages:

- before: 23 marked, 7 unmarked (the 7 copies above)
- after: 30 marked, 0 unmarked

The "Collect Files to Sign" step is the same on `0.6.x`, so this commit
cherry-picks cleanly.

## What's Changed entry

None — release packaging fix: the first-party assemblies bundled in the
Tools packages are now signed like the rest of the package.

(cherry picked from commit e4f4d14)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Audit-Medium] Stable release signing omits the first-party dependency copies packed into the Tools packages

3 participants