Skip to content

[Infra] Digitally sign DLLs with cosign#4637

Merged
Kielek merged 12 commits into
open-telemetry:mainfrom
martincostello:gh-4603
Jul 3, 2026
Merged

[Infra] Digitally sign DLLs with cosign#4637
Kielek merged 12 commits into
open-telemetry:mainfrom
martincostello:gh-4603

Conversation

@martincostello

@martincostello martincostello commented Jul 2, 2026

Copy link
Copy Markdown
Member

Fixes #4603

Changes

Copy the approach for the .NET SDK and sign the assemblies in the NuGet packages with a cosign keyless blob.

Tested here.

I haven't added this to the CHANGELOGs, but I can if wanted.

Merge requirement checklist

  • CONTRIBUTING guidelines followed (license requirements, nullable enabled, static analysis, etc.)
  • Unit tests added/updated
  • Appropriate CHANGELOG.md files updated for non-trivial changes
  • Changes in public API reviewed (if applicable)

Copy the approach for the .NET SDK and sign the assemblies in the NuGet packages with a cosign keyless blob.

Resolves open-telemetry#4603.
@github-actions github-actions Bot added infra Infra work - CI/CD, code coverage, linters documentation Improvements or additions to documentation labels Jul 2, 2026
@codecov

codecov Bot commented Jul 2, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 77.24%. Comparing base (5e02da0) to head (2d8cf02).
⚠️ Report is 1 commits behind head on main.
✅ All tests successful. No failed tests found.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #4637      +/-   ##
==========================================
- Coverage   77.42%   77.24%   -0.18%     
==========================================
  Files         466      466              
  Lines       19569    19569              
==========================================
- Hits        15152    15117      -35     
- Misses       4417     4452      +35     
Flag Coverage Δ
unittests-Contrib.Shared.Tests 89.94% <ø> (ø)
unittests-Exporter.Geneva 56.68% <ø> (-0.53%) ⬇️
unittests-Exporter.InfluxDB 95.75% <ø> (ø)
unittests-Exporter.OneCollector 95.60% <ø> (ø)
unittests-Extensions 90.61% <ø> (ø)
unittests-Extensions.Enrichment 100.00% <ø> (ø)
unittests-Extensions.Enrichment.AspNetCore 86.27% <ø> (ø)
unittests-Extensions.Enrichment.Http 94.33% <ø> (ø)
unittests-Instrumentation.AWS 85.21% <ø> (ø)
unittests-Instrumentation.AspNet 77.50% <ø> (ø)
unittests-Instrumentation.AspNetCore 87.17% <ø> (ø)
unittests-Instrumentation.Cassandra 92.30% <ø> (ø)
unittests-Instrumentation.ConfluentKafka 82.33% <ø> (ø)
unittests-Instrumentation.ElasticsearchClient 80.36% <ø> (ø)
unittests-Instrumentation.EntityFrameworkCore 81.02% <ø> (ø)
unittests-Instrumentation.EventCounters 77.27% <ø> (ø)
unittests-Instrumentation.GrpcCore 91.12% <ø> (ø)
unittests-Instrumentation.GrpcNetClient 78.09% <ø> (ø)
unittests-Instrumentation.Hangfire 88.83% <ø> (ø)
unittests-Instrumentation.Http 75.20% <ø> (ø)
unittests-Instrumentation.Kusto 92.40% <ø> (ø)
unittests-Instrumentation.Owin 88.88% <ø> (ø)
unittests-Instrumentation.Process 100.00% <ø> (ø)
unittests-Instrumentation.Quartz 77.77% <ø> (ø)
unittests-Instrumentation.Remoting 65.59% <ø> (ø)
unittests-Instrumentation.Runtime 100.00% <ø> (ø)
unittests-Instrumentation.ServiceFabricRemoting 39.91% <ø> (ø)
unittests-Instrumentation.SqlClient 82.36% <ø> (ø)
unittests-Instrumentation.StackExchangeRedis 94.18% <ø> (ø)
unittests-Instrumentation.Wcf 82.52% <ø> (-0.13%) ⬇️
unittests-OpAmp.Client 86.33% <ø> (-0.56%) ⬇️
unittests-PersistentStorage 69.20% <ø> (ø)
unittests-PowerShellScripts 86.99% <ø> (ø)
unittests-Resources.AWS 73.61% <ø> (ø)
unittests-Resources.Azure 87.67% <ø> (ø)
unittests-Resources.Container 67.34% <ø> (ø)
unittests-Resources.Gcp 71.42% <ø> (ø)
unittests-Resources.Host 72.26% <ø> (ø)
unittests-Resources.OperatingSystem 76.98% <ø> (ø)
unittests-Resources.Process 90.47% <ø> (ø)
unittests-Resources.ProcessRuntime 79.59% <ø> (ø)
unittests-Sampler.AWS 96.02% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.
see 5 files with indirect coverage changes

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Comment thread README.md Outdated
Run on Windows to fix the signature verification.
Handle finding the TFM to use for cosign when the package only has one TFM.
Fix-up target for handling multi and single TFM packages correctly.
Update patterns to handle DLLs for projects that only produce one TFM.
@martincostello
martincostello marked this pull request as ready for review July 2, 2026 16:14
@martincostello
martincostello requested a review from a team as a code owner July 2, 2026 16:14
Copilot AI review requested due to automatic review settings July 2, 2026 16:14

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR implements Sigstore/cosign-based digital signing for the DLLs shipped inside NuGet packages produced by this repo, aligning the release artifact security posture with the main OpenTelemetry .NET SDK repo.

