From 84e2d02ca0b3e841dce302f97f0ba7126ab664bc Mon Sep 17 00:00:00 2001 From: Michael Fanning Date: Mon, 22 Feb 2021 14:13:31 -0800 Subject: [PATCH] Add assembly resource file filtering back. --- src/BinSkim.Rules/PERules/BA2006.BuildWithSecureTools.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/BinSkim.Rules/PERules/BA2006.BuildWithSecureTools.cs b/src/BinSkim.Rules/PERules/BA2006.BuildWithSecureTools.cs index fa4deeefc..cc9f82a14 100644 --- a/src/BinSkim.Rules/PERules/BA2006.BuildWithSecureTools.cs +++ b/src/BinSkim.Rules/PERules/BA2006.BuildWithSecureTools.cs @@ -75,6 +75,9 @@ public override AnalysisApplicability CanAnalyzePE(PEBinary target, PropertiesDi reasonForNotAnalyzing = MetadataConditions.ImageIsILOnlyAssembly; if (portableExecutable.IsILOnly) { return result; } + reasonForNotAnalyzing = MetadataConditions.ImageIsResourceOnlyBinary; + if (portableExecutable.IsResourceOnly) { return result; } + reasonForNotAnalyzing = null; return AnalysisApplicability.ApplicableToSpecifiedTarget; }