Allow unsigned source for development testing#5790
Open
dkbennett wants to merge 2 commits intomicrosoft:masterfrom
Open
Allow unsigned source for development testing#5790dkbennett wants to merge 2 commits intomicrosoft:masterfrom
dkbennett wants to merge 2 commits intomicrosoft:masterfrom
Conversation
This comment has been minimized.
This comment has been minimized.
JohnMcPMS
reviewed
Feb 6, 2026
| { | ||
| // To use an unsigned source, set AICLI_ALLOW_UNSIGNED_SOURCE and use a debug build. | ||
| // Ex: set CL=/DAICLI_ALLOW_UNSIGNED_SOURCE | ||
| #if ! defined( AICLI_DISABLE_TEST_HOOKS ) && defined( AICLI_ALLOW_UNSIGNED_SOURCE ) |
Member
There was a problem hiding this comment.
I think I would rather see this hardened more to prevent what feels like potential for accidental disabling of the security.
I would do that by creating a function on the base class for use in calling ValidateTrustInfo. Then create a derived type from the Desktop version that overrides that virtual with the one that doesn't check (and can do that easily from preprocessor instead of a global bool).
I would also create a separate semantic for using the Desktop version all the time, mostly because we might consider allowing that as choice.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This formalizes a workaround I have been using for testing an unsigned Pre-Indexed Package Source. It would be convenient to have this in the code so I don't have to constantly stash/unstash the changes when moving around branches.
This works only when test hooks are enabled (i.e. a debug build) AND you set the preprocessor directive "AICLI_ALLOW_UNSIGNED_SOURCE"
The easy way to set this up is to add CL=/DAICLI_ALLOW_UNSIGNED_SOURCE to your Environment variables and restart visual studio.
I've noticed Visual Studio will not recognize the directive is set, but the compiler will set it when it builds and it will work. I did not make these const due to a web of compiler warnings and errors when a const value is specified first in an if statement.
Microsoft Reviewers: Open in CodeFlow