Skip to content

Commit

Permalink
Update Sarif.Sdk submodule (#991)
Browse files Browse the repository at this point in the history
* Update to Branch

* Update SDK
  • Loading branch information
shaopeng-gh authored Apr 29, 2024
1 parent 423cba6 commit 2f4b19c
Show file tree
Hide file tree
Showing 45 changed files with 46 additions and 45 deletions.
3 changes: 2 additions & 1 deletion ReleaseHistory.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 9e95888](https://github.com/microsoft/sarif-sdk/compare/bc8cb57...9e95888). Reference [SARIF SDK Release History](https://github.com/microsoft/sarif-sdk/blob/9e95888/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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public class EnableStackProtector : DwarfSkimmerBase
public override MultiformatMessageString FullDescription =>
new MultiformatMessageString { Text = RuleResources.BA3003_EnableStackProtector_Description };

protected override IEnumerable<string> MessageResourceNames => new string[] {
protected override ICollection<string> MessageResourceNames => new string[] {
nameof(RuleResources.BA3003_Pass),
nameof(RuleResources.BA3003_Error),
nameof(RuleResources.NotApplicable_InvalidMetadata)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public class EnableStackClashProtection : DwarfSkimmerBase
public override MultiformatMessageString FullDescription =>
new MultiformatMessageString { Text = RuleResources.BA3005_EnableStackClashProtection_Description };

protected override IEnumerable<string> MessageResourceNames => new string[] {
protected override ICollection<string> MessageResourceNames => new string[] {
nameof(RuleResources.BA3005_Pass),
nameof(RuleResources.BA3005_Error),
nameof(RuleResources.NotApplicable_InvalidMetadata)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public class ReportElfOrMachoCompilerData : DwarfSkimmerBase, IOptionsProvider
/// </summary>
public override MultiformatMessageString FullDescription => new MultiformatMessageString { Text = RuleResources.BA4002_ReportELFCompilerData_Description };

protected override IEnumerable<string> MessageResourceNames => Array.Empty<string>();
protected override ICollection<string> MessageResourceNames => Array.Empty<string>();

public override AnalysisApplicability CanAnalyzeDwarf(IDwarfBinary target, Sarif.PropertiesDictionary policy, out string reasonForNotAnalyzing)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public class EnablePositionIndependentExecutable : ElfBinarySkimmer
/// </summary>
public override MultiformatMessageString FullDescription => new MultiformatMessageString { Text = RuleResources.BA3001_EnablePositionIndependentExecutable_Description };

protected override IEnumerable<string> MessageResourceNames => new string[] {
protected override ICollection<string> MessageResourceNames => new string[] {
nameof(RuleResources.BA3001_Pass_Executable),
nameof(RuleResources.BA3001_Pass_Library),
nameof(RuleResources.BA3001_Error),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public class DoNotMarkStackAsExecutable : ElfBinarySkimmer
/// </summary>
public override MultiformatMessageString FullDescription => new MultiformatMessageString { Text = RuleResources.BA3002_DoNotMarkStackAsExecutable_Description };

protected override IEnumerable<string> MessageResourceNames => new string[] {
protected override ICollection<string> MessageResourceNames => new string[] {
nameof(RuleResources.BA3002_Pass),
nameof(RuleResources.BA3002_Error_StackExec),
nameof(RuleResources.BA3002_Error_NoStackSeg),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public class GenerateRequiredSymbolFormat : ElfBinarySkimmer
/// </summary>
public override MultiformatMessageString FullDescription => new MultiformatMessageString { Text = RuleResources.BA3004_GenerateRequiredSymbolFormat_Description };

protected override IEnumerable<string> MessageResourceNames => new string[] {
protected override ICollection<string> MessageResourceNames => new string[] {
nameof(RuleResources.BA3004_Pass),
nameof(RuleResources.BA3004_Error),
nameof(RuleResources.NotApplicable_InvalidMetadata)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public class EnableNonExecutableStack : ElfBinarySkimmer
public override MultiformatMessageString FullDescription =>
new MultiformatMessageString { Text = RuleResources.BA3006_EnableNonExecutableStack_Description };

protected override IEnumerable<string> MessageResourceNames => new string[] {
protected override ICollection<string> MessageResourceNames => new string[] {
nameof(RuleResources.BA3006_Pass),
nameof(RuleResources.BA3006_Error),
nameof(RuleResources.NotApplicable_InvalidMetadata)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public class EnableReadOnlyRelocations : ElfBinarySkimmer
/// </summary>
public override MultiformatMessageString FullDescription => new MultiformatMessageString { Text = RuleResources.BA3010_EnableReadOnlyRelocations_Description };

protected override IEnumerable<string> MessageResourceNames => new string[] {
protected override ICollection<string> MessageResourceNames => new string[] {
nameof(RuleResources.BA3010_Pass),
nameof(RuleResources.BA3010_Error),
nameof(RuleResources.NotApplicable_InvalidMetadata)
Expand Down
2 changes: 1 addition & 1 deletion src/BinSkim.Rules/ElfRules/BA3011.EnableBindNow.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public class EnableBindNow : ElfBinarySkimmer
/// </summary>
public override MultiformatMessageString FullDescription => new MultiformatMessageString { Text = RuleResources.BA3011_EnableBindNow_Description };

protected override IEnumerable<string> MessageResourceNames => new string[] {
protected override ICollection<string> MessageResourceNames => new string[] {
nameof(RuleResources.BA3011_Pass),
nameof(RuleResources.BA3011_Error),
nameof(RuleResources.NotApplicable_InvalidMetadata)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ public class UseGccCheckedFunctions : ElfBinarySkimmer
/// </summary>
public override MultiformatMessageString FullDescription => new MultiformatMessageString { Text = RuleResources.BA3030_UseGccCheckedFunctions_Description };

protected override IEnumerable<string> MessageResourceNames => new string[] {
protected override ICollection<string> MessageResourceNames => new string[] {
nameof(RuleResources.BA3030_Pass_AllFunctionsChecked),
nameof(RuleResources.BA3030_Pass_SomeFunctionsChecked),
nameof(RuleResources.BA3030_Pass_NoCheckableFunctions),
Expand Down
2 changes: 1 addition & 1 deletion src/BinSkim.Rules/ElfRules/BA3031.EnableClangSafeStack.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public class EnableClangSafeStack : ElfBinarySkimmer
/// </summary>
public override MultiformatMessageString FullDescription => new MultiformatMessageString { Text = RuleResources.BA3031_EnableClangSafeStack_Description };

protected override IEnumerable<string> MessageResourceNames => new string[] {
protected override ICollection<string> MessageResourceNames => new string[] {
nameof(RuleResources.BA3031_Pass),
nameof(RuleResources.BA3031_Error),
nameof(RuleResources.BA3031_Error_ClangVersionMayNeedUpgrade),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public class EnablePositionIndependentExecutableMachO : MachOBinarySkimmer
/// </summary>
public override MultiformatMessageString FullDescription => new MultiformatMessageString { Text = RuleResources.BA5001_EnablePositionIndependentExecutable_Description };

protected override IEnumerable<string> MessageResourceNames => new string[] {
protected override ICollection<string> MessageResourceNames => new string[] {
nameof(RuleResources.BA5001_Pass),
nameof(RuleResources.BA5001_Error),
nameof(RuleResources.NotApplicable_InvalidMetadata)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public class DoNotAllowExecutableStack : MachOBinarySkimmer
/// </summary>
public override MultiformatMessageString FullDescription => new MultiformatMessageString { Text = RuleResources.BA5002_DoNotAllowExecutableStack_Description };

protected override IEnumerable<string> MessageResourceNames => new string[] {
protected override ICollection<string> MessageResourceNames => new string[] {
nameof(RuleResources.BA5002_Pass),
nameof(RuleResources.BA5002_Error),
nameof(RuleResources.NotApplicable_InvalidMetadata)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public class LoadImageAboveFourGigabyteAddress : PEBinarySkimmerBase
/// </summary>
public override MultiformatMessageString FullDescription => new MultiformatMessageString { Text = RuleResources.BA2001_LoadImageAboveFourGigabyteAddress_Description };

protected override IEnumerable<string> MessageResourceNames => new string[] {
protected override ICollection<string> MessageResourceNames => new string[] {
nameof(RuleResources.BA2001_Pass),
nameof(RuleResources.BA2001_Error),
nameof(RuleResources.NotApplicable_InvalidMetadata)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public class DoNotIncorporateVulnerableDependencies : WindowsBinaryAndPdbSkimmer
/// </summary>
public override MultiformatMessageString FullDescription => new MultiformatMessageString { Text = RuleResources.BA2002_DoNotIncorporateVulnerableBinaries_Description };

protected override IEnumerable<string> MessageResourceNames => new string[] {
protected override ICollection<string> MessageResourceNames => new string[] {
nameof(RuleResources.BA2002_Pass),
nameof(RuleResources.BA2002_Error),
nameof(RuleResources.NotApplicable_InvalidMetadata)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public class EnableSecureSourceCodeHashing : WindowsBinaryAndPdbSkimmerBase, IOp
public override MultiformatMessageString FullDescription => new MultiformatMessageString
{ Text = RuleResources.BA2004_EnableSecureSourceCodeHashing_Description };

protected override IEnumerable<string> MessageResourceNames => new string[] {
protected override ICollection<string> MessageResourceNames => new string[] {
nameof(RuleResources.BA2004_Pass),
nameof(RuleResources.BA2004_Warning_NativeWithInsecureStaticLibraryCompilands),
nameof(RuleResources.BA2004_Error_Managed),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public class DoNotShipVulnerableBinaries : WindowsBinarySkimmerBase, IOptionsPro
/// </summary>
public override MultiformatMessageString FullDescription => new MultiformatMessageString { Text = RuleResources.BA2005_DoNotShipVulnerableBinaries_Description };

protected override IEnumerable<string> MessageResourceNames => new string[] {
protected override ICollection<string> MessageResourceNames => new string[] {
nameof(RuleResources.BA2005_Pass),
nameof(RuleResources.BA2005_Error),
nameof(RuleResources.BA2005_Error_CouldNotParseVersion),
Expand Down
2 changes: 1 addition & 1 deletion src/BinSkim.Rules/PERules/BA2006.BuildWithSecureTools.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public class BuildWithSecureTools : WindowsBinaryAndPdbSkimmerBase, IOptionsProv
/// </summary>
public override MultiformatMessageString FullDescription => new MultiformatMessageString { Text = RuleResources.BA2006_BuildWithSecureTools_Description };

protected override IEnumerable<string> MessageResourceNames => new string[] {
protected override ICollection<string> MessageResourceNames => new string[] {
nameof(RuleResources.BA2006_Error),
nameof(RuleResources.BA2006_Error_BadModule),
nameof(RuleResources.BA2006_Pass),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public class EnableCriticalCompilerWarnings : WindowsBinaryAndPdbSkimmerBase, IO
/// </summary>
public override MultiformatMessageString FullDescription => new MultiformatMessageString { Text = RuleResources.BA2007_EnableCriticalCompilerWarnings_Description };

protected override IEnumerable<string> MessageResourceNames => new string[] {
protected override ICollection<string> MessageResourceNames => new string[] {
nameof(RuleResources.BA2007_Pass),
nameof(RuleResources.BA2007_Error_WarningsDisabled),
nameof(RuleResources.BA2007_Error_InsufficientWarningLevel),
Expand Down
2 changes: 1 addition & 1 deletion src/BinSkim.Rules/PERules/BA2008.EnableControlFlowGuard.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public class EnableControlFlowGuard : PEBinarySkimmerBase, IOptionsProvider
/// </summary>
public override MultiformatMessageString FullDescription => new MultiformatMessageString { Text = RuleResources.BA2008_EnableControlFlowGuard_Description };

protected override IEnumerable<string> MessageResourceNames => new string[] {
protected override ICollection<string> MessageResourceNames => new string[] {
nameof(RuleResources.BA2008_Pass),
nameof(RuleResources.BA2008_Error),
nameof(RuleResources.NotApplicable_InvalidMetadata),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public class EnableAddressSpaceLayoutRandomization : PEBinarySkimmerBase
/// </summary>
public override MultiformatMessageString FullDescription => new MultiformatMessageString { Text = RuleResources.BA2009_EnableAddressSpaceLayoutRandomization_Description };

protected override IEnumerable<string> MessageResourceNames => new string[] {
protected override ICollection<string> MessageResourceNames => new string[] {
nameof(RuleResources.BA2009_Pass),
nameof(RuleResources.BA2009_Error_NotDynamicBase),
nameof(RuleResources.BA2009_Error_RelocsStripped),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public class DoNotMarkImportsSectionAsExecutable : PEBinarySkimmerBase
/// </summary>
public override MultiformatMessageString FullDescription => new MultiformatMessageString { Text = RuleResources.BA2010_DoNotMarkImportsSectionAsExecutable_Description };

protected override IEnumerable<string> MessageResourceNames => new string[] {
protected override ICollection<string> MessageResourceNames => new string[] {
nameof(RuleResources.BA2010_Pass),
nameof(RuleResources.BA2010_Error),
nameof(RuleResources.NotApplicable_InvalidMetadata)
Expand Down
2 changes: 1 addition & 1 deletion src/BinSkim.Rules/PERules/BA2011.EnableStackProtection.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public class EnableStackProtection : WindowsBinaryAndPdbSkimmerBase
/// </summary>
public override MultiformatMessageString FullDescription => new MultiformatMessageString { Text = RuleResources.BA2011_EnableStackProtection_Description };

protected override IEnumerable<string> MessageResourceNames => new string[] {
protected override ICollection<string> MessageResourceNames => new string[] {
nameof(RuleResources.BA2011_Pass),
nameof(RuleResources.BA2011_Error),
nameof(RuleResources.BA2011_Error_UnknownModuleLanguage),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public class DoNotModifyStackProtectionCookie : PEBinarySkimmerBase
/// </summary>
public override MultiformatMessageString FullDescription => new MultiformatMessageString { Text = RuleResources.BA2012_DoNotModifyStackProtectionCookie_Description };

protected override IEnumerable<string> MessageResourceNames => new string[] {
protected override ICollection<string> MessageResourceNames => new string[] {
nameof(RuleResources.BA2012_Pass),
nameof(RuleResources.BA2012_Pass_NoLoadConfig),
nameof(RuleResources.BA2012_Error),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public class InitializeStackProtection : WindowsBinaryAndPdbSkimmerBase
/// </summary>
public override MultiformatMessageString FullDescription => new MultiformatMessageString { Text = RuleResources.BA2013_InitializeStackProtection_Description };

protected override IEnumerable<string> MessageResourceNames => new string[] {
protected override ICollection<string> MessageResourceNames => new string[] {
nameof(RuleResources.BA2013_Pass),
nameof(RuleResources.BA2013_Pass_NoCode),
nameof(RuleResources.BA2013_NotApplicable_FeatureNotEnabled),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public class DoNotDisableStackProtectionForFunctions : WindowsBinaryAndPdbSkimme
/// </summary>
public override MultiformatMessageString FullDescription => new MultiformatMessageString { Text = RuleResources.BA2014_DoNotDisableStackProtectionForFunctions_Description };

protected override IEnumerable<string> MessageResourceNames => new string[] {
protected override ICollection<string> MessageResourceNames => new string[] {
nameof(RuleResources.BA2014_Pass),
nameof(RuleResources.BA2014_Error),
nameof(RuleResources.NotApplicable_InvalidMetadata)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public class EnableHighEntropyVirtualAddresses : PEBinarySkimmerBase
/// </summary>
public override MultiformatMessageString FullDescription => new MultiformatMessageString { Text = RuleResources.BA2015_EnableHighEntropyVirtualAddresses_Description };

protected override IEnumerable<string> MessageResourceNames => new string[] {
protected override ICollection<string> MessageResourceNames => new string[] {
nameof(RuleResources.BA2015_Pass),
nameof(RuleResources.BA2015_Error_NoHighEntropyVA),
nameof(RuleResources.BA2015_Error_NoLargeAddressAware),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public class MarkImageAsNXCompatible : PEBinarySkimmerBase
/// </summary>
public override MultiformatMessageString FullDescription => new MultiformatMessageString { Text = RuleResources.BA2016_MarkImageAsNXCompatible_Description };

protected override IEnumerable<string> MessageResourceNames => new string[] {
protected override ICollection<string> MessageResourceNames => new string[] {
nameof(RuleResources.BA2016_Pass),
nameof(RuleResources.BA2016_Error),
nameof(RuleResources.NotApplicable_InvalidMetadata)
Expand Down
2 changes: 1 addition & 1 deletion src/BinSkim.Rules/PERules/BA2018.EnableSafeSEH.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public class EnableSafeSEH : PEBinarySkimmerBase
/// </summary>
public override MultiformatMessageString FullDescription => new MultiformatMessageString { Text = RuleResources.BA2018_EnableSafeSEH_Description };

protected override IEnumerable<string> MessageResourceNames => new string[] {
protected override ICollection<string> MessageResourceNames => new string[] {
nameof(RuleResources.BA2018_Pass),
nameof(RuleResources.BA2018_Pass_NoSEH),
nameof(RuleResources.BA2018_Error),
Expand Down
Loading

0 comments on commit 2f4b19c

Please sign in to comment.