diff --git a/Public/Src/Engine/UnitTests/Scheduler.IntegrationTest/BaselineTests.cs b/Public/Src/Engine/UnitTests/Scheduler.IntegrationTest/BaselineTests.cs index dc138784b..2ad1f8418 100644 --- a/Public/Src/Engine/UnitTests/Scheduler.IntegrationTest/BaselineTests.cs +++ b/Public/Src/Engine/UnitTests/Scheduler.IntegrationTest/BaselineTests.cs @@ -1543,7 +1543,7 @@ namespace IntegrationTest.BuildXL.Scheduler } } -#if MICROSOFT_INTERNAL +#if (MICROSOFT_INTERNAL && NETCOREAPP) /// /// This test to ensure that CredentialScanner detects the credentials when passed in environment variables and logs a warning in this case. /// Most of these test cases are an assumption of what the credentialscanner might or might not detect as a credential. @@ -1572,7 +1572,7 @@ namespace IntegrationTest.BuildXL.Scheduler } #endif -#if MICROSOFT_INTERNAL +#if (MICROSOFT_INTERNAL && NETCOREAPP) /// /// /credScanEnvironmentVariablesAllowList flag allows the user to pass envVars which needs to be skipped by the CredScan library. /// This test used to test if that functionality is working or not. diff --git a/Public/Src/Pips/Dll/BuildXL.Pips.dsc b/Public/Src/Pips/Dll/BuildXL.Pips.dsc index c6eff04bf..24eeeb308 100644 --- a/Public/Src/Pips/Dll/BuildXL.Pips.dsc +++ b/Public/Src/Pips/Dll/BuildXL.Pips.dsc @@ -26,13 +26,14 @@ export const dll = BuildXLSdk.library({ importFrom("BuildXL.Utilities").Storage.dll, importFrom("BuildXL.Utilities").Collections.dll, importFrom("BuildXL.Utilities").Configuration.dll, - ...addIf(BuildXLSdk.Flags.isMicrosoftInternal, - importFrom("Microsoft.Automata.SRM").withQualifier({ targetFramework: "netstandard2.1" }).pkg, - importFrom("Microsoft.ApplicationInsights").pkg, - importFrom("Microsoft.Security.RegularExpressions").pkg, - importFrom("Microsoft.Security.CredScan.KnowledgeBase").pkg, - importFrom("Microsoft.Security.CredScan.KnowledgeBase.Client").pkg, - importFrom("Microsoft.Security.CredScan.KnowledgeBase.Ruleset").pkg ), + ...addIf(BuildXLSdk.Flags.isMicrosoftInternal && qualifier.targetFramework === "net6.0", + importFrom("Microsoft.Automata.SRM").withQualifier({ targetFramework: "netstandard2.1" }).pkg, + importFrom("Microsoft.ApplicationInsights").pkg, + importFrom("Microsoft.Security.RegularExpressions").pkg, + importFrom("Microsoft.Security.CredScan.KnowledgeBase").pkg, + importFrom("Microsoft.Security.CredScan.KnowledgeBase.Client").pkg, + importFrom("Microsoft.Security.CredScan.KnowledgeBase.Ruleset").pkg + ), ], internalsVisibleTo: [ "BuildXL.Scheduler", diff --git a/Public/Src/Pips/Dll/CredentialScanner.cs b/Public/Src/Pips/Dll/CredentialScanner.cs index 5d31939f8..ab65ea062 100644 --- a/Public/Src/Pips/Dll/CredentialScanner.cs +++ b/Public/Src/Pips/Dll/CredentialScanner.cs @@ -4,7 +4,7 @@ using System.Collections.Concurrent; using System.Linq; using BuildXL.Pips.Graph; using BuildXL.Utilities.Tracing; -#if MICROSOFT_INTERNAL +#if (MICROSOFT_INTERNAL && NETCOREAPP) using Microsoft.Security.CredScan.ClientLib; using Microsoft.Security.CredScan.KnowledgeBase.Client; #endif @@ -32,7 +32,7 @@ namespace BuildXL.Pips.Builders /// public CounterCollection Counters; -#if MICROSOFT_INTERNAL +#if (MICROSOFT_INTERNAL && NETCOREAPP) /// /// CredentialScannerFactory object /// @@ -45,7 +45,7 @@ namespace BuildXL.Pips.Builders /// public CredentialScanner(bool enableCredScan) { -#if MICROSOFT_INTERNAL +#if (MICROSOFT_INTERNAL && NETCOREAPP) EnableCredScan = enableCredScan; if (enableCredScan) { @@ -60,7 +60,7 @@ namespace BuildXL.Pips.Builders /// public bool CredentialsDetected(string envVarKey, string envVarValue) { -#if MICROSOFT_INTERNAL +#if (MICROSOFT_INTERNAL && NETCOREAPP) // Converting the env variable into the below pattern. // Ex: string input = "password: Cr3d5c@n_D3m0_P@55w0rd"; // The above example is one of the suggested patterns to represent the input string which is to be passed to the CredScan method. diff --git a/cg/nuget/cgmanifest.json b/cg/nuget/cgmanifest.json index 26a6a47c6..4e8c1b9ca 100644 --- a/cg/nuget/cgmanifest.json +++ b/cg/nuget/cgmanifest.json @@ -2796,7 +2796,7 @@ "Type": "NuGet", "NuGet": { "Name": "Strings.Interop", - "Version": "1.5.0-alpha-0100-g6ee5829558" + "Version": "1.10.0" } } }, diff --git a/config.microsoftInternal.dsc b/config.microsoftInternal.dsc index c56609bf2..43fb2f134 100644 --- a/config.microsoftInternal.dsc +++ b/config.microsoftInternal.dsc @@ -88,7 +88,7 @@ export const pkgs = isMicrosoftInternal ? [ { id: "Microsoft.Internal.Analyzers", version: "2.6.11"}, // CredScan - { id: "Strings.Interop", version: "1.5.0-alpha-0100-g6ee5829558" }, + { id: "Strings.Interop", version: "1.10.0" }, { id: "RE2.Managed", version: "1.10.0" }, { id: "Microsoft.Automata.SRM", version: "2.0.0-alpha3", dependentPackageIdsToSkip: ["System.Collections.Immutable"] }, { id: "Crc32.NET", version: "1.2.0" },