Skip to content

Commit

Permalink
Refactor PE load error option handling
Browse files Browse the repository at this point in the history
Changed property name from `ignorePELoadErrors` to `ignorePELoadError` in `AnalyzeOptions.cs`. Updated help text accordingly. Added handling for the `--ignorePELoadError` command-line argument in `BinSkim.cs` to evaluate its value and add "True" if necessary.
  • Loading branch information
AllDwarf committed Feb 21, 2025
1 parent 66ce0fc commit ee1b40c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/BinSkim.Driver/AnalyzeOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public class AnalyzeOptions : AnalyzeOptionsBase
public bool? IgnorePdbLoadError { get; set; }

[Option(
"ignorePELoadErrors",
"ignorePELoadError",
HelpText = "If enabled, BinSkim won't break if we have a ExceptionInCanAnalyzeError")]
public bool? IgnorePELoadError { get; set; }

Expand Down
9 changes: 9 additions & 0 deletions src/BinSkim.Driver/BinSkim.cs
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,15 @@ private static string[] RewriteArgs(string[] args)

break;
}
case "--ignorePELoadError":
{
if (!EvaluatesToTrueOrFalse(next))
{
rewritten.Add("True");
}

break;
}

default:
{
Expand Down

0 comments on commit ee1b40c

Please sign in to comment.