Skip to content

Treat CAB files as containers #875

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Treat CAB files as containers #875

wants to merge 1 commit into from

Conversation

bricelam
Copy link

Fixes #874

@bricelam bricelam requested a review from a team as a code owner May 14, 2025 00:18
@dlemstra
Copy link
Collaborator

dlemstra commented May 14, 2025

I am not sure if we should add this now and take a dependency on WixToolset.Dtf.Compression.Cab. Wondering if we should first take a good look at how AggregatingSigner is implemented. It feels like we are now putting too many things in a single place and I wonder if it's a good thing to add this now?

It also looks like that library requires an Open Source Maintenance Fee for: opening or commenting on issues, participating in discussions and downloading releases.

@bricelam
Copy link
Author

I agree AggregateSigner and ContainerProvider needs some cleanup. But, IMHO, that’s orthogonal to adding this feature.

Also, Microsoft has paid the maintainer’s fee, so maybe you’re already good? 🤷‍♂️

I believe my MSI PR also adds the WixToolset.Dtf.Compression.Cab dependency transitively, so maybe along with that feature it’s justified.

Without CAB and MSI support, this tool really doesn’t live up to its stated design of nested signing.

@bricelam
Copy link
Author

/cc @robmen in case you have any response to the OSMF FUD

@robmen
Copy link

robmen commented May 14, 2025

dotnet already takes dependencies on the WiX Toolset and Microsoft does pay the Open Source Maintenance Fee (thank you).

@dlemstra
Copy link
Collaborator

There is no need to call my comment FUD. I only stated what I found on the readme page of that dependency and that this should be some something that should be looked at.

@@ -6,6 +6,8 @@
<add key="dotnet-libraries" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-libraries/nuget/v3/index.json" />
<add key="dotnet-tools" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools/nuget/v3/index.json" />
<add key="dotnet-public" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public/nuget/v3/index.json" />
<!-- TODO: Mirror WixToolset.Dtf.Compression.Cab and dependencies -->
Copy link
Collaborator

Choose a reason for hiding this comment

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

This PR should not be merged before this has been resolved.

Copy link
Author

Choose a reason for hiding this comment

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

Here are the instructions for mirroring a package. Also be sure to revert this file.

@bricelam
Copy link
Author

There is no need to call my comment FUD.

My apologies, I forget there's a lot more negative connotations that come with labeling something as FUD nowadays. I just meant it purely in the sense of uncertainty and possible doubt. I'm definitely not accusing anyone of xenophobia or ignorant reluctance!

@Foda
Copy link
Member

Foda commented Jun 5, 2025

@bricelam Trying to test this locally, and my MSI is failing to install once I sign the .cab it uses:
image

I'm probably doing something wrong? I have both a .msi and a .cab then sign the .cab and try to install it via the .msi. If I manually extract the .cab the files inside are signed. I suspect it's because the hash and size of the files are being modified?

@bricelam
Copy link
Author

bricelam commented Jun 5, 2025

Oh interesting, I bet you're right--we probably need to update the MSI after signing the CABs.

@bricelam
Copy link
Author

bricelam commented Jun 5, 2025

Wait. That bug should already exist today without this change. External CAB files are already being signed--just not their contents.

@Foda
Copy link
Member

Foda commented Jun 6, 2025

Wait. That bug should already exist today without this change. External CAB files are already being signed--just not their contents.

That did cross my mind too, but it didn't seem to cause any issues. I suspect it's because the contents change and the layout is no longer what it expects or something

@bricelam
Copy link
Author

bricelam commented Jun 9, 2025

I'll dig into it and see what we can do. Hopefully, I'm just re-assembling the CAB file incorrectly (e.g. with a new nested directory or something) and we don't have to update referencing MSI files just because you recursively sign a CAB file.

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.

Treat CAB files as containers
4 participants