From 59562b5b00d7e4319c27cddcf4d141ba12beaa40 Mon Sep 17 00:00:00 2001 From: Shaopeng Li Date: Tue, 16 Apr 2024 15:22:18 -0700 Subject: [PATCH] Update to Branch --- ReleaseHistory.md | 3 ++- src/BinSkim.Rules/DwarfRules/BA3003.EnableStackProtector.cs | 2 +- .../DwarfRules/BA3005.EnableStackClashProtection.cs | 2 +- .../DwarfRules/BA4002.ReportElfOrMachoCompilerData.cs | 2 +- .../ElfRules/BA3001.EnablePositionIndependentExecutable.cs | 2 +- .../ElfRules/BA3002.DoNotMarkStackAsExecutable.cs | 2 +- .../ElfRules/BA3004.GenerateRequiredSymbolFormat.cs | 2 +- src/BinSkim.Rules/ElfRules/BA3006.EnableNonExecutableStack.cs | 2 +- src/BinSkim.Rules/ElfRules/BA3010.EnableReadOnlyRelocations.cs | 2 +- src/BinSkim.Rules/ElfRules/BA3011.EnableBindNow.cs | 2 +- src/BinSkim.Rules/ElfRules/BA3030.UseGccCheckedFunctions.cs | 2 +- src/BinSkim.Rules/ElfRules/BA3031.EnableClangSafeStack.cs | 2 +- .../MachORules/BA5001.EnablePositionIndependentExecutable.cs | 2 +- .../MachORules/BA5002.DoNotAllowExecutableStack.cs | 2 +- .../PERules/BA2001.LoadImagesAboveFourGigabyteAddress.cs | 2 +- .../PERules/BA2002.DoNotIncorporateVulnerableDependencies.cs | 2 +- .../PERules/BA2004.EnableSecureSourceCodeHashing.cs | 2 +- .../PERules/BA2005.DoNotShipVulnerableBinaries.cs | 2 +- src/BinSkim.Rules/PERules/BA2006.BuildWithSecureTools.cs | 2 +- .../PERules/BA2007.EnableCriticalCompilerWarnings.cs | 2 +- src/BinSkim.Rules/PERules/BA2008.EnableControlFlowGuard.cs | 2 +- .../PERules/BA2009.EnableAddressSpaceLayoutRandomization.cs | 2 +- .../PERules/BA2010.DoNotMarkImportsSectionAsExecutable.cs | 2 +- src/BinSkim.Rules/PERules/BA2011.EnableStackProtection.cs | 2 +- .../PERules/BA2012.DoNotModifyStackProtectionCookie.cs | 2 +- src/BinSkim.Rules/PERules/BA2013.InitializeStackProtection.cs | 2 +- .../PERules/BA2014.DoNotDisableStackProtectionForFunctions.cs | 2 +- .../PERules/BA2015.EnableHighEntropyVirtualAddresses.cs | 2 +- src/BinSkim.Rules/PERules/BA2016.MarkImageAsNXCompatible.cs | 2 +- src/BinSkim.Rules/PERules/BA2018.EnableSafeSEH.cs | 2 +- .../PERules/BA2019.DoNotMarkWritableSectionsAsShared.cs | 2 +- .../PERules/BA2021.DoNotMarkWritableSectionsAsExecutable.cs | 2 +- src/BinSkim.Rules/PERules/BA2022.SignSecurely.cs | 2 +- src/BinSkim.Rules/PERules/BA2024.EnableSpectreMitigations.cs | 2 +- src/BinSkim.Rules/PERules/BA2025.EnableShadowStack.cs | 2 +- .../PERules/BA2026.EnableMicrosoftCompilerSdlSwitch.cs | 2 +- src/BinSkim.Rules/PERules/BA2027.EnableSourceLink.cs | 2 +- src/BinSkim.Rules/PERules/BA2029.EnableIntegrityCheck.cs | 2 +- .../PERules/BA4001.ReportPortableExecutableCompilerData.cs | 2 +- .../PERules/BA6001.DisableIncrementalLinkingInReleaseBuilds.cs | 2 +- src/BinSkim.Rules/PERules/BA6002.EliminateDuplicateStrings.cs | 2 +- src/BinSkim.Rules/PERules/BA6004.EnableComdatFolding.cs | 2 +- src/BinSkim.Rules/PERules/BA6005.EnableOptimizeReferences.cs | 2 +- .../PERules/BA6006.EnableLinkTimeCodeGeneration.cs | 2 +- src/sarif-sdk | 2 +- 45 files changed, 46 insertions(+), 45 deletions(-) diff --git a/ReleaseHistory.md b/ReleaseHistory.md index 5de4ab14..2474d540 100644 --- a/ReleaseHistory.md +++ b/ReleaseHistory.md @@ -14,8 +14,9 @@ - UEE => eliminate unhandled exceptions in engine - DEP => upgrade dependency versions - NEW => new feature + ## UNRELEASED -* DEP: Update `Sarif.Sdk` submodule from [bc8cb57 to fd6e615](https://github.com/microsoft/sarif-sdk/compare/bc8cb57...fd6e615). Reference [SARIF SDK Release History](https://github.com/microsoft/sarif-sdk/blob/fd6e615/ReleaseHistory.md). +* DEP: Update `Sarif.Sdk` submodule from [bc8cb57 to a9c7b1b](https://github.com/microsoft/sarif-sdk/compare/bc8cb57...a9c7b1b). Reference [SARIF SDK Release History](https://github.com/microsoft/sarif-sdk/blob/a9c7b1b/ReleaseHistory.md). * BUG: Fix `BA2027.EnableSourceLink` unexpectedly causes `ExceptionLoadingPdb` error when the PDB file is missing. [988](https://github.com/microsoft/binskim/pull/988). * BUG: Exclude system-generated files `AssemblyAttributes.obj`, `AssemblyInfo.obj`, `stdafx.obj` from `BA2004.EnableSecureSourceCodeHashing`. [989](https://github.com/microsoft/binskim/pull/989). * BUG: Fix `ERR998.ExceptionInAnalyze`: `InvalidOperationException: Unrecognized crypto HRESULT: 0x80096011` for check `BA2022.SignSecurely` when the signature is malformed, by adding missing error code to error description mappings. [969](https://github.com/microsoft/binskim/pull/969) diff --git a/src/BinSkim.Rules/DwarfRules/BA3003.EnableStackProtector.cs b/src/BinSkim.Rules/DwarfRules/BA3003.EnableStackProtector.cs index b869a6d1..cfb4b713 100644 --- a/src/BinSkim.Rules/DwarfRules/BA3003.EnableStackProtector.cs +++ b/src/BinSkim.Rules/DwarfRules/BA3003.EnableStackProtector.cs @@ -38,7 +38,7 @@ public class EnableStackProtector : DwarfSkimmerBase public override MultiformatMessageString FullDescription => new MultiformatMessageString { Text = RuleResources.BA3003_EnableStackProtector_Description }; - protected override IEnumerable MessageResourceNames => new string[] { + protected override ICollection MessageResourceNames => new string[] { nameof(RuleResources.BA3003_Pass), nameof(RuleResources.BA3003_Error), nameof(RuleResources.NotApplicable_InvalidMetadata) diff --git a/src/BinSkim.Rules/DwarfRules/BA3005.EnableStackClashProtection.cs b/src/BinSkim.Rules/DwarfRules/BA3005.EnableStackClashProtection.cs index fa702091..d29af210 100644 --- a/src/BinSkim.Rules/DwarfRules/BA3005.EnableStackClashProtection.cs +++ b/src/BinSkim.Rules/DwarfRules/BA3005.EnableStackClashProtection.cs @@ -34,7 +34,7 @@ public class EnableStackClashProtection : DwarfSkimmerBase public override MultiformatMessageString FullDescription => new MultiformatMessageString { Text = RuleResources.BA3005_EnableStackClashProtection_Description }; - protected override IEnumerable MessageResourceNames => new string[] { + protected override ICollection MessageResourceNames => new string[] { nameof(RuleResources.BA3005_Pass), nameof(RuleResources.BA3005_Error), nameof(RuleResources.NotApplicable_InvalidMetadata) diff --git a/src/BinSkim.Rules/DwarfRules/BA4002.ReportElfOrMachoCompilerData.cs b/src/BinSkim.Rules/DwarfRules/BA4002.ReportElfOrMachoCompilerData.cs index fca2a1a9..a229563f 100644 --- a/src/BinSkim.Rules/DwarfRules/BA4002.ReportElfOrMachoCompilerData.cs +++ b/src/BinSkim.Rules/DwarfRules/BA4002.ReportElfOrMachoCompilerData.cs @@ -30,7 +30,7 @@ public class ReportElfOrMachoCompilerData : DwarfSkimmerBase, IOptionsProvider /// public override MultiformatMessageString FullDescription => new MultiformatMessageString { Text = RuleResources.BA4002_ReportELFCompilerData_Description }; - protected override IEnumerable MessageResourceNames => Array.Empty(); + protected override ICollection MessageResourceNames => Array.Empty(); public override AnalysisApplicability CanAnalyzeDwarf(IDwarfBinary target, Sarif.PropertiesDictionary policy, out string reasonForNotAnalyzing) { diff --git a/src/BinSkim.Rules/ElfRules/BA3001.EnablePositionIndependentExecutable.cs b/src/BinSkim.Rules/ElfRules/BA3001.EnablePositionIndependentExecutable.cs index 42220144..9c4bc62f 100644 --- a/src/BinSkim.Rules/ElfRules/BA3001.EnablePositionIndependentExecutable.cs +++ b/src/BinSkim.Rules/ElfRules/BA3001.EnablePositionIndependentExecutable.cs @@ -30,7 +30,7 @@ public class EnablePositionIndependentExecutable : ElfBinarySkimmer /// public override MultiformatMessageString FullDescription => new MultiformatMessageString { Text = RuleResources.BA3001_EnablePositionIndependentExecutable_Description }; - protected override IEnumerable MessageResourceNames => new string[] { + protected override ICollection MessageResourceNames => new string[] { nameof(RuleResources.BA3001_Pass_Executable), nameof(RuleResources.BA3001_Pass_Library), nameof(RuleResources.BA3001_Error), diff --git a/src/BinSkim.Rules/ElfRules/BA3002.DoNotMarkStackAsExecutable.cs b/src/BinSkim.Rules/ElfRules/BA3002.DoNotMarkStackAsExecutable.cs index 454739c8..bb0fe22f 100644 --- a/src/BinSkim.Rules/ElfRules/BA3002.DoNotMarkStackAsExecutable.cs +++ b/src/BinSkim.Rules/ElfRules/BA3002.DoNotMarkStackAsExecutable.cs @@ -33,7 +33,7 @@ public class DoNotMarkStackAsExecutable : ElfBinarySkimmer /// public override MultiformatMessageString FullDescription => new MultiformatMessageString { Text = RuleResources.BA3002_DoNotMarkStackAsExecutable_Description }; - protected override IEnumerable MessageResourceNames => new string[] { + protected override ICollection MessageResourceNames => new string[] { nameof(RuleResources.BA3002_Pass), nameof(RuleResources.BA3002_Error_StackExec), nameof(RuleResources.BA3002_Error_NoStackSeg), diff --git a/src/BinSkim.Rules/ElfRules/BA3004.GenerateRequiredSymbolFormat.cs b/src/BinSkim.Rules/ElfRules/BA3004.GenerateRequiredSymbolFormat.cs index 4de93e8f..1b01664f 100644 --- a/src/BinSkim.Rules/ElfRules/BA3004.GenerateRequiredSymbolFormat.cs +++ b/src/BinSkim.Rules/ElfRules/BA3004.GenerateRequiredSymbolFormat.cs @@ -26,7 +26,7 @@ public class GenerateRequiredSymbolFormat : ElfBinarySkimmer /// public override MultiformatMessageString FullDescription => new MultiformatMessageString { Text = RuleResources.BA3004_GenerateRequiredSymbolFormat_Description }; - protected override IEnumerable MessageResourceNames => new string[] { + protected override ICollection MessageResourceNames => new string[] { nameof(RuleResources.BA3004_Pass), nameof(RuleResources.BA3004_Error), nameof(RuleResources.NotApplicable_InvalidMetadata) diff --git a/src/BinSkim.Rules/ElfRules/BA3006.EnableNonExecutableStack.cs b/src/BinSkim.Rules/ElfRules/BA3006.EnableNonExecutableStack.cs index e9706055..cca02438 100644 --- a/src/BinSkim.Rules/ElfRules/BA3006.EnableNonExecutableStack.cs +++ b/src/BinSkim.Rules/ElfRules/BA3006.EnableNonExecutableStack.cs @@ -32,7 +32,7 @@ public class EnableNonExecutableStack : ElfBinarySkimmer public override MultiformatMessageString FullDescription => new MultiformatMessageString { Text = RuleResources.BA3006_EnableNonExecutableStack_Description }; - protected override IEnumerable MessageResourceNames => new string[] { + protected override ICollection MessageResourceNames => new string[] { nameof(RuleResources.BA3006_Pass), nameof(RuleResources.BA3006_Error), nameof(RuleResources.NotApplicable_InvalidMetadata) diff --git a/src/BinSkim.Rules/ElfRules/BA3010.EnableReadOnlyRelocations.cs b/src/BinSkim.Rules/ElfRules/BA3010.EnableReadOnlyRelocations.cs index 20023f93..4d082b13 100644 --- a/src/BinSkim.Rules/ElfRules/BA3010.EnableReadOnlyRelocations.cs +++ b/src/BinSkim.Rules/ElfRules/BA3010.EnableReadOnlyRelocations.cs @@ -31,7 +31,7 @@ public class EnableReadOnlyRelocations : ElfBinarySkimmer /// public override MultiformatMessageString FullDescription => new MultiformatMessageString { Text = RuleResources.BA3010_EnableReadOnlyRelocations_Description }; - protected override IEnumerable MessageResourceNames => new string[] { + protected override ICollection MessageResourceNames => new string[] { nameof(RuleResources.BA3010_Pass), nameof(RuleResources.BA3010_Error), nameof(RuleResources.NotApplicable_InvalidMetadata) diff --git a/src/BinSkim.Rules/ElfRules/BA3011.EnableBindNow.cs b/src/BinSkim.Rules/ElfRules/BA3011.EnableBindNow.cs index 2faac036..061f590f 100644 --- a/src/BinSkim.Rules/ElfRules/BA3011.EnableBindNow.cs +++ b/src/BinSkim.Rules/ElfRules/BA3011.EnableBindNow.cs @@ -34,7 +34,7 @@ public class EnableBindNow : ElfBinarySkimmer /// public override MultiformatMessageString FullDescription => new MultiformatMessageString { Text = RuleResources.BA3011_EnableBindNow_Description }; - protected override IEnumerable MessageResourceNames => new string[] { + protected override ICollection MessageResourceNames => new string[] { nameof(RuleResources.BA3011_Pass), nameof(RuleResources.BA3011_Error), nameof(RuleResources.NotApplicable_InvalidMetadata) diff --git a/src/BinSkim.Rules/ElfRules/BA3030.UseGccCheckedFunctions.cs b/src/BinSkim.Rules/ElfRules/BA3030.UseGccCheckedFunctions.cs index 9bec4a37..d3701776 100644 --- a/src/BinSkim.Rules/ElfRules/BA3030.UseGccCheckedFunctions.cs +++ b/src/BinSkim.Rules/ElfRules/BA3030.UseGccCheckedFunctions.cs @@ -112,7 +112,7 @@ public class UseGccCheckedFunctions : ElfBinarySkimmer /// public override MultiformatMessageString FullDescription => new MultiformatMessageString { Text = RuleResources.BA3030_UseGccCheckedFunctions_Description }; - protected override IEnumerable MessageResourceNames => new string[] { + protected override ICollection MessageResourceNames => new string[] { nameof(RuleResources.BA3030_Pass_AllFunctionsChecked), nameof(RuleResources.BA3030_Pass_SomeFunctionsChecked), nameof(RuleResources.BA3030_Pass_NoCheckableFunctions), diff --git a/src/BinSkim.Rules/ElfRules/BA3031.EnableClangSafeStack.cs b/src/BinSkim.Rules/ElfRules/BA3031.EnableClangSafeStack.cs index 358192ef..e99711d7 100644 --- a/src/BinSkim.Rules/ElfRules/BA3031.EnableClangSafeStack.cs +++ b/src/BinSkim.Rules/ElfRules/BA3031.EnableClangSafeStack.cs @@ -35,7 +35,7 @@ public class EnableClangSafeStack : ElfBinarySkimmer /// public override MultiformatMessageString FullDescription => new MultiformatMessageString { Text = RuleResources.BA3031_EnableClangSafeStack_Description }; - protected override IEnumerable MessageResourceNames => new string[] { + protected override ICollection MessageResourceNames => new string[] { nameof(RuleResources.BA3031_Pass), nameof(RuleResources.BA3031_Error), nameof(RuleResources.BA3031_Error_ClangVersionMayNeedUpgrade), diff --git a/src/BinSkim.Rules/MachORules/BA5001.EnablePositionIndependentExecutable.cs b/src/BinSkim.Rules/MachORules/BA5001.EnablePositionIndependentExecutable.cs index 3d141cf6..bf682522 100644 --- a/src/BinSkim.Rules/MachORules/BA5001.EnablePositionIndependentExecutable.cs +++ b/src/BinSkim.Rules/MachORules/BA5001.EnablePositionIndependentExecutable.cs @@ -28,7 +28,7 @@ public class EnablePositionIndependentExecutableMachO : MachOBinarySkimmer /// public override MultiformatMessageString FullDescription => new MultiformatMessageString { Text = RuleResources.BA5001_EnablePositionIndependentExecutable_Description }; - protected override IEnumerable MessageResourceNames => new string[] { + protected override ICollection MessageResourceNames => new string[] { nameof(RuleResources.BA5001_Pass), nameof(RuleResources.BA5001_Error), nameof(RuleResources.NotApplicable_InvalidMetadata) diff --git a/src/BinSkim.Rules/MachORules/BA5002.DoNotAllowExecutableStack.cs b/src/BinSkim.Rules/MachORules/BA5002.DoNotAllowExecutableStack.cs index 9e9ee94a..afab47a1 100644 --- a/src/BinSkim.Rules/MachORules/BA5002.DoNotAllowExecutableStack.cs +++ b/src/BinSkim.Rules/MachORules/BA5002.DoNotAllowExecutableStack.cs @@ -28,7 +28,7 @@ public class DoNotAllowExecutableStack : MachOBinarySkimmer /// public override MultiformatMessageString FullDescription => new MultiformatMessageString { Text = RuleResources.BA5002_DoNotAllowExecutableStack_Description }; - protected override IEnumerable MessageResourceNames => new string[] { + protected override ICollection MessageResourceNames => new string[] { nameof(RuleResources.BA5002_Pass), nameof(RuleResources.BA5002_Error), nameof(RuleResources.NotApplicable_InvalidMetadata) diff --git a/src/BinSkim.Rules/PERules/BA2001.LoadImagesAboveFourGigabyteAddress.cs b/src/BinSkim.Rules/PERules/BA2001.LoadImagesAboveFourGigabyteAddress.cs index fc1442b2..f08b647f 100644 --- a/src/BinSkim.Rules/PERules/BA2001.LoadImagesAboveFourGigabyteAddress.cs +++ b/src/BinSkim.Rules/PERules/BA2001.LoadImagesAboveFourGigabyteAddress.cs @@ -38,7 +38,7 @@ public class LoadImageAboveFourGigabyteAddress : PEBinarySkimmerBase /// public override MultiformatMessageString FullDescription => new MultiformatMessageString { Text = RuleResources.BA2001_LoadImageAboveFourGigabyteAddress_Description }; - protected override IEnumerable MessageResourceNames => new string[] { + protected override ICollection MessageResourceNames => new string[] { nameof(RuleResources.BA2001_Pass), nameof(RuleResources.BA2001_Error), nameof(RuleResources.NotApplicable_InvalidMetadata) diff --git a/src/BinSkim.Rules/PERules/BA2002.DoNotIncorporateVulnerableDependencies.cs b/src/BinSkim.Rules/PERules/BA2002.DoNotIncorporateVulnerableDependencies.cs index 76740e7b..004b2580 100644 --- a/src/BinSkim.Rules/PERules/BA2002.DoNotIncorporateVulnerableDependencies.cs +++ b/src/BinSkim.Rules/PERules/BA2002.DoNotIncorporateVulnerableDependencies.cs @@ -29,7 +29,7 @@ public class DoNotIncorporateVulnerableDependencies : WindowsBinaryAndPdbSkimmer /// public override MultiformatMessageString FullDescription => new MultiformatMessageString { Text = RuleResources.BA2002_DoNotIncorporateVulnerableBinaries_Description }; - protected override IEnumerable MessageResourceNames => new string[] { + protected override ICollection MessageResourceNames => new string[] { nameof(RuleResources.BA2002_Pass), nameof(RuleResources.BA2002_Error), nameof(RuleResources.NotApplicable_InvalidMetadata) diff --git a/src/BinSkim.Rules/PERules/BA2004.EnableSecureSourceCodeHashing.cs b/src/BinSkim.Rules/PERules/BA2004.EnableSecureSourceCodeHashing.cs index e1b44224..56e0fb7f 100644 --- a/src/BinSkim.Rules/PERules/BA2004.EnableSecureSourceCodeHashing.cs +++ b/src/BinSkim.Rules/PERules/BA2004.EnableSecureSourceCodeHashing.cs @@ -38,7 +38,7 @@ public class EnableSecureSourceCodeHashing : WindowsBinaryAndPdbSkimmerBase, IOp public override MultiformatMessageString FullDescription => new MultiformatMessageString { Text = RuleResources.BA2004_EnableSecureSourceCodeHashing_Description }; - protected override IEnumerable MessageResourceNames => new string[] { + protected override ICollection MessageResourceNames => new string[] { nameof(RuleResources.BA2004_Pass), nameof(RuleResources.BA2004_Warning_NativeWithInsecureStaticLibraryCompilands), nameof(RuleResources.BA2004_Error_Managed), diff --git a/src/BinSkim.Rules/PERules/BA2005.DoNotShipVulnerableBinaries.cs b/src/BinSkim.Rules/PERules/BA2005.DoNotShipVulnerableBinaries.cs index bf3c3c73..043feb89 100644 --- a/src/BinSkim.Rules/PERules/BA2005.DoNotShipVulnerableBinaries.cs +++ b/src/BinSkim.Rules/PERules/BA2005.DoNotShipVulnerableBinaries.cs @@ -29,7 +29,7 @@ public class DoNotShipVulnerableBinaries : WindowsBinarySkimmerBase, IOptionsPro /// public override MultiformatMessageString FullDescription => new MultiformatMessageString { Text = RuleResources.BA2005_DoNotShipVulnerableBinaries_Description }; - protected override IEnumerable MessageResourceNames => new string[] { + protected override ICollection MessageResourceNames => new string[] { nameof(RuleResources.BA2005_Pass), nameof(RuleResources.BA2005_Error), nameof(RuleResources.BA2005_Error_CouldNotParseVersion), diff --git a/src/BinSkim.Rules/PERules/BA2006.BuildWithSecureTools.cs b/src/BinSkim.Rules/PERules/BA2006.BuildWithSecureTools.cs index 21e10aa9..b3ba4e1d 100644 --- a/src/BinSkim.Rules/PERules/BA2006.BuildWithSecureTools.cs +++ b/src/BinSkim.Rules/PERules/BA2006.BuildWithSecureTools.cs @@ -35,7 +35,7 @@ public class BuildWithSecureTools : WindowsBinaryAndPdbSkimmerBase, IOptionsProv /// public override MultiformatMessageString FullDescription => new MultiformatMessageString { Text = RuleResources.BA2006_BuildWithSecureTools_Description }; - protected override IEnumerable MessageResourceNames => new string[] { + protected override ICollection MessageResourceNames => new string[] { nameof(RuleResources.BA2006_Error), nameof(RuleResources.BA2006_Error_BadModule), nameof(RuleResources.BA2006_Pass), diff --git a/src/BinSkim.Rules/PERules/BA2007.EnableCriticalCompilerWarnings.cs b/src/BinSkim.Rules/PERules/BA2007.EnableCriticalCompilerWarnings.cs index 47f540c4..5e626c54 100644 --- a/src/BinSkim.Rules/PERules/BA2007.EnableCriticalCompilerWarnings.cs +++ b/src/BinSkim.Rules/PERules/BA2007.EnableCriticalCompilerWarnings.cs @@ -39,7 +39,7 @@ public class EnableCriticalCompilerWarnings : WindowsBinaryAndPdbSkimmerBase, IO /// public override MultiformatMessageString FullDescription => new MultiformatMessageString { Text = RuleResources.BA2007_EnableCriticalCompilerWarnings_Description }; - protected override IEnumerable MessageResourceNames => new string[] { + protected override ICollection MessageResourceNames => new string[] { nameof(RuleResources.BA2007_Pass), nameof(RuleResources.BA2007_Error_WarningsDisabled), nameof(RuleResources.BA2007_Error_InsufficientWarningLevel), diff --git a/src/BinSkim.Rules/PERules/BA2008.EnableControlFlowGuard.cs b/src/BinSkim.Rules/PERules/BA2008.EnableControlFlowGuard.cs index 7085bbfa..6ebbcbdf 100644 --- a/src/BinSkim.Rules/PERules/BA2008.EnableControlFlowGuard.cs +++ b/src/BinSkim.Rules/PERules/BA2008.EnableControlFlowGuard.cs @@ -34,7 +34,7 @@ public class EnableControlFlowGuard : PEBinarySkimmerBase, IOptionsProvider /// public override MultiformatMessageString FullDescription => new MultiformatMessageString { Text = RuleResources.BA2008_EnableControlFlowGuard_Description }; - protected override IEnumerable MessageResourceNames => new string[] { + protected override ICollection MessageResourceNames => new string[] { nameof(RuleResources.BA2008_Pass), nameof(RuleResources.BA2008_Error), nameof(RuleResources.NotApplicable_InvalidMetadata), diff --git a/src/BinSkim.Rules/PERules/BA2009.EnableAddressSpaceLayoutRandomization.cs b/src/BinSkim.Rules/PERules/BA2009.EnableAddressSpaceLayoutRandomization.cs index 02f6bf70..9e1ba004 100644 --- a/src/BinSkim.Rules/PERules/BA2009.EnableAddressSpaceLayoutRandomization.cs +++ b/src/BinSkim.Rules/PERules/BA2009.EnableAddressSpaceLayoutRandomization.cs @@ -34,7 +34,7 @@ public class EnableAddressSpaceLayoutRandomization : PEBinarySkimmerBase /// public override MultiformatMessageString FullDescription => new MultiformatMessageString { Text = RuleResources.BA2009_EnableAddressSpaceLayoutRandomization_Description }; - protected override IEnumerable MessageResourceNames => new string[] { + protected override ICollection MessageResourceNames => new string[] { nameof(RuleResources.BA2009_Pass), nameof(RuleResources.BA2009_Error_NotDynamicBase), nameof(RuleResources.BA2009_Error_RelocsStripped), diff --git a/src/BinSkim.Rules/PERules/BA2010.DoNotMarkImportsSectionAsExecutable.cs b/src/BinSkim.Rules/PERules/BA2010.DoNotMarkImportsSectionAsExecutable.cs index 2335501f..a02b04b9 100644 --- a/src/BinSkim.Rules/PERules/BA2010.DoNotMarkImportsSectionAsExecutable.cs +++ b/src/BinSkim.Rules/PERules/BA2010.DoNotMarkImportsSectionAsExecutable.cs @@ -34,7 +34,7 @@ public class DoNotMarkImportsSectionAsExecutable : PEBinarySkimmerBase /// public override MultiformatMessageString FullDescription => new MultiformatMessageString { Text = RuleResources.BA2010_DoNotMarkImportsSectionAsExecutable_Description }; - protected override IEnumerable MessageResourceNames => new string[] { + protected override ICollection MessageResourceNames => new string[] { nameof(RuleResources.BA2010_Pass), nameof(RuleResources.BA2010_Error), nameof(RuleResources.NotApplicable_InvalidMetadata) diff --git a/src/BinSkim.Rules/PERules/BA2011.EnableStackProtection.cs b/src/BinSkim.Rules/PERules/BA2011.EnableStackProtection.cs index ae7b3e5d..20f07c96 100644 --- a/src/BinSkim.Rules/PERules/BA2011.EnableStackProtection.cs +++ b/src/BinSkim.Rules/PERules/BA2011.EnableStackProtection.cs @@ -33,7 +33,7 @@ public class EnableStackProtection : WindowsBinaryAndPdbSkimmerBase /// public override MultiformatMessageString FullDescription => new MultiformatMessageString { Text = RuleResources.BA2011_EnableStackProtection_Description }; - protected override IEnumerable MessageResourceNames => new string[] { + protected override ICollection MessageResourceNames => new string[] { nameof(RuleResources.BA2011_Pass), nameof(RuleResources.BA2011_Error), nameof(RuleResources.BA2011_Error_UnknownModuleLanguage), diff --git a/src/BinSkim.Rules/PERules/BA2012.DoNotModifyStackProtectionCookie.cs b/src/BinSkim.Rules/PERules/BA2012.DoNotModifyStackProtectionCookie.cs index e0ccfc3a..a2097b26 100644 --- a/src/BinSkim.Rules/PERules/BA2012.DoNotModifyStackProtectionCookie.cs +++ b/src/BinSkim.Rules/PERules/BA2012.DoNotModifyStackProtectionCookie.cs @@ -42,7 +42,7 @@ public class DoNotModifyStackProtectionCookie : PEBinarySkimmerBase /// public override MultiformatMessageString FullDescription => new MultiformatMessageString { Text = RuleResources.BA2012_DoNotModifyStackProtectionCookie_Description }; - protected override IEnumerable MessageResourceNames => new string[] { + protected override ICollection MessageResourceNames => new string[] { nameof(RuleResources.BA2012_Pass), nameof(RuleResources.BA2012_Pass_NoLoadConfig), nameof(RuleResources.BA2012_Error), diff --git a/src/BinSkim.Rules/PERules/BA2013.InitializeStackProtection.cs b/src/BinSkim.Rules/PERules/BA2013.InitializeStackProtection.cs index f9c8ff4f..8d391cda 100644 --- a/src/BinSkim.Rules/PERules/BA2013.InitializeStackProtection.cs +++ b/src/BinSkim.Rules/PERules/BA2013.InitializeStackProtection.cs @@ -37,7 +37,7 @@ public class InitializeStackProtection : WindowsBinaryAndPdbSkimmerBase /// public override MultiformatMessageString FullDescription => new MultiformatMessageString { Text = RuleResources.BA2013_InitializeStackProtection_Description }; - protected override IEnumerable MessageResourceNames => new string[] { + protected override ICollection MessageResourceNames => new string[] { nameof(RuleResources.BA2013_Pass), nameof(RuleResources.BA2013_Pass_NoCode), nameof(RuleResources.BA2013_NotApplicable_FeatureNotEnabled), diff --git a/src/BinSkim.Rules/PERules/BA2014.DoNotDisableStackProtectionForFunctions.cs b/src/BinSkim.Rules/PERules/BA2014.DoNotDisableStackProtectionForFunctions.cs index 1f7120ab..9498ef29 100644 --- a/src/BinSkim.Rules/PERules/BA2014.DoNotDisableStackProtectionForFunctions.cs +++ b/src/BinSkim.Rules/PERules/BA2014.DoNotDisableStackProtectionForFunctions.cs @@ -36,7 +36,7 @@ public class DoNotDisableStackProtectionForFunctions : WindowsBinaryAndPdbSkimme /// public override MultiformatMessageString FullDescription => new MultiformatMessageString { Text = RuleResources.BA2014_DoNotDisableStackProtectionForFunctions_Description }; - protected override IEnumerable MessageResourceNames => new string[] { + protected override ICollection MessageResourceNames => new string[] { nameof(RuleResources.BA2014_Pass), nameof(RuleResources.BA2014_Error), nameof(RuleResources.NotApplicable_InvalidMetadata) diff --git a/src/BinSkim.Rules/PERules/BA2015.EnableHighEntropyVirtualAddresses.cs b/src/BinSkim.Rules/PERules/BA2015.EnableHighEntropyVirtualAddresses.cs index 14e93262..a1d4082f 100644 --- a/src/BinSkim.Rules/PERules/BA2015.EnableHighEntropyVirtualAddresses.cs +++ b/src/BinSkim.Rules/PERules/BA2015.EnableHighEntropyVirtualAddresses.cs @@ -33,7 +33,7 @@ public class EnableHighEntropyVirtualAddresses : PEBinarySkimmerBase /// public override MultiformatMessageString FullDescription => new MultiformatMessageString { Text = RuleResources.BA2015_EnableHighEntropyVirtualAddresses_Description }; - protected override IEnumerable MessageResourceNames => new string[] { + protected override ICollection MessageResourceNames => new string[] { nameof(RuleResources.BA2015_Pass), nameof(RuleResources.BA2015_Error_NoHighEntropyVA), nameof(RuleResources.BA2015_Error_NoLargeAddressAware), diff --git a/src/BinSkim.Rules/PERules/BA2016.MarkImageAsNXCompatible.cs b/src/BinSkim.Rules/PERules/BA2016.MarkImageAsNXCompatible.cs index 38ab645f..02569bdb 100644 --- a/src/BinSkim.Rules/PERules/BA2016.MarkImageAsNXCompatible.cs +++ b/src/BinSkim.Rules/PERules/BA2016.MarkImageAsNXCompatible.cs @@ -36,7 +36,7 @@ public class MarkImageAsNXCompatible : PEBinarySkimmerBase /// public override MultiformatMessageString FullDescription => new MultiformatMessageString { Text = RuleResources.BA2016_MarkImageAsNXCompatible_Description }; - protected override IEnumerable MessageResourceNames => new string[] { + protected override ICollection MessageResourceNames => new string[] { nameof(RuleResources.BA2016_Pass), nameof(RuleResources.BA2016_Error), nameof(RuleResources.NotApplicable_InvalidMetadata) diff --git a/src/BinSkim.Rules/PERules/BA2018.EnableSafeSEH.cs b/src/BinSkim.Rules/PERules/BA2018.EnableSafeSEH.cs index 548a70e8..f2709bdb 100644 --- a/src/BinSkim.Rules/PERules/BA2018.EnableSafeSEH.cs +++ b/src/BinSkim.Rules/PERules/BA2018.EnableSafeSEH.cs @@ -34,7 +34,7 @@ public class EnableSafeSEH : PEBinarySkimmerBase /// public override MultiformatMessageString FullDescription => new MultiformatMessageString { Text = RuleResources.BA2018_EnableSafeSEH_Description }; - protected override IEnumerable MessageResourceNames => new string[] { + protected override ICollection MessageResourceNames => new string[] { nameof(RuleResources.BA2018_Pass), nameof(RuleResources.BA2018_Pass_NoSEH), nameof(RuleResources.BA2018_Error), diff --git a/src/BinSkim.Rules/PERules/BA2019.DoNotMarkWritableSectionsAsShared.cs b/src/BinSkim.Rules/PERules/BA2019.DoNotMarkWritableSectionsAsShared.cs index 8d622b25..9fff42d9 100644 --- a/src/BinSkim.Rules/PERules/BA2019.DoNotMarkWritableSectionsAsShared.cs +++ b/src/BinSkim.Rules/PERules/BA2019.DoNotMarkWritableSectionsAsShared.cs @@ -34,7 +34,7 @@ public class DoNotMarkWritableSectionsAsShared : PEBinarySkimmerBase /// public override MultiformatMessageString FullDescription => new MultiformatMessageString { Text = RuleResources.BA2019_DoNotMarkWritableSectionsAsShared_Description }; - protected override IEnumerable MessageResourceNames => new string[] { + protected override ICollection MessageResourceNames => new string[] { nameof(RuleResources.BA2019_Pass), nameof(RuleResources.BA2019_Error), nameof(RuleResources.NotApplicable_InvalidMetadata) diff --git a/src/BinSkim.Rules/PERules/BA2021.DoNotMarkWritableSectionsAsExecutable.cs b/src/BinSkim.Rules/PERules/BA2021.DoNotMarkWritableSectionsAsExecutable.cs index 717c7568..ead85037 100644 --- a/src/BinSkim.Rules/PERules/BA2021.DoNotMarkWritableSectionsAsExecutable.cs +++ b/src/BinSkim.Rules/PERules/BA2021.DoNotMarkWritableSectionsAsExecutable.cs @@ -33,7 +33,7 @@ public class DoNotMarkWritableSectionsAsExecutable : PEBinarySkimmerBase /// public override MultiformatMessageString FullDescription => new MultiformatMessageString { Text = RuleResources.BA2021_DoNotMarkWritableSectionsAsExecutable_Description }; - protected override IEnumerable MessageResourceNames => new string[] { + protected override ICollection MessageResourceNames => new string[] { nameof(RuleResources.BA2021_Pass), nameof(RuleResources.BA2021_Error), nameof(RuleResources.BA2021_Error_UnexpectedSectionAligment), diff --git a/src/BinSkim.Rules/PERules/BA2022.SignSecurely.cs b/src/BinSkim.Rules/PERules/BA2022.SignSecurely.cs index 69d78dac..276e394f 100644 --- a/src/BinSkim.Rules/PERules/BA2022.SignSecurely.cs +++ b/src/BinSkim.Rules/PERules/BA2022.SignSecurely.cs @@ -31,7 +31,7 @@ public class SignSecurely : WindowsBinarySkimmerBase /// public override MultiformatMessageString FullDescription => new MultiformatMessageString { Text = RuleResources.BA2022_SignCorrectly_Description }; - protected override IEnumerable MessageResourceNames => new string[] { + protected override ICollection MessageResourceNames => new string[] { nameof(RuleResources.BA2022_Pass), nameof(RuleResources.BA2022_Error_BadSigningAlgorithm), nameof(RuleResources.BA2022_Error_DidNotVerify), diff --git a/src/BinSkim.Rules/PERules/BA2024.EnableSpectreMitigations.cs b/src/BinSkim.Rules/PERules/BA2024.EnableSpectreMitigations.cs index dd6f3747..8b8990c6 100644 --- a/src/BinSkim.Rules/PERules/BA2024.EnableSpectreMitigations.cs +++ b/src/BinSkim.Rules/PERules/BA2024.EnableSpectreMitigations.cs @@ -43,7 +43,7 @@ public class EnableSpectreMitigations : WindowsBinaryAndPdbSkimmerBase, IOptions /// public override MultiformatMessageString FullDescription => new MultiformatMessageString { Text = RuleResources.BA2024_EnableSpectreMitigations_Description }; - protected override IEnumerable MessageResourceNames => new string[] { + protected override ICollection MessageResourceNames => new string[] { nameof(RuleResources.BA2024_Warning), nameof(RuleResources.BA2024_WarningMissingCommandLine), nameof(RuleResources.BA2024_Warning_SpectreMitigationUnknownNoCommandLine), diff --git a/src/BinSkim.Rules/PERules/BA2025.EnableShadowStack.cs b/src/BinSkim.Rules/PERules/BA2025.EnableShadowStack.cs index e7f5d186..6c62ecba 100644 --- a/src/BinSkim.Rules/PERules/BA2025.EnableShadowStack.cs +++ b/src/BinSkim.Rules/PERules/BA2025.EnableShadowStack.cs @@ -35,7 +35,7 @@ public class EnableShadowStack : WindowsBinaryAndPdbSkimmerBase Text = RuleResources.BA2025_EnableShadowStack_Description }; - protected override IEnumerable MessageResourceNames => new string[] { + protected override ICollection MessageResourceNames => new string[] { nameof(RuleResources.BA2025_Pass), nameof(RuleResources.BA2025_Warning), nameof(RuleResources.NotApplicable_InvalidMetadata) diff --git a/src/BinSkim.Rules/PERules/BA2026.EnableMicrosoftCompilerSdlSwitch.cs b/src/BinSkim.Rules/PERules/BA2026.EnableMicrosoftCompilerSdlSwitch.cs index 0caadbbc..e812572b 100644 --- a/src/BinSkim.Rules/PERules/BA2026.EnableMicrosoftCompilerSdlSwitch.cs +++ b/src/BinSkim.Rules/PERules/BA2026.EnableMicrosoftCompilerSdlSwitch.cs @@ -32,7 +32,7 @@ public class EnableMicrosoftCompilerSdlSwitch : WindowsBinaryAndPdbSkimmerBase Text = RuleResources.BA2026_EnableAdditionalSecurityChecks_Description }; - protected override IEnumerable MessageResourceNames => new string[] { + protected override ICollection MessageResourceNames => new string[] { nameof(RuleResources.BA2026_Pass), nameof(RuleResources.BA2026_Warning), nameof(RuleResources.NotApplicable_InvalidMetadata) diff --git a/src/BinSkim.Rules/PERules/BA2027.EnableSourceLink.cs b/src/BinSkim.Rules/PERules/BA2027.EnableSourceLink.cs index dd8a0fe4..df8fe4d3 100644 --- a/src/BinSkim.Rules/PERules/BA2027.EnableSourceLink.cs +++ b/src/BinSkim.Rules/PERules/BA2027.EnableSourceLink.cs @@ -28,7 +28,7 @@ public class EnableSourceLink : WindowsBinaryAndPdbSkimmerBase /// public override MultiformatMessageString FullDescription => new MultiformatMessageString { Text = RuleResources.BA2027_EnableSourceLink_Description }; - protected override IEnumerable MessageResourceNames => new string[] + protected override ICollection MessageResourceNames => new string[] { nameof(RuleResources.BA2027_Pass), nameof(RuleResources.BA2027_Warning) diff --git a/src/BinSkim.Rules/PERules/BA2029.EnableIntegrityCheck.cs b/src/BinSkim.Rules/PERules/BA2029.EnableIntegrityCheck.cs index 3c58ad92..b921c721 100644 --- a/src/BinSkim.Rules/PERules/BA2029.EnableIntegrityCheck.cs +++ b/src/BinSkim.Rules/PERules/BA2029.EnableIntegrityCheck.cs @@ -39,7 +39,7 @@ public class EnableIntegrityCheck : PEBinarySkimmerBase public override bool EnabledByDefault => false; - protected override IEnumerable MessageResourceNames => new string[] { + protected override ICollection MessageResourceNames => new string[] { nameof(RuleResources.BA2029_Pass), nameof(RuleResources.BA2029_Error), nameof(RuleResources.NotApplicable_InvalidMetadata) diff --git a/src/BinSkim.Rules/PERules/BA4001.ReportPortableExecutableCompilerData.cs b/src/BinSkim.Rules/PERules/BA4001.ReportPortableExecutableCompilerData.cs index 772187d4..0800706c 100644 --- a/src/BinSkim.Rules/PERules/BA4001.ReportPortableExecutableCompilerData.cs +++ b/src/BinSkim.Rules/PERules/BA4001.ReportPortableExecutableCompilerData.cs @@ -32,7 +32,7 @@ public class ReportPECompilerData : WindowsBinaryAndPdbSkimmerBase, IOptionsProv /// public override MultiformatMessageString FullDescription => new MultiformatMessageString { Text = RuleResources.BA4001_ReportPECompilerData_Description }; - protected override IEnumerable MessageResourceNames => Array.Empty(); + protected override ICollection MessageResourceNames => Array.Empty(); public IEnumerable GetOptions() { diff --git a/src/BinSkim.Rules/PERules/BA6001.DisableIncrementalLinkingInReleaseBuilds.cs b/src/BinSkim.Rules/PERules/BA6001.DisableIncrementalLinkingInReleaseBuilds.cs index 9228fe20..d10e2c7a 100644 --- a/src/BinSkim.Rules/PERules/BA6001.DisableIncrementalLinkingInReleaseBuilds.cs +++ b/src/BinSkim.Rules/PERules/BA6001.DisableIncrementalLinkingInReleaseBuilds.cs @@ -34,7 +34,7 @@ public class DisableIncrementalLinkingInReleaseBuilds : WindowsBinaryAndPdbSkimm public override MultiformatMessageString FullDescription => new MultiformatMessageString { Text = RuleResources.BA6001_DisableIncrementalLinkingInReleaseBuilds_Description }; - protected override IEnumerable MessageResourceNames => new string[] { + protected override ICollection MessageResourceNames => new string[] { nameof(RuleResources.BA6001_Pass), nameof(RuleResources.BA6001_Warning), nameof(RuleResources.NotApplicable_InvalidMetadata) diff --git a/src/BinSkim.Rules/PERules/BA6002.EliminateDuplicateStrings.cs b/src/BinSkim.Rules/PERules/BA6002.EliminateDuplicateStrings.cs index 60821ad1..d8455f43 100644 --- a/src/BinSkim.Rules/PERules/BA6002.EliminateDuplicateStrings.cs +++ b/src/BinSkim.Rules/PERules/BA6002.EliminateDuplicateStrings.cs @@ -34,7 +34,7 @@ public class EliminateDuplicateStrings : WindowsBinaryAndPdbSkimmerBase public override MultiformatMessageString FullDescription => new MultiformatMessageString { Text = RuleResources.BA6002_EliminateDuplicateStrings_Description }; - protected override IEnumerable MessageResourceNames => new string[] { + protected override ICollection MessageResourceNames => new string[] { nameof(RuleResources.BA6002_Pass), nameof(RuleResources.BA6002_Warning), nameof(RuleResources.NotApplicable_InvalidMetadata) diff --git a/src/BinSkim.Rules/PERules/BA6004.EnableComdatFolding.cs b/src/BinSkim.Rules/PERules/BA6004.EnableComdatFolding.cs index ab709872..4fa0b046 100644 --- a/src/BinSkim.Rules/PERules/BA6004.EnableComdatFolding.cs +++ b/src/BinSkim.Rules/PERules/BA6004.EnableComdatFolding.cs @@ -34,7 +34,7 @@ public class EnableComdatFolding : WindowsBinaryAndPdbSkimmerBase public override MultiformatMessageString FullDescription => new MultiformatMessageString { Text = RuleResources.BA6004_EnableCOMDATFolding_Description }; - protected override IEnumerable MessageResourceNames => new string[] { + protected override ICollection MessageResourceNames => new string[] { nameof(RuleResources.BA6004_Pass), nameof(RuleResources.BA6004_Warning_EnabledForDebug), nameof(RuleResources.BA6004_Warning_DisabledForRelease), diff --git a/src/BinSkim.Rules/PERules/BA6005.EnableOptimizeReferences.cs b/src/BinSkim.Rules/PERules/BA6005.EnableOptimizeReferences.cs index a5867e3a..926d1fc5 100644 --- a/src/BinSkim.Rules/PERules/BA6005.EnableOptimizeReferences.cs +++ b/src/BinSkim.Rules/PERules/BA6005.EnableOptimizeReferences.cs @@ -34,7 +34,7 @@ public class EnableOptimizeReferences : WindowsBinaryAndPdbSkimmerBase public override MultiformatMessageString FullDescription => new MultiformatMessageString { Text = RuleResources.BA6005_EnableOptimizeReferences_Description }; - protected override IEnumerable MessageResourceNames => new string[] { + protected override ICollection MessageResourceNames => new string[] { nameof(RuleResources.BA6005_Pass), nameof(RuleResources.BA6005_Warning), nameof(RuleResources.NotApplicable_InvalidMetadata) diff --git a/src/BinSkim.Rules/PERules/BA6006.EnableLinkTimeCodeGeneration.cs b/src/BinSkim.Rules/PERules/BA6006.EnableLinkTimeCodeGeneration.cs index 25c6b4b5..0d07cfb5 100644 --- a/src/BinSkim.Rules/PERules/BA6006.EnableLinkTimeCodeGeneration.cs +++ b/src/BinSkim.Rules/PERules/BA6006.EnableLinkTimeCodeGeneration.cs @@ -34,7 +34,7 @@ public class EnableLinkTimeCodeGeneration : WindowsBinaryAndPdbSkimmerBase public override MultiformatMessageString FullDescription => new MultiformatMessageString { Text = RuleResources.BA6006_EnableLinkTimeCodeGeneration_Description }; - protected override IEnumerable MessageResourceNames => new string[] { + protected override ICollection MessageResourceNames => new string[] { nameof(RuleResources.BA6006_Pass), nameof(RuleResources.BA6006_Warning), nameof(RuleResources.NotApplicable_InvalidMetadata) diff --git a/src/sarif-sdk b/src/sarif-sdk index fd6e6158..a9c7b1b3 160000 --- a/src/sarif-sdk +++ b/src/sarif-sdk @@ -1 +1 @@ -Subproject commit fd6e6158856bffce610068549ae41082bd23dc16 +Subproject commit a9c7b1b3f5122b3644c2645bd8a3b0d36e55fe37