Skip to content
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

Code sign the contents of the Terminal package #14710

Merged
merged 2 commits into from
Jan 20, 2023

Conversation

DHowett
Copy link
Member

@DHowett DHowett commented Jan 20, 2023

Up until now, we have been relying on the catalog signature produced for our MSIX package.
There are some things (Packaged COM, Process Explorer as of 2022) that cannot handle catalog-signed
files. It's easier and safer for us to simply sign all the executables we produce before packaging them.

Unfortunately, we can't do it before we package them. We have to unpack and re-pack our package.

In the future, this will allow us to provide a codesigned distribution that is not in an MSIX package.

Validation Steps Performed

Ran a build and checked out the contents of the package. They were all signed!

Closes #13294
Closes #12695
Closes #9670

@DHowett DHowett changed the title Codesign the contents of the Terminal pacakge Code sign the contents of the Terminal pacakge Jan 20, 2023
@ghost ghost added the Issue-Bug It either shouldn't be doing this or needs an investigation. label Jan 20, 2023
@DHowett
Copy link
Member Author

DHowett commented Jan 20, 2023

@zadjii-msft gave a ✅ over Teams

Comment on lines +7 to +29
// Namespaced DLLs
"Microsoft.Terminal.*.dll",
"Microsoft.Terminal.*.winmd",

// ConPTY and DefTerm
"OpenConsole.exe",
"OpenConsoleProxy.dll",

// VCRT Forwarders
"*_app.dll",

// Legacy DLLs with old names
"TerminalApp.dll",
"TerminalApp.winmd",
"TerminalConnection.dll",
"TerminalThemeHelpers.dll",
"WindowsTerminalShellExt.dll",

// The rest
"TerminalAzBridge.exe",
"wt.exe",
"WindowsTerminal.exe",
"elevate-shim.exe"
Copy link
Member

Choose a reason for hiding this comment

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

Couldn't we make this something like a catch-all clause with *.exe, *.dll, and *.winmd as the MatchedPaths by putting it after the 3rd party object/section below? That way we won't have to keep track of all these binaries in the future.

Copy link
Member Author

Choose a reason for hiding this comment

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

That's a fair question. I don't know if it excludes files that were included in a previous batch. I'd rather not add a rule that signs all EXEs and DLLs for now, but if this becomes burdensome we can revisit it. Thanks :)

@DHowett DHowett added the Needs-Second It's a PR that needs another sign-off label Jan 20, 2023
@DHowett DHowett changed the title Code sign the contents of the Terminal pacakge Code sign the contents of the Terminal package Jan 20, 2023
@DHowett DHowett merged commit 72be9a9 into main Jan 20, 2023
@DHowett DHowett deleted the dev/duhowett/what-if-we-signed-under-the-bleachers branch January 20, 2023 17:47
DHowett added a commit that referenced this pull request Jan 20, 2023
Up until now, we have been relying on the catalog signature produced for our MSIX package.
There are some things (Packaged COM, Process Explorer as of 2022) that cannot handle catalog-signed
files. It's easier and safer for us to simply sign all the executables we produce before packaging them.

Unfortunately, we can't do it before we package them. We have to unpack and re-pack our package.

In the future, this will allow us to provide a codesigned distribution that is not in an MSIX package.

TEST=Ran a build and checked out the contents of the package. They were all signed!

Closes #13294
Closes #12695
Closes #9670

(cherry picked from commit 72be9a9)
Service-Card-Id: 87690424
Service-Version: 1.16
@ghost
Copy link

ghost commented Jan 24, 2023

🎉Windows Terminal v1.16.1023 (10231 and 10232) has been released which incorporates this pull request.:tada:

Handy links:

@ghost
Copy link

ghost commented Jan 24, 2023

🎉Windows Terminal Preview v1.17.1023 has been released which incorporates this pull request.:tada:

Handy links:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Issue-Bug It either shouldn't be doing this or needs an investigation. Needs-Second It's a PR that needs another sign-off
Projects
None yet
2 participants