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

* NEW: Add XML configuration option IncludeWixBinaries to include Wix binaries in the analysis. #944

Merged
merged 16 commits into from
Jul 27, 2023

Conversation

shaopeng-gh
Copy link
Collaborator

Added test file for Wix v4.
Test will only pass after my fix is merged: #941

@@ -79,6 +79,8 @@ public CompilerDataLogger CompilerDataLogger

public bool IgnorePdbLoadError { get; set; }

public bool IncludeWixBinaries { get; set; }
Copy link
Member

@michaelcfanning michaelcfanning Jul 18, 2023

Choose a reason for hiding this comment

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

IncludeWixBinaries

You didn't add a PerLanguageOption for this, as a result no one can configure this property via XML configuration. #Resolved

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

fixed

@michaelcfanning
Copy link
Member

michaelcfanning commented Jul 18, 2023

    public CompilerDataLogger CompilerDataLogger

this is a useless utilization of the context object because this runtime type doesn't serialize. whoever added this didn't understand the context XML system.


In reply to: 1640480352


Refers to: src/BinSkim.Sdk/BinaryAnalyzerContext.cs:69 in 60f6f7c. [](commit_id = 60f6f7c, deletion_comment = False)

@michaelcfanning
Copy link
Member

michaelcfanning commented Jul 18, 2023

    public bool ComprehensiveBinaryParsing

Here is a correct example of property utilization.


In reply to: 1640480894


In reply to: 1640480894


Refers to: src/BinSkim.Sdk/BinaryAnalyzerContext.cs:43 in 60f6f7c. [](commit_id = 60f6f7c, deletion_comment = False)

Copy link
Member

@michaelcfanning michaelcfanning left a comment

Choose a reason for hiding this comment

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

🕐

@michaelcfanning
Copy link
Member

michaelcfanning commented Jul 18, 2023

    public string LocalSymbolDirectories { get; set; }

please make this a config-capable property.


In reply to: 1640531469


Refers to: src/BinSkim.Sdk/BinaryAnalyzerContext.cs:41 in 60f6f7c. [](commit_id = 60f6f7c, deletion_comment = False)

@michaelcfanning
Copy link
Member

michaelcfanning commented Jul 18, 2023

    public bool TracePdbLoads { get; set; }

add XML property


In reply to: 1640531872


Refers to: src/BinSkim.Sdk/BinaryAnalyzerContext.cs:49 in 60f6f7c. [](commit_id = 60f6f7c, deletion_comment = False)

@michaelcfanning
Copy link
Member

michaelcfanning commented Jul 18, 2023

    public string SymbolPath { get; set; }

Add XML property


In reply to: 1640532133


Refers to: src/BinSkim.Sdk/BinaryAnalyzerContext.cs:51 in 60f6f7c. [](commit_id = 60f6f7c, deletion_comment = False)

@@ -79,6 +79,8 @@ public CompilerDataLogger CompilerDataLogger

public bool IgnorePdbLoadError { get; set; }
Copy link
Member

@michaelcfanning michaelcfanning Jul 18, 2023

Choose a reason for hiding this comment

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

IgnorePdbLoadError

add xml property #Resolved

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

added

@michaelcfanning
Copy link
Member

michaelcfanning commented Jul 18, 2023

                ? this.Policy.GetProperty(SharedCompilerDataLoggerProperty)

remove xml property


In reply to: 1640532812


Refers to: src/BinSkim.Sdk/BinaryAnalyzerContext.cs:74 in 60f6f7c. [](commit_id = 60f6f7c, deletion_comment = False)

[Option(
"includeWixBinaries",
HelpText = "If enabled, BinSkim will include Wix binaries in the analysis.")]
public bool IncludeWixBinaries { get; set; }
Copy link
Member

@michaelcfanning michaelcfanning Jul 18, 2023

Choose a reason for hiding this comment

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

IncludeWixBinaries

so what should we do with the next 10 file types of this kind? do we propose to add 10 more command-line arguments?

what's the audience for this change? since the production of wix binaries is owned by the wix toolset, isn't it true that this feature is mostly for that narrow audience?

what I'd suggest here is either we have a single --include argument that would accept an enumeration of binary kinds to fault in eventually. For now, however, with only a single case to address, we could simply proceed with a configuration XML solution. we can add the argument later if necessary. #Resolved

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

as last conversation in the sync meeting, remove the option and use the xml config

@shaopeng-gh
Copy link
Collaborator Author

    public bool ComprehensiveBinaryParsing

Using this format now, thanks!


In reply to: 1640480894


Refers to: src/BinSkim.Sdk/BinaryAnalyzerContext.cs:43 in 60f6f7c. [](commit_id = 60f6f7c, deletion_comment = False)

@shaopeng-gh
Copy link
Collaborator Author

    public string LocalSymbolDirectories { get; set; }

added


In reply to: 1640531469


Refers to: src/BinSkim.Sdk/BinaryAnalyzerContext.cs:41 in 60f6f7c. [](commit_id = 60f6f7c, deletion_comment = False)

@shaopeng-gh
Copy link
Collaborator Author

    public string SymbolPath { get; set; }

added


In reply to: 1640532133


Refers to: src/BinSkim.Sdk/BinaryAnalyzerContext.cs:51 in 60f6f7c. [](commit_id = 60f6f7c, deletion_comment = False)

@shaopeng-gh
Copy link
Collaborator Author

    public CompilerDataLogger CompilerDataLogger

removed


In reply to: 1640480352


Refers to: src/BinSkim.Sdk/BinaryAnalyzerContext.cs:69 in 60f6f7c. [](commit_id = 60f6f7c, deletion_comment = False)

@shaopeng-gh
Copy link
Collaborator Author

                ? this.Policy.GetProperty(SharedCompilerDataLoggerProperty)

removed


In reply to: 1640532812


Refers to: src/BinSkim.Sdk/BinaryAnalyzerContext.cs:74 in 60f6f7c. [](commit_id = 60f6f7c, deletion_comment = False)

@shaopeng-gh
Copy link
Collaborator Author

    public bool TracePdbLoads { get; set; }

fixed all others, this one is a bit different, it depends on the --trace, proposed to leave it another pr.


In reply to: 1640531872


Refers to: src/BinSkim.Sdk/BinaryAnalyzerContext.cs:49 in 60f6f7c. [](commit_id = 60f6f7c, deletion_comment = False)

@shaopeng-gh shaopeng-gh changed the title * NEW: Add --includeWixBinaries option to include Wix binaries in the analysis. * NEW: Add XML configuration option to include Wix binaries in the analysis. Jul 27, 2023
@shaopeng-gh shaopeng-gh changed the title * NEW: Add XML configuration option to include Wix binaries in the analysis. * NEW: Add XML configuration option IncludeWixBinaries to include Wix binaries in the analysis. Jul 27, 2023
Copy link
Member

@michaelcfanning michaelcfanning left a comment

Choose a reason for hiding this comment

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

:shipit:

@suvamM suvamM enabled auto-merge July 27, 2023 20:15
@suvamM suvamM disabled auto-merge July 27, 2023 20:29
@suvamM suvamM closed this Jul 27, 2023
@suvamM suvamM reopened this Jul 27, 2023
@suvamM suvamM merged commit 533b71a into main Jul 27, 2023
6 checks passed
@suvamM suvamM deleted the users/shaopeng-gh/wix branch July 27, 2023 20:30
@shaopeng-gh shaopeng-gh mentioned this pull request Aug 2, 2023
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.

3 participants