Changes:

  • Document DLL signing and verification steps (cosign verify-blob) in the repository README.
  • Add an MSBuild packing target to include generated .dll.sigstore.json bundles alongside packaged DLLs under lib/<tfm>/.
  • Update the publish workflow to (a) sign built DLLs keylessly with cosign and (b) verify signatures during package validation.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.

File Description
README.md Adds end-user documentation for verifying cosign signatures embedded in NuGet packages.
build/Common.prod.props Packs Sigstore bundle files (*.dll.sigstore.json) into NuGet packages next to the corresponding DLLs.
.github/workflows/publish-packages.yml Signs build outputs with cosign and verifies signatures as part of package validation.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .github/workflows/publish-packages.yml Outdated
Comment thread .github/workflows/publish-packages.yml
Comment thread .github/workflows/publish-packages.yml
Skip directories that were not built.
Make markdownlint happy with line lengths.
@martincostello
martincostello enabled auto-merge July 2, 2026 20:48
@Kielek
Kielek disabled auto-merge July 3, 2026 10:20
@Kielek

Kielek commented Jul 3, 2026

Copy link
Copy Markdown
Member

I haven't added this to the CHANGELOGs, but I can if wanted.

I think it is worth to do this.

Add an entry for this PR to every CHANGELOG.
This was referenced Jul 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp:exporter.geneva Things related to OpenTelemetry.Exporter.Geneva comp:exporter.influxdb Things related to OpenTelemetry.Exporter.InfluxDB comp:exporter.onecollector Things related to OpenTelemetry.Exporter.OneCollector comp:extensions.aws Things related to OpenTelemetry.Extensions.AWS comp:extensions.enrichment.aspnetcore Things related to OpenTelemetry.Extensions.Enrichment.AspNetCore comp:extensions.enrichment.http Things related to OpenTelemetry.Extensions.Enrichment.Http comp:extensions.enrichment Things related to OpenTelemetry.Extensions.Enrichment comp:extensions Things related to OpenTelemetry.Extensions comp:instrumentation.aspnet.telemetryhttpmodule Things related to OpenTelemetry.Instrumentation.AspNet.TelemetryHttpModule comp:instrumentation.aspnet Things related to OpenTelemetry.Instrumentation.AspNet comp:instrumentation.aspnetcore Things related to OpenTelemetry.Instrumentation.AspNetCore comp:instrumentation.aws Things related to OpenTelemetry.Instrumentation.AWS comp:instrumentation.awslambda Things related to OpenTelemetry.Instrumentation.AWSLambda comp:instrumentation.cassandra Things related to OpenTelemetry.Instrumentation.Cassandra comp:instrumentation.confluentkafka Things related to OpenTelemetry.Instrumentation.ConfluentKafka comp:instrumentation.elasticsearchclient Things related to OpenTelemetry.Instrumentation.ElasticsearchClient comp:instrumentation.entityframeworkcore Things related to OpenTelemetry.Instrumentation.EntityFrameworkCore comp:instrumentation.eventcounters Things related to OpenTelemetry.Instrumentation.EventCounters comp:instrumentation.grpccore Things related to OpenTelemetry.Instrumentation.GrpcCore comp:instrumentation.grpcnetclient Things related to OpenTelemetry.Instrumentation.GrpcNetClient comp:instrumentation.hangfire Things related to OpenTelemetry.Instrumentation.Hangfire comp:instrumentation.http Things related to OpenTelemetry.Instrumentation.Http comp:instrumentation.kusto Things related to OpenTelemetry.Instrumentation.Kusto comp:instrumentation.owin Things related to OpenTelemetry.Instrumentation.Owin comp:instrumentation.process Things related to OpenTelemetry.Instrumentation.Process comp:instrumentation.quartz Things related to OpenTelemetry.Instrumentation.Quartz comp:instrumentation.remoting Things related to OpenTelemetry.Instrumentation.Remoting comp:instrumentation.runtime Things related to OpenTelemetry.Instrumentation.Runtime comp:instrumentation.servicefabricremoting Things related to OpenTelemetry.Instrumentation.ServiceFabricRemoting comp:instrumentation.sqlclient Things related to OpenTelemetry.Instrumentation.SqlClient comp:instrumentation.stackexchangeredis Things related to OpenTelemetry.Instrumentation.StackExchangeRedis comp:instrumentation.wcf Things related to OpenTelemetry.Instrumentation.Wcf comp:opamp.client Things related to OpenTelemetry.OpAmp.Client comp:persistentstorage.abstractions Things related to OpenTelemetry.PersistentStorage.Abstractions comp:persistentstorage.filesystem Things related to OpenTelemetry.PersistentStorage.FileSystem comp:resources.aws Things related to OpenTelemetry.Resources.AWS comp:resources.azure Things related to OpenTelemetry.Resources.Azure comp:resources.container Things related to OpenTelemetry.Resources.Container comp:resources.gcp Things related to OpenTelemetry.Resources.Gcp comp:resources.host Things related to OpenTelemetry.Resources.Host comp:resources.operatingsystem Things related to OpenTelemetry.Resources.OperatingSystem comp:resources.process Things related to OpenTelemetry.Resources.Process comp:resources.processruntime Things related to OpenTelemetry.Resources.ProcessRuntime comp:sampler.aws Things related to OpenTelemetry.Samplers.AWS documentation Improvements or additions to documentation infra Infra work - CI/CD, code coverage, linters

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Digitally sign DLLs with cosign