From 9780de1afe2cdc06785cc3d532e91f1caf6389e1 Mon Sep 17 00:00:00 2001 From: Eddy Nakamura Date: Tue, 9 Mar 2021 18:37:11 -0300 Subject: [PATCH] Asset fingerprint (#276) * Provide an asset fingerprint. * Updating tests and adding platform to sql and mysql * updating tests * Improving asset platform and updating tests Co-authored-by: Michael Fanning --- ...101_002.GoogleOAuthCredentialsValidator.cs | 1 + .../SEC101_003.GoogleApiKeyValidator.cs | 1 + ...101_004.FacebookAppCredentialsValidator.cs | 1 + .../SEC101_005.SlackTokenValidator.cs | 1 + .../Security/SEC101_006.GitHubPatValidator.cs | 1 + ...EC101_007.GitHubAppCredentialsValidator.cs | 1 + .../SEC101_008.AwsCredentialsValidator.cs | 1 + ...SEC101_009.LinkedInCredentialsValidator.cs | 1 + .../Security/SEC101_010.SquarePatValidator.cs | 1 + .../SEC101_011.SquareCredentialsValidator.cs | 1 + .../SEC101_012.SlackWebhookValidator.cs | 1 + ...SEC101_014.FacebookAccessTokenValidator.cs | 1 + ...01_015.GoogleGCMServiceAccountValidator.cs | 1 + .../SEC101_016.StripeApiKeyValidator.cs | 1 + .../SEC101_017.NpmAuthorTokenValidator.cs | 1 + .../SEC101_023.AmazonMwsAuthTokenValidator.cs | 1 + ...SEC101_046.SqlConnectionStringValidator.cs | 9 +- ...C101_047.MySqlConnectionStringValidator.cs | 1 + .../Security/SEC101_102.AdoPatValidator.cs | 1 + ...01.EmailAddress_with_email_addresses.sarif | 40 +++++++ ...rializedCertificateStoreFile_default.sarif | 1 + ...1_001.HttpAuthorizationRequestHeader.sarif | 3 + .../SEC101_002.GoogleOAuthCredentials.sarif | 3 + .../SEC101_003.GoogleApiKey.sarif | 1 + .../SEC101_004.FacebookAppCredentials.sarif | 2 + .../SEC101_005.SlackTokens.sarif | 1 + .../SEC101_006.GitHubPat.sarif | 3 + .../SEC101_007.GitHubAppCredentials.sarif | 5 + .../SEC101_008.AwsCredentials.sarif | 4 + .../SEC101_009.LinkedInCredentials.sarif | 3 + .../SEC101_010.SquarePat.sarif | 3 + .../SEC101_011.SquareCredentials.sarif | 3 + .../SEC101_012.SlackWebhook.sarif | 1 + .../SEC101_013.CryptographicPrivateKey.sarif | 11 ++ .../SEC101_014.FacebookAccessToken.sarif | 2 + .../SEC101_015.GoogleGCMServiceAccount.sarif | 3 + .../SEC101_016.StripeApiKey.sarif | 4 + .../SEC101_017.NpmAuthorToken.sarif | 2 + .../SEC101_019.PicaticApiKey.sarif | 4 + ...EC101_022.PayPalBraintreeAccessToken.sarif | 2 + .../SEC101_024.TwilioApiKey.sarif | 2 + .../SEC101_025.SendGridApiKey.sarif | 1 + .../SEC101_026.MailgunApiKey.sarif | 1 + .../SEC101_027.MailChimpApiKey.sarif | 2 + .../SEC101_031.NuGetApiKey.sarif | 1 + .../SEC101_042.DynatraceToken.sarif | 2 + .../SEC101_043.ShopifySharedSecret.sarif | 2 + .../SEC101_044.ShopifyAccessToken.sarif | 3 + ...EC101_045.PostgreSqlConnectionString.sarif | 11 ++ .../SEC101_046.SqlConnectionString.sarif | 18 +++ .../SEC101_047.MySqlConnectionString.sarif | 16 +++ .../SEC101_048.CloudantConnectionString.sarif | 3 + .../SEC101_049.PSCredential.sarif | 3 + .../SEC101_050.SqlCredential.sarif | 2 + .../SEC101_051.GpgCredential.sarif | 4 + .../SEC101_052.ConvertToSecureString.sarif | 8 ++ .../ExpectedOutputs/SEC101_102.AdoPat.sarif | 2 + Src/Plugins/ValidatorBase.cs | 2 +- Src/Sarif.PatternMatcher/AssetPlatform.cs | 78 +++++++++++++ Src/Sarif.PatternMatcher/Fingerprint.cs | 105 ++++++++++++------ Src/Sarif.PatternMatcher/SearchSkimmer.cs | 15 ++- Src/Sarif.PatternMatcher/SharedUtilities.cs | 46 ++++++++ Targets/build.plugins.props | 5 +- 63 files changed, 417 insertions(+), 43 deletions(-) create mode 100644 Src/Sarif.PatternMatcher/AssetPlatform.cs create mode 100644 Src/Sarif.PatternMatcher/SharedUtilities.cs diff --git a/Src/Plugins/Security/SEC101_002.GoogleOAuthCredentialsValidator.cs b/Src/Plugins/Security/SEC101_002.GoogleOAuthCredentialsValidator.cs index eb9f8a3b..38a78a91 100644 --- a/Src/Plugins/Security/SEC101_002.GoogleOAuthCredentialsValidator.cs +++ b/Src/Plugins/Security/SEC101_002.GoogleOAuthCredentialsValidator.cs @@ -44,6 +44,7 @@ protected override string IsValidStaticHelper(ref string matchedPattern, { Id = id, Key = key, + Platform = nameof(AssetPlatform.Google), }.ToString(); return nameof(ValidationState.Unknown); diff --git a/Src/Plugins/Security/SEC101_003.GoogleApiKeyValidator.cs b/Src/Plugins/Security/SEC101_003.GoogleApiKeyValidator.cs index 7bd6d2bf..89a765c0 100644 --- a/Src/Plugins/Security/SEC101_003.GoogleApiKeyValidator.cs +++ b/Src/Plugins/Security/SEC101_003.GoogleApiKeyValidator.cs @@ -49,6 +49,7 @@ protected override string IsValidStaticHelper(ref string matchedPattern, fingerprintText = new Fingerprint { Key = matchedPattern, + Platform = nameof(AssetPlatform.Google), }.ToString(); return nameof(ValidationState.Unknown); diff --git a/Src/Plugins/Security/SEC101_004.FacebookAppCredentialsValidator.cs b/Src/Plugins/Security/SEC101_004.FacebookAppCredentialsValidator.cs index f0fa68ae..8991f685 100644 --- a/Src/Plugins/Security/SEC101_004.FacebookAppCredentialsValidator.cs +++ b/Src/Plugins/Security/SEC101_004.FacebookAppCredentialsValidator.cs @@ -53,6 +53,7 @@ protected override string IsValidStaticHelper(ref string matchedPattern, { Id = id, Key = key, + Platform = nameof(AssetPlatform.Facebook), }.ToString(); return nameof(ValidationState.Unknown); diff --git a/Src/Plugins/Security/SEC101_005.SlackTokenValidator.cs b/Src/Plugins/Security/SEC101_005.SlackTokenValidator.cs index 1fea4ed4..d4e81309 100644 --- a/Src/Plugins/Security/SEC101_005.SlackTokenValidator.cs +++ b/Src/Plugins/Security/SEC101_005.SlackTokenValidator.cs @@ -45,6 +45,7 @@ protected override string IsValidStaticHelper(ref string matchedPattern, fingerprintText = new Fingerprint { Key = matchedPattern, + Platform = nameof(AssetPlatform.Slack), }.ToString(); return nameof(ValidationState.Unknown); diff --git a/Src/Plugins/Security/SEC101_006.GitHubPatValidator.cs b/Src/Plugins/Security/SEC101_006.GitHubPatValidator.cs index 6f0c2fe7..fb9a194b 100644 --- a/Src/Plugins/Security/SEC101_006.GitHubPatValidator.cs +++ b/Src/Plugins/Security/SEC101_006.GitHubPatValidator.cs @@ -88,6 +88,7 @@ protected override string IsValidStaticHelper(ref string matchedPattern, fingerprintText = new Fingerprint { PersonalAccessToken = pat, + Platform = nameof(AssetPlatform.GitHub), }.ToString(); return nameof(ValidationState.Unknown); diff --git a/Src/Plugins/Security/SEC101_007.GitHubAppCredentialsValidator.cs b/Src/Plugins/Security/SEC101_007.GitHubAppCredentialsValidator.cs index 78db0c13..3e1873e6 100644 --- a/Src/Plugins/Security/SEC101_007.GitHubAppCredentialsValidator.cs +++ b/Src/Plugins/Security/SEC101_007.GitHubAppCredentialsValidator.cs @@ -53,6 +53,7 @@ protected override string IsValidStaticHelper(ref string matchedPattern, { Id = id, Key = key, + Platform = nameof(AssetPlatform.GitHub), }.ToString(); return nameof(ValidationState.Unknown); diff --git a/Src/Plugins/Security/SEC101_008.AwsCredentialsValidator.cs b/Src/Plugins/Security/SEC101_008.AwsCredentialsValidator.cs index bc1ef736..2b9cb3f0 100644 --- a/Src/Plugins/Security/SEC101_008.AwsCredentialsValidator.cs +++ b/Src/Plugins/Security/SEC101_008.AwsCredentialsValidator.cs @@ -66,6 +66,7 @@ protected override string IsValidStaticHelper(ref string matchedPattern, { Id = id, Key = key, + Platform = nameof(AssetPlatform.Aws), }.ToString(); return nameof(ValidationState.Unknown); diff --git a/Src/Plugins/Security/SEC101_009.LinkedInCredentialsValidator.cs b/Src/Plugins/Security/SEC101_009.LinkedInCredentialsValidator.cs index bb7c038f..1589e158 100644 --- a/Src/Plugins/Security/SEC101_009.LinkedInCredentialsValidator.cs +++ b/Src/Plugins/Security/SEC101_009.LinkedInCredentialsValidator.cs @@ -46,6 +46,7 @@ protected override string IsValidStaticHelper(ref string matchedPattern, { Id = id, Key = key, + Platform = nameof(AssetPlatform.LinkedIn), }.ToString(); return nameof(ValidationState.Unknown); diff --git a/Src/Plugins/Security/SEC101_010.SquarePatValidator.cs b/Src/Plugins/Security/SEC101_010.SquarePatValidator.cs index c7f723f1..9e407b71 100644 --- a/Src/Plugins/Security/SEC101_010.SquarePatValidator.cs +++ b/Src/Plugins/Security/SEC101_010.SquarePatValidator.cs @@ -53,6 +53,7 @@ protected override string IsValidStaticHelper(ref string matchedPattern, fingerprintText = new Fingerprint { PersonalAccessToken = key, + Platform = nameof(AssetPlatform.Square), }.ToString(); return nameof(ValidationState.Unknown); diff --git a/Src/Plugins/Security/SEC101_011.SquareCredentialsValidator.cs b/Src/Plugins/Security/SEC101_011.SquareCredentialsValidator.cs index a6c3c311..1e1cb706 100644 --- a/Src/Plugins/Security/SEC101_011.SquareCredentialsValidator.cs +++ b/Src/Plugins/Security/SEC101_011.SquareCredentialsValidator.cs @@ -44,6 +44,7 @@ protected override string IsValidStaticHelper(ref string matchedPattern, { Id = id, Key = key, + Platform = nameof(AssetPlatform.Square), }.ToString(); return nameof(ValidationState.Unknown); diff --git a/Src/Plugins/Security/SEC101_012.SlackWebhookValidator.cs b/Src/Plugins/Security/SEC101_012.SlackWebhookValidator.cs index 8fe50cea..15e5ec29 100644 --- a/Src/Plugins/Security/SEC101_012.SlackWebhookValidator.cs +++ b/Src/Plugins/Security/SEC101_012.SlackWebhookValidator.cs @@ -51,6 +51,7 @@ protected override string IsValidStaticHelper(ref string matchedPattern, fingerprintText = new Fingerprint { Uri = matchedPattern, + Platform = nameof(AssetPlatform.Slack), }.ToString(); return nameof(ValidationState.Unknown); diff --git a/Src/Plugins/Security/SEC101_014.FacebookAccessTokenValidator.cs b/Src/Plugins/Security/SEC101_014.FacebookAccessTokenValidator.cs index db973570..cf2a94b6 100644 --- a/Src/Plugins/Security/SEC101_014.FacebookAccessTokenValidator.cs +++ b/Src/Plugins/Security/SEC101_014.FacebookAccessTokenValidator.cs @@ -44,6 +44,7 @@ protected override string IsValidStaticHelper(ref string matchedPattern, fingerprintText = new Fingerprint() { Key = key, + Platform = nameof(AssetPlatform.Facebook), }.ToString(); return nameof(ValidationState.Unknown); diff --git a/Src/Plugins/Security/SEC101_015.GoogleGCMServiceAccountValidator.cs b/Src/Plugins/Security/SEC101_015.GoogleGCMServiceAccountValidator.cs index 5481f86e..57842ba1 100644 --- a/Src/Plugins/Security/SEC101_015.GoogleGCMServiceAccountValidator.cs +++ b/Src/Plugins/Security/SEC101_015.GoogleGCMServiceAccountValidator.cs @@ -37,6 +37,7 @@ protected override string IsValidStaticHelper(ref string matchedPattern, fingerprintText = new Fingerprint() { Resource = matchedPattern, + Platform = nameof(AssetPlatform.Google), }.ToString(); return nameof(ValidationState.Unknown); diff --git a/Src/Plugins/Security/SEC101_016.StripeApiKeyValidator.cs b/Src/Plugins/Security/SEC101_016.StripeApiKeyValidator.cs index e36689c3..125d7d82 100644 --- a/Src/Plugins/Security/SEC101_016.StripeApiKeyValidator.cs +++ b/Src/Plugins/Security/SEC101_016.StripeApiKeyValidator.cs @@ -55,6 +55,7 @@ protected override string IsValidStaticHelper(ref string matchedPattern, fingerprintText = new Fingerprint { Key = key, + Platform = nameof(AssetPlatform.Stripe), }.ToString(); return nameof(ValidationState.Unknown); diff --git a/Src/Plugins/Security/SEC101_017.NpmAuthorTokenValidator.cs b/Src/Plugins/Security/SEC101_017.NpmAuthorTokenValidator.cs index df3f4eb8..57da3ea2 100644 --- a/Src/Plugins/Security/SEC101_017.NpmAuthorTokenValidator.cs +++ b/Src/Plugins/Security/SEC101_017.NpmAuthorTokenValidator.cs @@ -57,6 +57,7 @@ protected override string IsValidStaticHelper(ref string matchedPattern, fingerprintText = new Fingerprint { Key = key, + Platform = nameof(AssetPlatform.Npm), }.ToString(); return nameof(ValidationState.Unknown); diff --git a/Src/Plugins/Security/SEC101_023.AmazonMwsAuthTokenValidator.cs b/Src/Plugins/Security/SEC101_023.AmazonMwsAuthTokenValidator.cs index 854c65b6..ac188508 100644 --- a/Src/Plugins/Security/SEC101_023.AmazonMwsAuthTokenValidator.cs +++ b/Src/Plugins/Security/SEC101_023.AmazonMwsAuthTokenValidator.cs @@ -44,6 +44,7 @@ protected override string IsValidStaticHelper(ref string matchedPattern, fingerprintText = new Fingerprint { Key = key, + Platform = nameof(AssetPlatform.Aws), }.ToString(); return nameof(ValidationState.Unknown); diff --git a/Src/Plugins/Security/SEC101_046.SqlConnectionStringValidator.cs b/Src/Plugins/Security/SEC101_046.SqlConnectionStringValidator.cs index f7b6f758..1b4d3d88 100644 --- a/Src/Plugins/Security/SEC101_046.SqlConnectionStringValidator.cs +++ b/Src/Plugins/Security/SEC101_046.SqlConnectionStringValidator.cs @@ -76,15 +76,15 @@ protected override string IsValidStaticHelper(ref string matchedPattern, if (groups.ContainsKey("host") && groups.ContainsKey("database") && groups.ContainsKey("account") && groups.ContainsKey("password")) { host = groups["host"]; - database = groups["database"]; account = groups["account"]; + database = groups["database"]; password = groups["password"]; } else { host = ParseExpression(RegexEngine, matchedPattern, HostExpression); - database = ParseExpression(RegexEngine, matchedPattern, DatabaseExpression); account = ParseExpression(RegexEngine, matchedPattern, AccountExpression); + database = ParseExpression(RegexEngine, matchedPattern, DatabaseExpression); password = ParseExpression(RegexEngine, matchedPattern, PasswordExpression); } @@ -119,6 +119,7 @@ protected override string IsValidStaticHelper(ref string matchedPattern, Resource = database, Account = account, Password = password, + Platform = SharedUtilities.GetDatabasePlatformFromHost(host, out _), }.ToString(); return nameof(ValidationState.Unknown); @@ -141,7 +142,7 @@ protected override string IsValidDynamicHelper(ref string fingerprintText, string connString = $"Server={host};Initial Catalog={database};User ID={account};Password={password};" + - "Trusted_Connection=False;Encrypt=True;Connection Timeout=30;"; + "Trusted_Connection=False;Encrypt=True;Connection Timeout=3;"; message = $"the '{account}' account was authenticated against database '{database}' hosted on '{host}'"; // Validating ConnectionString with database. @@ -153,7 +154,7 @@ protected override string IsValidDynamicHelper(ref string fingerprintText, connString = $"Server={host};User ID={account};Password={password};" + - "Trusted_Connection=False;Encrypt=True;Connection Timeout=30;"; + "Trusted_Connection=False;Encrypt=True;Connection Timeout=3;"; message = $"the '{account}' account is compromised for server '{host}'"; // Validating ConnectionString without database. diff --git a/Src/Plugins/Security/SEC101_047.MySqlConnectionStringValidator.cs b/Src/Plugins/Security/SEC101_047.MySqlConnectionStringValidator.cs index 322f1d8d..58fd6f8c 100644 --- a/Src/Plugins/Security/SEC101_047.MySqlConnectionStringValidator.cs +++ b/Src/Plugins/Security/SEC101_047.MySqlConnectionStringValidator.cs @@ -97,6 +97,7 @@ protected override string IsValidStaticHelper(ref string matchedPattern, fingerprint.Host = host.Replace("\"", string.Empty).Replace(",", ";"); fingerprint.Resource = database; fingerprint.Port = port; + fingerprint.Platform = SharedUtilities.GetDatabasePlatformFromHost(fingerprint.Host, out _); fingerprintText = fingerprint.ToString(); diff --git a/Src/Plugins/Security/SEC101_102.AdoPatValidator.cs b/Src/Plugins/Security/SEC101_102.AdoPatValidator.cs index 152f6379..f77304dd 100644 --- a/Src/Plugins/Security/SEC101_102.AdoPatValidator.cs +++ b/Src/Plugins/Security/SEC101_102.AdoPatValidator.cs @@ -97,6 +97,7 @@ public static string IsValidStatic(ref string matchedPattern, fingerprintText = new Fingerprint() { PersonalAccessToken = pat, + Platform = nameof(AssetPlatform.AzureDevOps), }.ToString(); } diff --git a/Src/Plugins/Tests.Security/TestData/ReviewPotentiallySensitiveData/ExpectedOutputs/SEC102_001.EmailAddress_with_email_addresses.sarif b/Src/Plugins/Tests.Security/TestData/ReviewPotentiallySensitiveData/ExpectedOutputs/SEC102_001.EmailAddress_with_email_addresses.sarif index 2bafef8c..347d3f6a 100644 --- a/Src/Plugins/Tests.Security/TestData/ReviewPotentiallySensitiveData/ExpectedOutputs/SEC102_001.EmailAddress_with_email_addresses.sarif +++ b/Src/Plugins/Tests.Security/TestData/ReviewPotentiallySensitiveData/ExpectedOutputs/SEC102_001.EmailAddress_with_email_addresses.sarif @@ -70,6 +70,7 @@ } ], "fingerprints": { + "AssetFingerprint/v1": "[acct=email][host=example.com]", "ValidationFingerprint/v1": "[acct=email][host=example.com]" } }, @@ -106,6 +107,7 @@ } ], "fingerprints": { + "AssetFingerprint/v1": "[acct=firstname.lastname][host=example.com]", "ValidationFingerprint/v1": "[acct=firstname.lastname][host=example.com]" } }, @@ -142,6 +144,7 @@ } ], "fingerprints": { + "AssetFingerprint/v1": "[acct=lastname][host=example.com]", "ValidationFingerprint/v1": "[acct=lastname][host=example.com]" } }, @@ -178,6 +181,7 @@ } ], "fingerprints": { + "AssetFingerprint/v1": "[acct=email][host=subdomain.example.com]", "ValidationFingerprint/v1": "[acct=email][host=subdomain.example.com]" } }, @@ -214,6 +218,7 @@ } ], "fingerprints": { + "AssetFingerprint/v1": "[acct=firstname+lastname][host=example.com]", "ValidationFingerprint/v1": "[acct=firstname+lastname][host=example.com]" } }, @@ -250,6 +255,7 @@ } ], "fingerprints": { + "AssetFingerprint/v1": "[acct=+lastname][host=example.com]", "ValidationFingerprint/v1": "[acct=+lastname][host=example.com]" } }, @@ -286,6 +292,7 @@ } ], "fingerprints": { + "AssetFingerprint/v1": "[acct=lastname][host=example.com]", "ValidationFingerprint/v1": "[acct=lastname][host=example.com]" } }, @@ -322,6 +329,7 @@ } ], "fingerprints": { + "AssetFingerprint/v1": "[acct=email][host=123.123.123.123]", "ValidationFingerprint/v1": "[acct=email][host=123.123.123.123]" } }, @@ -358,6 +366,7 @@ } ], "fingerprints": { + "AssetFingerprint/v1": "[acct=1234567890][host=example.com]", "ValidationFingerprint/v1": "[acct=1234567890][host=example.com]" } }, @@ -394,6 +403,7 @@ } ], "fingerprints": { + "AssetFingerprint/v1": "[acct=email][host=example-one.com]", "ValidationFingerprint/v1": "[acct=email][host=example-one.com]" } }, @@ -430,6 +440,7 @@ } ], "fingerprints": { + "AssetFingerprint/v1": "[acct=email][host=example.co.jp]", "ValidationFingerprint/v1": "[acct=email][host=example.co.jp]" } }, @@ -466,6 +477,7 @@ } ], "fingerprints": { + "AssetFingerprint/v1": "[acct=firstname-lastname][host=example.com]", "ValidationFingerprint/v1": "[acct=firstname-lastname][host=example.com]" } }, @@ -502,6 +514,7 @@ } ], "fingerprints": { + "AssetFingerprint/v1": "[acct=-lastname][host=example.com]", "ValidationFingerprint/v1": "[acct=-lastname][host=example.com]" } }, @@ -538,6 +551,7 @@ } ], "fingerprints": { + "AssetFingerprint/v1": "[acct=lastname][host=example.com]", "ValidationFingerprint/v1": "[acct=lastname][host=example.com]" } }, @@ -574,6 +588,7 @@ } ], "fingerprints": { + "AssetFingerprint/v1": "[acct=email][host=example.name]", "ValidationFingerprint/v1": "[acct=email][host=example.name]" } }, @@ -610,6 +625,7 @@ } ], "fingerprints": { + "AssetFingerprint/v1": "[acct=email][host=example.museum]", "ValidationFingerprint/v1": "[acct=email][host=example.museum]" } }, @@ -646,6 +662,7 @@ } ], "fingerprints": { + "AssetFingerprint/v1": "[acct=addressSurroundedBySpaces][host=example.com]", "ValidationFingerprint/v1": "[acct=addressSurroundedBySpaces][host=example.com]" } }, @@ -682,6 +699,7 @@ } ], "fingerprints": { + "AssetFingerprint/v1": "[acct=addressSurroundedByTabs][host=example.com]", "ValidationFingerprint/v1": "[acct=addressSurroundedByTabs][host=example.com]" } }, @@ -718,6 +736,7 @@ } ], "fingerprints": { + "AssetFingerprint/v1": "[acct=addressSurroundedByPipes][host=example.com]", "ValidationFingerprint/v1": "[acct=addressSurroundedByPipes][host=example.com]" } }, @@ -754,6 +773,7 @@ } ], "fingerprints": { + "AssetFingerprint/v1": "[acct=addressSurroundedByDoubleQuotes][host=example.com]", "ValidationFingerprint/v1": "[acct=addressSurroundedByDoubleQuotes][host=example.com]" } }, @@ -790,6 +810,7 @@ } ], "fingerprints": { + "AssetFingerprint/v1": "[acct=addressSurroundedBySingleQuotes][host=example.com]", "ValidationFingerprint/v1": "[acct=addressSurroundedBySingleQuotes][host=example.com]" } }, @@ -826,6 +847,7 @@ } ], "fingerprints": { + "AssetFingerprint/v1": "[acct=htmlAddress][host=example.com]", "ValidationFingerprint/v1": "[acct=htmlAddress][host=example.com]" } }, @@ -862,6 +884,7 @@ } ], "fingerprints": { + "AssetFingerprint/v1": "[acct=addressInTags][host=example.com]", "ValidationFingerprint/v1": "[acct=addressInTags][host=example.com]" } }, @@ -898,6 +921,7 @@ } ], "fingerprints": { + "AssetFingerprint/v1": "[acct=addressPrecededByColon][host=example.com]", "ValidationFingerprint/v1": "[acct=addressPrecededByColon][host=example.com]" } }, @@ -934,6 +958,7 @@ } ], "fingerprints": { + "AssetFingerprint/v1": "[acct=addressPrecededByColonAndFollowedByPeriod][host=example.com]", "ValidationFingerprint/v1": "[acct=addressPrecededByColonAndFollowedByPeriod][host=example.com]" } }, @@ -970,6 +995,7 @@ } ], "fingerprints": { + "AssetFingerprint/v1": "[acct=email][host=111.222.333.44444]", "ValidationFingerprint/v1": "[acct=email][host=111.222.333.44444]" } }, @@ -1006,6 +1032,7 @@ } ], "fingerprints": { + "AssetFingerprint/v1": "[acct=email..email][host=example.com]", "ValidationFingerprint/v1": "[acct=email..email][host=example.com]" } }, @@ -1042,6 +1069,7 @@ } ], "fingerprints": { + "AssetFingerprint/v1": "[acct=email][host=example.com]", "ValidationFingerprint/v1": "[acct=email][host=example.com]" } }, @@ -1078,6 +1106,7 @@ } ], "fingerprints": { + "AssetFingerprint/v1": "[acct=email][host=example..com]", "ValidationFingerprint/v1": "[acct=email][host=example..com]" } }, @@ -1114,6 +1143,7 @@ } ], "fingerprints": { + "AssetFingerprint/v1": "[acct=Abc..123][host=example.com]", "ValidationFingerprint/v1": "[acct=Abc..123][host=example.com]" } }, @@ -1150,6 +1180,7 @@ } ], "fingerprints": { + "AssetFingerprint/v1": "[acct=123][host=example.com]", "ValidationFingerprint/v1": "[acct=123][host=example.com]" } }, @@ -1186,6 +1217,7 @@ } ], "fingerprints": { + "AssetFingerprint/v1": "[acct=unusual.com][host=example.com]", "ValidationFingerprint/v1": "[acct=unusual.com][host=example.com]" } }, @@ -1222,6 +1254,7 @@ } ], "fingerprints": { + "AssetFingerprint/v1": "[acct=com][host=example.com]", "ValidationFingerprint/v1": "[acct=com][host=example.com]" } }, @@ -1258,6 +1291,7 @@ } ], "fingerprints": { + "AssetFingerprint/v1": "[acct=unusual][host=strange.example.com]", "ValidationFingerprint/v1": "[acct=unusual][host=strange.example.com]" } }, @@ -1294,6 +1328,7 @@ } ], "fingerprints": { + "AssetFingerprint/v1": "[acct=email][host=example.com]", "ValidationFingerprint/v1": "[acct=email][host=example.com]" } }, @@ -1330,6 +1365,7 @@ } ], "fingerprints": { + "AssetFingerprint/v1": "[acct=example][host=example.com]", "ValidationFingerprint/v1": "[acct=example][host=example.com]" } }, @@ -1366,6 +1402,7 @@ } ], "fingerprints": { + "AssetFingerprint/v1": "[acct=email][host=example.com]", "ValidationFingerprint/v1": "[acct=email][host=example.com]" } }, @@ -1402,6 +1439,7 @@ } ], "fingerprints": { + "AssetFingerprint/v1": "[acct=email][host=example.com]", "ValidationFingerprint/v1": "[acct=email][host=example.com]" } }, @@ -1438,6 +1476,7 @@ } ], "fingerprints": { + "AssetFingerprint/v1": "[acct=user][host=example.com]", "ValidationFingerprint/v1": "[acct=user][host=example.com]" } }, @@ -1474,6 +1513,7 @@ } ], "fingerprints": { + "AssetFingerprint/v1": "[acct=endOfLineCheck][host=example.com]", "ValidationFingerprint/v1": "[acct=endOfLineCheck][host=example.com]" } } diff --git a/Src/Plugins/Tests.Security/TestData/ReviewPotentiallySensitiveFiles/ExpectedOutputs/SEC103_024.MicrosoftSerializedCertificateStoreFile_default.sarif b/Src/Plugins/Tests.Security/TestData/ReviewPotentiallySensitiveFiles/ExpectedOutputs/SEC103_024.MicrosoftSerializedCertificateStoreFile_default.sarif index 545907cd..6485d088 100644 --- a/Src/Plugins/Tests.Security/TestData/ReviewPotentiallySensitiveFiles/ExpectedOutputs/SEC103_024.MicrosoftSerializedCertificateStoreFile_default.sarif +++ b/Src/Plugins/Tests.Security/TestData/ReviewPotentiallySensitiveFiles/ExpectedOutputs/SEC103_024.MicrosoftSerializedCertificateStoreFile_default.sarif @@ -62,6 +62,7 @@ } ], "fingerprints": { + "AssetFingerprint/v1": "[thumbprint=391550988FF0B079A0E712728F2EB95D542EF58F]", "ValidationFingerprint/v1": "[thumbprint=391550988FF0B079A0E712728F2EB95D542EF58F]" } } diff --git a/Src/Plugins/Tests.Security/TestData/SecurePlaintextSecrets/ExpectedOutputs/SEC101_001.HttpAuthorizationRequestHeader.sarif b/Src/Plugins/Tests.Security/TestData/SecurePlaintextSecrets/ExpectedOutputs/SEC101_001.HttpAuthorizationRequestHeader.sarif index 11c1e395..c6dcb605 100644 --- a/Src/Plugins/Tests.Security/TestData/SecurePlaintextSecrets/ExpectedOutputs/SEC101_001.HttpAuthorizationRequestHeader.sarif +++ b/Src/Plugins/Tests.Security/TestData/SecurePlaintextSecrets/ExpectedOutputs/SEC101_001.HttpAuthorizationRequestHeader.sarif @@ -74,6 +74,7 @@ } ], "fingerprints": { + "AssetFingerprint/v1": "[host=https://example.com]", "ValidationFingerprint/v1": "[host=https://example.com][key=SomeAuthorizationKey0123456]" } }, @@ -114,6 +115,7 @@ } ], "fingerprints": { + "AssetFingerprint/v1": "[host=https://example.com][resource=?some=parameters&that=should&appear=inresults]", "ValidationFingerprint/v1": "[host=https://example.com][key=SomeAuthorizationKey0123456][resource=?some=parameters&that=should&appear=inresults]" } }, @@ -154,6 +156,7 @@ } ], "fingerprints": { + "AssetFingerprint/v1": "[host=https://example.com]", "ValidationFingerprint/v1": "[host=https://example.com][key=SomeAuthorizationKey0123456=]" } } diff --git a/Src/Plugins/Tests.Security/TestData/SecurePlaintextSecrets/ExpectedOutputs/SEC101_002.GoogleOAuthCredentials.sarif b/Src/Plugins/Tests.Security/TestData/SecurePlaintextSecrets/ExpectedOutputs/SEC101_002.GoogleOAuthCredentials.sarif index 4d81865f..7339e0ed 100644 --- a/Src/Plugins/Tests.Security/TestData/SecurePlaintextSecrets/ExpectedOutputs/SEC101_002.GoogleOAuthCredentials.sarif +++ b/Src/Plugins/Tests.Security/TestData/SecurePlaintextSecrets/ExpectedOutputs/SEC101_002.GoogleOAuthCredentials.sarif @@ -74,6 +74,7 @@ } ], "fingerprints": { + "AssetFingerprint/v1": "[id=000000000000-orc0qcgp8ls5nkshbjs9p2erbkrffup8][platform=Google]", "ValidationFingerprint/v1": "[id=000000000000-orc0qcgp8ls5nkshbjs9p2erbkrffup8][key=BsEiZJw3cl60wEToh-Fgctid]" } }, @@ -114,6 +115,7 @@ } ], "fingerprints": { + "AssetFingerprint/v1": "[id=111111111111-orc0qcgp8ls5nkshbjs9p2erbkrffup8][platform=Google]", "ValidationFingerprint/v1": "[id=111111111111-orc0qcgp8ls5nkshbjs9p2erbkrffup8][key=BsEiZJw3cl60wEToh-Fgctid]" } }, @@ -154,6 +156,7 @@ } ], "fingerprints": { + "AssetFingerprint/v1": "[id=222222222222-orc0qcgp8ls5nkshbjs9p2erbkrffup8][platform=Google]", "ValidationFingerprint/v1": "[id=222222222222-orc0qcgp8ls5nkshbjs9p2erbkrffup8][key=BsEiZJw3cl60wEToh-Fgctid]" } } diff --git a/Src/Plugins/Tests.Security/TestData/SecurePlaintextSecrets/ExpectedOutputs/SEC101_003.GoogleApiKey.sarif b/Src/Plugins/Tests.Security/TestData/SecurePlaintextSecrets/ExpectedOutputs/SEC101_003.GoogleApiKey.sarif index a2e0345c..39b81e80 100644 --- a/Src/Plugins/Tests.Security/TestData/SecurePlaintextSecrets/ExpectedOutputs/SEC101_003.GoogleApiKey.sarif +++ b/Src/Plugins/Tests.Security/TestData/SecurePlaintextSecrets/ExpectedOutputs/SEC101_003.GoogleApiKey.sarif @@ -74,6 +74,7 @@ } ], "fingerprints": { + "AssetFingerprint/v1": "[platform=Google]", "ValidationFingerprint/v1": "[key=AIza0deadbeef00deadbeef00deadbeef00dead]" } } diff --git a/Src/Plugins/Tests.Security/TestData/SecurePlaintextSecrets/ExpectedOutputs/SEC101_004.FacebookAppCredentials.sarif b/Src/Plugins/Tests.Security/TestData/SecurePlaintextSecrets/ExpectedOutputs/SEC101_004.FacebookAppCredentials.sarif index 5a950293..e2e06c46 100644 --- a/Src/Plugins/Tests.Security/TestData/SecurePlaintextSecrets/ExpectedOutputs/SEC101_004.FacebookAppCredentials.sarif +++ b/Src/Plugins/Tests.Security/TestData/SecurePlaintextSecrets/ExpectedOutputs/SEC101_004.FacebookAppCredentials.sarif @@ -74,6 +74,7 @@ } ], "fingerprints": { + "AssetFingerprint/v1": "[id=111111111111111][platform=Facebook]", "ValidationFingerprint/v1": "[id=111111111111111][key=c9117d87046fc24205e4240e6bc9963a]" } }, @@ -114,6 +115,7 @@ } ], "fingerprints": { + "AssetFingerprint/v1": "[id=222222222222222][platform=Facebook]", "ValidationFingerprint/v1": "[id=222222222222222][key=c9117d87046fc24205e4240e6bc9963a]" } } diff --git a/Src/Plugins/Tests.Security/TestData/SecurePlaintextSecrets/ExpectedOutputs/SEC101_005.SlackTokens.sarif b/Src/Plugins/Tests.Security/TestData/SecurePlaintextSecrets/ExpectedOutputs/SEC101_005.SlackTokens.sarif index eff9f37d..71e5b95d 100644 --- a/Src/Plugins/Tests.Security/TestData/SecurePlaintextSecrets/ExpectedOutputs/SEC101_005.SlackTokens.sarif +++ b/Src/Plugins/Tests.Security/TestData/SecurePlaintextSecrets/ExpectedOutputs/SEC101_005.SlackTokens.sarif @@ -74,6 +74,7 @@ } ], "fingerprints": { + "AssetFingerprint/v1": "[platform=Slack]", "ValidationFingerprint/v1": "[key=xoxb-83112120353-1016171244646-sGMxuWapBw3w3qdK6OfTjORe]" } } diff --git a/Src/Plugins/Tests.Security/TestData/SecurePlaintextSecrets/ExpectedOutputs/SEC101_006.GitHubPat.sarif b/Src/Plugins/Tests.Security/TestData/SecurePlaintextSecrets/ExpectedOutputs/SEC101_006.GitHubPat.sarif index 69229a44..625f12af 100644 --- a/Src/Plugins/Tests.Security/TestData/SecurePlaintextSecrets/ExpectedOutputs/SEC101_006.GitHubPat.sarif +++ b/Src/Plugins/Tests.Security/TestData/SecurePlaintextSecrets/ExpectedOutputs/SEC101_006.GitHubPat.sarif @@ -74,6 +74,7 @@ } ], "fingerprints": { + "AssetFingerprint/v1": "[platform=GitHub]", "ValidationFingerprint/v1": "[pat=ff34885a8624460a855540c6592698d2f1812843]" } }, @@ -114,6 +115,7 @@ } ], "fingerprints": { + "AssetFingerprint/v1": "[platform=GitHub]", "ValidationFingerprint/v1": "[pat=dead885a8624460a855540c6592698d2f1812843]" } }, @@ -154,6 +156,7 @@ } ], "fingerprints": { + "AssetFingerprint/v1": "[platform=GitHub]", "ValidationFingerprint/v1": "[pat=ff34885a8624460a855540c6592698d2f181dead]" } } diff --git a/Src/Plugins/Tests.Security/TestData/SecurePlaintextSecrets/ExpectedOutputs/SEC101_007.GitHubAppCredentials.sarif b/Src/Plugins/Tests.Security/TestData/SecurePlaintextSecrets/ExpectedOutputs/SEC101_007.GitHubAppCredentials.sarif index f767924f..f6f3d654 100644 --- a/Src/Plugins/Tests.Security/TestData/SecurePlaintextSecrets/ExpectedOutputs/SEC101_007.GitHubAppCredentials.sarif +++ b/Src/Plugins/Tests.Security/TestData/SecurePlaintextSecrets/ExpectedOutputs/SEC101_007.GitHubAppCredentials.sarif @@ -74,6 +74,7 @@ } ], "fingerprints": { + "AssetFingerprint/v1": "[id=Iv1.01234567testtest][platform=GitHub]", "ValidationFingerprint/v1": "[id=Iv1.01234567testtest][key=deadbeef00deadbeef00deadbeef00testtest]" } }, @@ -114,6 +115,7 @@ } ], "fingerprints": { + "AssetFingerprint/v1": "[id=Iv1.01234567deaddead][platform=GitHub]", "ValidationFingerprint/v1": "[id=Iv1.01234567deaddead][key=0000beef00deadbeef00deadbeef00deadbeef]" } }, @@ -154,6 +156,7 @@ } ], "fingerprints": { + "AssetFingerprint/v1": "[id=Iv1.01234567deaddead][platform=GitHub]", "ValidationFingerprint/v1": "[id=Iv1.01234567deaddead][key=deadbeef00deadbeef00deadbeef00deadbeef]" } }, @@ -194,6 +197,7 @@ } ], "fingerprints": { + "AssetFingerprint/v1": "[id=Iv1.01234567deaddead][platform=GitHub]", "ValidationFingerprint/v1": "[id=Iv1.01234567deaddead][key=deadbeef00deadbeef00deadbeef00dead0000]" } }, @@ -234,6 +238,7 @@ } ], "fingerprints": { + "AssetFingerprint/v1": "[id=Iv1.01234567deaddead][platform=GitHub]", "ValidationFingerprint/v1": "[id=Iv1.01234567deaddead][key=deadbeef00deaddead00deadbeef00deadbeef]" } } diff --git a/Src/Plugins/Tests.Security/TestData/SecurePlaintextSecrets/ExpectedOutputs/SEC101_008.AwsCredentials.sarif b/Src/Plugins/Tests.Security/TestData/SecurePlaintextSecrets/ExpectedOutputs/SEC101_008.AwsCredentials.sarif index 763f6cc9..b1dec9a8 100644 --- a/Src/Plugins/Tests.Security/TestData/SecurePlaintextSecrets/ExpectedOutputs/SEC101_008.AwsCredentials.sarif +++ b/Src/Plugins/Tests.Security/TestData/SecurePlaintextSecrets/ExpectedOutputs/SEC101_008.AwsCredentials.sarif @@ -74,6 +74,7 @@ } ], "fingerprints": { + "AssetFingerprint/v1": "[id=AKIAIOSFODNN7EXAMPLE][platform=Aws]", "ValidationFingerprint/v1": "[id=AKIAIOSFODNN7EXAMPLE][key=wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY]" } }, @@ -114,6 +115,7 @@ } ], "fingerprints": { + "AssetFingerprint/v1": "[id=AKIAIOSFODNN7EXAMPLE][platform=Aws]", "ValidationFingerprint/v1": "[id=AKIAIOSFODNN7EXAMPLE][key=xJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY]" } }, @@ -154,6 +156,7 @@ } ], "fingerprints": { + "AssetFingerprint/v1": "[id=AKIAIOSFODNN7EXAMPLE][platform=Aws]", "ValidationFingerprint/v1": "[id=AKIAIOSFODNN7EXAMPLE][key=yJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY]" } }, @@ -194,6 +197,7 @@ } ], "fingerprints": { + "AssetFingerprint/v1": "[id=AKIAIOSFODNN7EXAMPLE][platform=Aws]", "ValidationFingerprint/v1": "[id=AKIAIOSFODNN7EXAMPLE][key=zJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY]" } } diff --git a/Src/Plugins/Tests.Security/TestData/SecurePlaintextSecrets/ExpectedOutputs/SEC101_009.LinkedInCredentials.sarif b/Src/Plugins/Tests.Security/TestData/SecurePlaintextSecrets/ExpectedOutputs/SEC101_009.LinkedInCredentials.sarif index 731e34fd..9c2f9f8e 100644 --- a/Src/Plugins/Tests.Security/TestData/SecurePlaintextSecrets/ExpectedOutputs/SEC101_009.LinkedInCredentials.sarif +++ b/Src/Plugins/Tests.Security/TestData/SecurePlaintextSecrets/ExpectedOutputs/SEC101_009.LinkedInCredentials.sarif @@ -74,6 +74,7 @@ } ], "fingerprints": { + "AssetFingerprint/v1": "[id=0000000aaaaaaa][platform=LinkedIn]", "ValidationFingerprint/v1": "[id=0000000aaaaaaa][key=00000000aaaaaaaa]" } }, @@ -114,6 +115,7 @@ } ], "fingerprints": { + "AssetFingerprint/v1": "[id=1111111aaaaaaa][platform=LinkedIn]", "ValidationFingerprint/v1": "[id=1111111aaaaaaa][key=00000000aaaaaaaa]" } }, @@ -154,6 +156,7 @@ } ], "fingerprints": { + "AssetFingerprint/v1": "[id=2222222aaaaaaa][platform=LinkedIn]", "ValidationFingerprint/v1": "[id=2222222aaaaaaa][key=00000000aaaaaaaa]" } } diff --git a/Src/Plugins/Tests.Security/TestData/SecurePlaintextSecrets/ExpectedOutputs/SEC101_010.SquarePat.sarif b/Src/Plugins/Tests.Security/TestData/SecurePlaintextSecrets/ExpectedOutputs/SEC101_010.SquarePat.sarif index 6808a3f2..54931d12 100644 --- a/Src/Plugins/Tests.Security/TestData/SecurePlaintextSecrets/ExpectedOutputs/SEC101_010.SquarePat.sarif +++ b/Src/Plugins/Tests.Security/TestData/SecurePlaintextSecrets/ExpectedOutputs/SEC101_010.SquarePat.sarif @@ -74,6 +74,7 @@ } ], "fingerprints": { + "AssetFingerprint/v1": "[platform=Square]", "ValidationFingerprint/v1": "[pat=EAAAEBpgJyJZkHNhmvmIzc2jPU4fnuYzw3LmTy-ch0fhmFnmLt_faEIS_5i81671]" } }, @@ -114,6 +115,7 @@ } ], "fingerprints": { + "AssetFingerprint/v1": "[platform=Square]", "ValidationFingerprint/v1": "[pat=EAAAEBpgJyJZkHNhmvmIzc2jPU4fnuYzw3LmTy-ch0fhmFnmLt_faEIS_5i81672]" } }, @@ -154,6 +156,7 @@ } ], "fingerprints": { + "AssetFingerprint/v1": "[platform=Square]", "ValidationFingerprint/v1": "[pat=EAAAEBpgJyJZkHNhmvmIzc2jPU4fnuYzw3LmTy-ch0fhmFnmLt_faEIS_5i81673]" } } diff --git a/Src/Plugins/Tests.Security/TestData/SecurePlaintextSecrets/ExpectedOutputs/SEC101_011.SquareCredentials.sarif b/Src/Plugins/Tests.Security/TestData/SecurePlaintextSecrets/ExpectedOutputs/SEC101_011.SquareCredentials.sarif index 2c9acf95..5e77c987 100644 --- a/Src/Plugins/Tests.Security/TestData/SecurePlaintextSecrets/ExpectedOutputs/SEC101_011.SquareCredentials.sarif +++ b/Src/Plugins/Tests.Security/TestData/SecurePlaintextSecrets/ExpectedOutputs/SEC101_011.SquareCredentials.sarif @@ -74,6 +74,7 @@ } ], "fingerprints": { + "AssetFingerprint/v1": "[id=sq0idp-5jnRMCM5UQ6GRrIi0HFeIA][platform=Square]", "ValidationFingerprint/v1": "[id=sq0idp-5jnRMCM5UQ6GRrIi0HFeIA][key=sq0csp-1QurZKQX2KjDCVAHa-eSJL4Au1EmUpQj1hgn5xPH25A]" } }, @@ -114,6 +115,7 @@ } ], "fingerprints": { + "AssetFingerprint/v1": "[id=sq0idp-5jnRMCM5UQ6GRrIi0HFeIA][platform=Square]", "ValidationFingerprint/v1": "[id=sq0idp-5jnRMCM5UQ6GRrIi0HFeIA][key=sq0csp-1QurZKQX2KjDCVAHa-eSJL4Au1EmUpQj1hgn5xPH25B]" } }, @@ -154,6 +156,7 @@ } ], "fingerprints": { + "AssetFingerprint/v1": "[id=sq0idp-5jnRMCM5UQ6GRrIi0HFeIA][platform=Square]", "ValidationFingerprint/v1": "[id=sq0idp-5jnRMCM5UQ6GRrIi0HFeIA][key=sq0csp-1QurZKQX2KjDCVAHa-eSJL4Au1EmUpQj1hgn5xPH25C]" } } diff --git a/Src/Plugins/Tests.Security/TestData/SecurePlaintextSecrets/ExpectedOutputs/SEC101_012.SlackWebhook.sarif b/Src/Plugins/Tests.Security/TestData/SecurePlaintextSecrets/ExpectedOutputs/SEC101_012.SlackWebhook.sarif index 619d3380..6fbd58ff 100644 --- a/Src/Plugins/Tests.Security/TestData/SecurePlaintextSecrets/ExpectedOutputs/SEC101_012.SlackWebhook.sarif +++ b/Src/Plugins/Tests.Security/TestData/SecurePlaintextSecrets/ExpectedOutputs/SEC101_012.SlackWebhook.sarif @@ -74,6 +74,7 @@ } ], "fingerprints": { + "AssetFingerprint/v1": "[platform=Slack][uri=https://hooks.slack.com/services/T01JYS3KLKU/B0123456789/deedbeefdeaffeeddeadbeef]", "ValidationFingerprint/v1": "[uri=https://hooks.slack.com/services/T01JYS3KLKU/B0123456789/deedbeefdeaffeeddeadbeef]" } } diff --git a/Src/Plugins/Tests.Security/TestData/SecurePlaintextSecrets/ExpectedOutputs/SEC101_013.CryptographicPrivateKey.sarif b/Src/Plugins/Tests.Security/TestData/SecurePlaintextSecrets/ExpectedOutputs/SEC101_013.CryptographicPrivateKey.sarif index 5fde5f1e..111933bc 100644 --- a/Src/Plugins/Tests.Security/TestData/SecurePlaintextSecrets/ExpectedOutputs/SEC101_013.CryptographicPrivateKey.sarif +++ b/Src/Plugins/Tests.Security/TestData/SecurePlaintextSecrets/ExpectedOutputs/SEC101_013.CryptographicPrivateKey.sarif @@ -74,6 +74,7 @@ } ], "fingerprints": { + "AssetFingerprint/v1": "", "ValidationFingerprint/v1": "[key=MIIBOgIBAAJBAKj34GkxFhD90vcNLYLInFEX6Ppy1tPf9Cnzj4p4WGeKLs1Pt8Qu\r\nKUpRKfFLfRYC9AIKjbJTWit+CqvjWYzvQwECAwEAAQJAIJLixBy2qpFoS4DSmoEm\r\no3qGy0t6z09AIJtH+5OeRV1be+N4cDYJKffGzDa88vQENZiRm0GRq6a+HPGQMd2k\r\nTQIhAKMSvzIBnni7ot/OSie2TmJLY4SwTQAevXysE2RbFDYdAiEBCUEaRQnMnbp7\r\n9mxDXDf6AU0cN/RPBjb9qSHDcWZHGzUCIG2Es59z8ugGrDY+pxLQnwfotadxd+Uy\r\nv/Ow5T0q5gIJAiEAyS4RaI9YG8EWx/2w0T67ZUVAw8eOMB6BIUg0Xcu+3okCIBOs\r\n/5OiPgoTdSy7bcF9IGpSE8ZgGKzgYQVZeN97YE00]" } }, @@ -114,6 +115,7 @@ } ], "fingerprints": { + "AssetFingerprint/v1": "", "ValidationFingerprint/v1": "[key=MHcCAQEEIODzxjCf0NkBLVYX7sVilLtblWwtkZpWC3YoB/col3F9oAoGCCqGSM49\r\nAwEHoUQDQgAE5DL9kQY/fOr3OHf5MTDwt6o8XNvjxHA0safM0cDkRu3/Tl1o/SU4\r\n0TjYueDVtss8HArsJ2swDMplZp0pPdF5Vw==]" } }, @@ -154,6 +156,7 @@ } ], "fingerprints": { + "AssetFingerprint/v1": "", "ValidationFingerprint/v1": "[key=MHcCAQEEIAyTKsj3kY5lVne0CuSgZnL7GTmpTvtBzkfp6eDmQliToAoGCCqGSM49\r\nAwEHoUQDQgAEqvQivyLG18SM5Sh5B3NVn9yfqgL/n6pIVBVd0gqwrdQgD3ZhtE/N\r\n+NPInP9ir9ggxWZBB/wOclcn4F33b42PdQ==]" } }, @@ -194,6 +197,7 @@ } ], "fingerprints": { + "AssetFingerprint/v1": "", "ValidationFingerprint/v1": "[key=MIIBugIBAAKBgQC6G4LJmIfw64RrEwHAg4Rlv9r8MlwuqdGlra+RRIERkG1ONbBK\r\ns2IhsLIPM3uLTycNmUVFApo8Df2jPYjPFo8M2/uINgl1yhcFTUjcexOCaT58Be7W\r\npce6wkhmmzG9c2UCsrgriGhLMZ8fsPXvsltKDc5YSYMZoOEcSdf7VBntkwIVAIUE\r\nIfkWBofyvuQ5ihcQgR5AoT7dAoGAUUwcYwDLmgYiqxg2GPXKZIkitvJ6GJwb/FML\r\n5O939c/gv4GPB/OdtByN1rl7erf41BdmMnPcaKYcojjrNCHiRltXsamQDmsqRf8f\r\nwJmRNoqYpwa6ow3CKnKBe5NzfAkIAScoHo9ZCCDu6U4+XZ5w1RVEFu93bHzBSvFw\r\nNKgjTJcCgYA6jhLHdmlv+0dl07oGpXjW9w1NfIQhkOhX+AnBSuSZn9NxRhqNC0tC\r\nIFIsWbNPYeHmU0a6qYxfoFqvZof2TYoKVN9ZwLk9WlHWm54xOTKrg9P8NkstPjGK\r\nthZzWonZHN8bIsi3TwLcds0KWVpzXY0frZTq3Z59E9U8C7OngTArggIUQZlmZMQ6\r\nxM2zXXMukObXNJ6g2Yg=]" } }, @@ -234,6 +238,7 @@ } ], "fingerprints": { + "AssetFingerprint/v1": "", "ValidationFingerprint/v1": "[key=MIIBVAIBADANBgkqhkiG9w0BAQEFAASCAT4wggE6AgEAAkEAqPfgaTEWEP3S9w0t\r\ngsicURfo+nLW09/0KfOPinhYZ4ouzU+3xC4pSlEp8Ut9FgL0AgqNslNaK34Kq+NZ\r\njO9DAQIDAQABAkAgkuLEHLaqkWhLgNKagSajeobLS3rPT0Agm0f7k55FXVt743hw\r\nNgkp98bMNrzy9AQ1mJGbQZGrpr4c8ZAx3aRNAiEAoxK/MgGeeLui385KJ7ZOYktj\r\nhLBNAB69fKwTZFsUNh0CIQEJQRpFCcydunv2bENcN/oBTRw39E8GNv2pIcNxZkcb\r\nNQIgbYSzn3Py6AasNj6nEtCfB+i1p3F35TK/87DlPSrmAgkCIQDJLhFoj1gbwRbH\r\n/bDRPrtlRUDDx44wHoEhSDRdy77eiQIgE6z/k6I+ChN1LLttwX0galITxmAYrOBh\r\nBVl433tgTTQ=]" } }, @@ -274,6 +279,7 @@ } ], "fingerprints": { + "AssetFingerprint/v1": "", "ValidationFingerprint/v1": "[key=b3BlbnNzaC1rZXktdjEAAAAABG5vbmUAAAAEbm9uZQAAAAAAAAABAAAAVwAAAAdzc2gtcn\r\nNhAAAAAwEAAQAAAEEAqPfgaTEWEP3S9w0tgsicURfo+nLW09/0KfOPinhYZ4ouzU+3xC4p\r\nSlEp8Ut9FgL0AgqNslNaK34Kq+NZjO9DAQAAATB+9/CSfvfwkgAAAAdzc2gtcnNhAAAAQQ\r\nCo9+BpMRYQ/dL3DS2CyJxRF+j6ctbT3/Qp84+KeFhnii7NT7fELilKUSnxS30WAvQCCo2y\r\nU1orfgqr41mM70MBAAAAAwEAAQAAAEAgkuLEHLaqkWhLgNKagSajeobLS3rPT0Agm0f7k5\r\n5FXVt743hwNgkp98bMNrzy9AQ1mJGbQZGrpr4c8ZAx3aRNAAAAIBOs/5OiPgoTdSy7bcF9\r\nIGpSE8ZgGKzgYQVZeN97YE00AAAAIQCjEr8yAZ54u6Lfzkontk5iS2OEsE0AHr18rBNkWx\r\nQ2HQAAACEBCUEaRQnMnbp79mxDXDf6AU0cN/RPBjb9qSHDcWZHGzUAAAAXcGhwc2VjbGli\r\nLWdlbmVyYXRlZC1rZXkBAgME]" } }, @@ -314,6 +320,7 @@ } ], "fingerprints": { + "AssetFingerprint/v1": "", "ValidationFingerprint/v1": "[key=b3BlbnNzaC1rZXktdjEAAAAABG5vbmUAAAAEbm9uZQAAAAAAAAABAAAAMwAAAAtzc2gtZW\r\nQyNTUxOQAAACAcTZ1MXxofTe02fos2CvtcGv+htQMl0NbHpBHD8WVhOAAAAKBjs+7OY7Pu\r\nzgAAAAtzc2gtZWQyNTUxOQAAACAcTZ1MXxofTe02fos2CvtcGv+htQMl0NbHpBHD8WVhOA\r\nAAAEAP2dyJR6Q61DzjJgiw4JvCXPNvWLW8aO/MYnJvuq3KERxNnUxfGh9N7TZ+izYK+1wa\r\n/6G1AyXQ1sekEcPxZWE4AAAAHHJlZG1vbmRcbWlrZWZhbkBtaWtlZmFuLWRldjIB]" } }, @@ -354,6 +361,7 @@ } ], "fingerprints": { + "AssetFingerprint/v1": "", "ValidationFingerprint/v1": "[key=lQOsBGA3tY0BCAC6oTMz+ofIVug9yMsXhnCYTULapVrndEIjpiCvLI1V1iHkCM3E\r\nhFAYBhQGrYV7ORchyXmw6OBNYGFYt9/wZrOoOjw+0MBb+JBpWwV3qN2yuyVSLxLa\r\n/+zUd/GXK6iqbuluvzaDE8BDbRrXDFWyJ9tgK2A79/LwHbko1F4YztEn0Ef1Ptlt\r\nHFObp+UYd1cZxjTSE8KNPUmcaXgC2b4NjAiPpMQG6XwDmpmNhRGINserDvs8K7/l\r\nCx6gI866Tj090IrVCmwdRCCpMpR05G7SYwUflSB8JH7FMxEuM01qiKDj9+ZMyDrn\r\nHQZk/Y6XHsQaIZwuUcbTOHm4Wyilk3ZXwRjbABEBAAH/AwMCkRc6MhTysFtgqWY4\r\nxJM3KRf3fyEI4yFfawMkt9zRMa8vKEkacldZXPXzuOzViMnmsSDnaLyaB85f0jSs\r\nIBHwHPbgT/WM0kUWTWR+UPCWV+bQTQFHjAfn1WRZ/QhSeYJ9AdS1TvtwHBorgjiZ\r\npvrqCB2BglLjFDL/V/kUZuXO79X34Gh22JgRdggBvbUl9YBOXpgqdBKhsCA8eXKV\r\nC6OAM0xAMCyfQPHFqIf9WAS6F2GNNbDehmCOhnvnFhAz1mTkH9SDmX7ASszVPuah\r\ni4NqizCfsfSKNkyyckbQk8FSWHP9Jzqd7T5iK1Cy3emInhAyeCbHwcezHXlXtJcR\r\nxNrzDF1fx/ImKCzQcEsKL3pIknyQhxK4sLUYpKyj+wllxUTzUg+VEWWaE13Z8a0L\r\njOx9exwbbJ05pF2kTEixTj3DYIAscFvf+0++LUHgMO37KILCZw7+WoA+d1WWTwjP\r\n+Uey4z0MKTIVaw5Gec6thf6/9EoLyUTvUXxlGPoDpjtBhK51x0Wn7isIyhd4fduL\r\nUDFO5Tdf2cRSi4wZa6DjLLTCh4ALkwRw/wOJriJMVQSwhHGyC1XV5R9bdd6BqYpI\r\nYm4qH9CNja9bVgTG0YuWXoq5qZB5o2euNHRi27rChrABNPihgBE1vAxbNAC8X/aQ\r\nG3dh9j7FDsdLkTfUGn4mgpqTuWsyQI/yMhBFKYB/J9h9FPIFzdiyXnLTK1TaLRa2\r\n/dBaKEaGmLoZsCwD7im9UX9XlfITIbAEnOyFbCy6XatbWnWwMGpvEP83veweNylI\r\nTIEieqIcaUATug1t3G8rVWOirCK/kKbL2BzJvapbzijaCdxv+bX8+QqDA/+qM5Z5\r\n7HbksfwhrSBWzIBxO4mNNmA+gpACHGCEr7yYf42TSLQHekB5LmNvbYkBHAQQAQIA\r\nBgUCYDe1jQAKCRARRkqgpPVnBG06B/0ZaVYDWNAm4xlIN70jpr7a5cbA+KYYY9Hc\r\nbgcJGldo2tt+piXoy+JTksUK84xFqxBz36fHAD8SFjy5TJYn4e7jjohE3I3pnznK\r\nJV1jybgVGNhLjlSnvFpt7cXrDE86LvfjUSdUVs4SRjkqSOP4k4DEA2sfxqkdUFTl\r\nxrMBCGNF6bN87cjMVvwwigykMIID6kl0JBjxBp5jKvqhDExLAPW15BNn8AOweByW\r\nxMKw6Pe2mcubCGny3QMOxzY+weOOw42NwDqw44w9lqDRDmaKmQSk7oAHX98vXJCX\r\nGFYJh424S0KExySAldyZcjy0cA7U8dEt8gb4J6SRiKN3NXMW4nHw\r\n=7zgG]" } }, @@ -393,6 +401,7 @@ } ], "fingerprints": { + "AssetFingerprint/v1": "", "ValidationFingerprint/v1": "[key=lQOsBGA3tTsBCACVYQYofYfeosb+mxztkAUWKb27qtobb1uDgkzhjIBSwGaKU4/T\r\nbdmP2HMKFb/udXp+cbT3lWrPdRhDAx+0+PJM8Ikow27YOil6bYBbVaYMvfeXqJAO\r\nWvPaJRDYpNx5dI075NsK2IC0Uz/mKy6RmNgWqA9ePuFFdpT70o6+o/Nw9Lu0IQcK\r\n5tYUjdi4KWNt2krStpAsdpI9CnFKjV2muE1Nck6TtsDQX6zMMjaTOAbwNLZ3lVZT\r\nC3RsqgwgcrBVC1SmmYQnXp3Yy7fNLkxiukQGcLihC6AtcJQAKQrIEYmVnfYxuSFI\r\nKV3baIkPr99KqUAKS6nBNzcXG/XcvtHcHkNxABEBAAH/AwMCrKHjgtvBc5VgR63+\r\nItCsmXt/bQ81LQMXZAqggAlnGFqODralM6xL646P24HMVZFEpkV0FdnNLORUVMeM\r\nVLLBpXfMRf827dlNBlKAwzYxawMdI2qPGPO/dpOhDSUBbF9n4+xTppPKcQsSHYps\r\ndLXNDIRCkqXcNvcu8mtDTZbmuHk0iUVK9R2mNY789e2kLYbgiJRWO2e+jy2GURQT\r\naBPci2avSfbkZ2WHQKB/qVjfKwxGxJFyG3F++Ma+zH6G1Gcpr1dZJElSs0FiV/UJ\r\nJsyrvYX0um+NC0JcuecMbrk70EQ2++mOZ83WZWf8K9TJgIoL9NKYPFVaU3pdIMwa\r\nIWlJsPt42+wvx1+buHmIaMsBc3hcVapAvSU20xtuVL8RCpdn8QdbIcuqgD4kCTxu\r\nmJL7B1HRPau0IzKSLwrp5yxpDadEfAuKWKaRmAl5KwouRlDW08g25kp8F3jNGhxj\r\nG92Ch8uj0yH34L+Ff3AZe2INeB51mIgg0m3eTYdfKyElJbGsuGqKbJon4PaQjyxa\r\npbBwVKmW9uY4FH//WdCdPIFCyF7G2I4pqZeOLd0Qoa9yAkRTqnGAkzVZTr7sS6Ks\r\nzw9f2ig6/nMPplbZ2B3h56hZeNmk2GF7miu7kiDaoMTronlVmgYksVmoA4dY2LXK\r\nhOx5m9zTR1wT/2YeipVqHelJ5E8CwEaJZXilYPnRiNSIc+N8cM9hL2fXYQh4GXbw\r\nak4tSzYeghkt38MzU14Ps0murDG7upDm/5aqEKYhtBwtH5FQI71BfPb3g/ASU5pc\r\nzSOEHxwEmCe/hW579x7Ctyoc8B3w+1x9otCacYwscPojLx1VzM4OU1vXR7OJ+7NM\r\nb7v5187T4+ATIQRc9Z7gXbQqUk4P7xidmEgFgGJjN7QHYkBhLmNvbYkBHAQQAQIA\r\nBgUCYDe1OwAKCRBuNGPharMfyHaJB/4ry77I/CBcW5bPDhqDFSe3Ve2g4ffaWSHF\r\nyG/L6wNONXTR/2gPue3jMQHgwLagho8FsXG1dsa8s7qQ7/N5fWUTKdkFEnPBroGN\r\ntBEWZMlnxnjBquYrFZxP/SLPU2WG+6bjjOVnCXFOv9DM1eCoiE57MMW2yVk35NoL\r\nJEsB5ZCS2/7nZMVLObaWHAFyQwfAw/fYV87FM0VN65FtGL1oLMyFRpvS4RR6TPJP\r\nLMbSWFVgdYuerfsqFFMQHxYgnWvihwFg83v3AsTGi9vW2Vk0wKsjjDNmBWBi41vY\r\nbrgVraT5f4k+lNIADrWtwfCJ5e7yMOPRXyscTU9qlocZaqtxoI2R\r\n=MtkG]" } }, @@ -433,6 +442,7 @@ } ], "fingerprints": { + "AssetFingerprint/v1": "", "ValidationFingerprint/v1": "[key=AAABAD94G+JwkxQxCqIXZ0HcgDA886H4ZcIYRfhdgagwIWDWmevnOjwBie0CqMrV\r\n0OU/leDZVQdaC3YOykOxTs1nHYdVxtx3zmMF1XO9rs0ewq4fBVOR8kO1PkU66tcl\r\nJ/ttL4hrTxDWnpY1a73b5xqHLandeEcY9N8iCMqTpqO8KTdehcWxUnY1F4acchsc\r\nepnfy+xkyNmhnsduDCOaSpJVrr14pCrec9YSFFD1Goilb5cI8BXGEsPXINUav2uy\r\nQOdn+MnXpAy9CsVMckB+wqphLFV1Rf51QmQC+MqxtQaQPcUp7R9wmWNSaDFWqI61\r\n+/wKlg98jmIy4bJF0/kNdnEQA60AAACBAPckwrwM3QxqYb51Rodog0puCAGHQFY5\r\nwIwO79SyLRyjPhsH4aPt2C19Zh2hHAtqQl0jpJhKiTsN+kE77oQtNDjo7L+gbpKh\r\nWg6i6e6ubn0xlBA3kvqB//3JOPzsHQtWT1tPMoTujMT9Qly6mm2Ixsa9lWr0ExiX\r\njU0UvP5wNrRTAAAAgQDKtZzAYG4FU3NnEyYnzhIgcIV6E5wY9eUSPAxpG+J8pwwW\r\n0Ezo1lULNPbWqe0oBODaB2to9SciSzXujJDpijIYhQgRiKyYfyMSP0Qn9yoQsK86\r\n6fC4NJ6s8Pq9eOzm/MJbPcUcBdgDhdyN9xFXjrhyDD1gnRx+GTfORJMVhUnjAQAA\r\nAIEAyR93l3YR6Tdu3p0rSiK0bPxaYCXU1VYCLQXtEJPl+K7dL8i5Gu3FxIuQd25v\r\n8aLAT9iJENGZagtdstsz6/NdG2usqkf5Gw9X3+00ZTZqmkH5JDjcu+4/t5wtzBfz\r\n2YBvoe+SeNbfa1F8oal+SsKPZ61QbOwMC7u0UlI6PDslkHM=]" } }, @@ -473,6 +483,7 @@ } ], "fingerprints": { + "AssetFingerprint/v1": "", "ValidationFingerprint/v1": "[key=IJLixBy2qpFoS4DSmoEmo3qGy0t6z09AIJtH+5OeRV1be+N4cDYJKffGzDa88vQENZiRm0GRq6a+HPGQMd2kTQ==]" } } diff --git a/Src/Plugins/Tests.Security/TestData/SecurePlaintextSecrets/ExpectedOutputs/SEC101_014.FacebookAccessToken.sarif b/Src/Plugins/Tests.Security/TestData/SecurePlaintextSecrets/ExpectedOutputs/SEC101_014.FacebookAccessToken.sarif index 00d595ed..a52e8413 100644 --- a/Src/Plugins/Tests.Security/TestData/SecurePlaintextSecrets/ExpectedOutputs/SEC101_014.FacebookAccessToken.sarif +++ b/Src/Plugins/Tests.Security/TestData/SecurePlaintextSecrets/ExpectedOutputs/SEC101_014.FacebookAccessToken.sarif @@ -74,6 +74,7 @@ } ], "fingerprints": { + "AssetFingerprint/v1": "[platform=Facebook]", "ValidationFingerprint/v1": "[key=EAACEdEose0cBAtestjunk111111]" } }, @@ -114,6 +115,7 @@ } ], "fingerprints": { + "AssetFingerprint/v1": "[platform=Facebook]", "ValidationFingerprint/v1": "[key=EAACEdEose0cBAtestjunk22222222]" } } diff --git a/Src/Plugins/Tests.Security/TestData/SecurePlaintextSecrets/ExpectedOutputs/SEC101_015.GoogleGCMServiceAccount.sarif b/Src/Plugins/Tests.Security/TestData/SecurePlaintextSecrets/ExpectedOutputs/SEC101_015.GoogleGCMServiceAccount.sarif index 69e55330..c5e8181b 100644 --- a/Src/Plugins/Tests.Security/TestData/SecurePlaintextSecrets/ExpectedOutputs/SEC101_015.GoogleGCMServiceAccount.sarif +++ b/Src/Plugins/Tests.Security/TestData/SecurePlaintextSecrets/ExpectedOutputs/SEC101_015.GoogleGCMServiceAccount.sarif @@ -74,6 +74,7 @@ } ], "fingerprints": { + "AssetFingerprint/v1": "[platform=Google][resource=\"type\" : \"service_account\"]", "ValidationFingerprint/v1": "[resource=\"type\" : \"service_account\"]" } }, @@ -114,6 +115,7 @@ } ], "fingerprints": { + "AssetFingerprint/v1": "[platform=Google][resource=type\" : \"service_account\"]", "ValidationFingerprint/v1": "[resource=type\" : \"service_account\"]" } }, @@ -154,6 +156,7 @@ } ], "fingerprints": { + "AssetFingerprint/v1": "[platform=Google][resource=type : service_account]", "ValidationFingerprint/v1": "[resource=type : service_account]" } } diff --git a/Src/Plugins/Tests.Security/TestData/SecurePlaintextSecrets/ExpectedOutputs/SEC101_016.StripeApiKey.sarif b/Src/Plugins/Tests.Security/TestData/SecurePlaintextSecrets/ExpectedOutputs/SEC101_016.StripeApiKey.sarif index f99b4057..832518a7 100644 --- a/Src/Plugins/Tests.Security/TestData/SecurePlaintextSecrets/ExpectedOutputs/SEC101_016.StripeApiKey.sarif +++ b/Src/Plugins/Tests.Security/TestData/SecurePlaintextSecrets/ExpectedOutputs/SEC101_016.StripeApiKey.sarif @@ -90,6 +90,7 @@ } ], "fingerprints": { + "AssetFingerprint/v1": "[platform=Stripe]", "ValidationFingerprint/v1": "[key=sk_test_0deadebeef00deadebeef00deadebeef00deadebeef00deadebeef00deadebeef00deadebeef00deadebeef00deadebeef0]" } }, @@ -130,6 +131,7 @@ } ], "fingerprints": { + "AssetFingerprint/v1": "[platform=Stripe]", "ValidationFingerprint/v1": "[key=sk_live_0deadebeef00deadebeef00deadebeef00deadebeef00deadebeef00deadebeef00deadebeef00deadebeef00deadebeef0]" } }, @@ -170,6 +172,7 @@ } ], "fingerprints": { + "AssetFingerprint/v1": "", "ValidationFingerprint/v1": "[key=sk_test_0deadebeef00deadebeef00deadebeef]" } }, @@ -210,6 +213,7 @@ } ], "fingerprints": { + "AssetFingerprint/v1": "", "ValidationFingerprint/v1": "[key=sk_live_0deadebeef00deadebeef00deadebeef]" } } diff --git a/Src/Plugins/Tests.Security/TestData/SecurePlaintextSecrets/ExpectedOutputs/SEC101_017.NpmAuthorToken.sarif b/Src/Plugins/Tests.Security/TestData/SecurePlaintextSecrets/ExpectedOutputs/SEC101_017.NpmAuthorToken.sarif index 2c5c786a..79114c51 100644 --- a/Src/Plugins/Tests.Security/TestData/SecurePlaintextSecrets/ExpectedOutputs/SEC101_017.NpmAuthorToken.sarif +++ b/Src/Plugins/Tests.Security/TestData/SecurePlaintextSecrets/ExpectedOutputs/SEC101_017.NpmAuthorToken.sarif @@ -74,6 +74,7 @@ } ], "fingerprints": { + "AssetFingerprint/v1": "[platform=Npm]", "ValidationFingerprint/v1": "[key=338a0fd3-7378-4ce1-8432-bbfc0f6777ca]" } }, @@ -114,6 +115,7 @@ } ], "fingerprints": { + "AssetFingerprint/v1": "[platform=Npm]", "ValidationFingerprint/v1": "[key=338a0fd3-7378-4ce1-8432-bbfc0f6777cb]" } } diff --git a/Src/Plugins/Tests.Security/TestData/SecurePlaintextSecrets/ExpectedOutputs/SEC101_019.PicaticApiKey.sarif b/Src/Plugins/Tests.Security/TestData/SecurePlaintextSecrets/ExpectedOutputs/SEC101_019.PicaticApiKey.sarif index 2de3aef0..ee6e874f 100644 --- a/Src/Plugins/Tests.Security/TestData/SecurePlaintextSecrets/ExpectedOutputs/SEC101_019.PicaticApiKey.sarif +++ b/Src/Plugins/Tests.Security/TestData/SecurePlaintextSecrets/ExpectedOutputs/SEC101_019.PicaticApiKey.sarif @@ -90,6 +90,7 @@ } ], "fingerprints": { + "AssetFingerprint/v1": "[platform=Stripe]", "ValidationFingerprint/v1": "[key=sk_test_01234567890123456789012345678901]" } }, @@ -130,6 +131,7 @@ } ], "fingerprints": { + "AssetFingerprint/v1": "[platform=Stripe]", "ValidationFingerprint/v1": "[key=sk_live_01234567890123456789012345678901]" } }, @@ -170,6 +172,7 @@ } ], "fingerprints": { + "AssetFingerprint/v1": "", "ValidationFingerprint/v1": "[key=sk_test_01234567890123456789012345678901]" } }, @@ -210,6 +213,7 @@ } ], "fingerprints": { + "AssetFingerprint/v1": "", "ValidationFingerprint/v1": "[key=sk_live_01234567890123456789012345678901]" } } diff --git a/Src/Plugins/Tests.Security/TestData/SecurePlaintextSecrets/ExpectedOutputs/SEC101_022.PayPalBraintreeAccessToken.sarif b/Src/Plugins/Tests.Security/TestData/SecurePlaintextSecrets/ExpectedOutputs/SEC101_022.PayPalBraintreeAccessToken.sarif index edf0c3db..0ada77b5 100644 --- a/Src/Plugins/Tests.Security/TestData/SecurePlaintextSecrets/ExpectedOutputs/SEC101_022.PayPalBraintreeAccessToken.sarif +++ b/Src/Plugins/Tests.Security/TestData/SecurePlaintextSecrets/ExpectedOutputs/SEC101_022.PayPalBraintreeAccessToken.sarif @@ -74,6 +74,7 @@ } ], "fingerprints": { + "AssetFingerprint/v1": "", "ValidationFingerprint/v1": "[key=1111111111012345$01234567890123456789012345678901]" } }, @@ -114,6 +115,7 @@ } ], "fingerprints": { + "AssetFingerprint/v1": "", "ValidationFingerprint/v1": "[key=2222222222012345$01234567890123456789012345678901]" } } diff --git a/Src/Plugins/Tests.Security/TestData/SecurePlaintextSecrets/ExpectedOutputs/SEC101_024.TwilioApiKey.sarif b/Src/Plugins/Tests.Security/TestData/SecurePlaintextSecrets/ExpectedOutputs/SEC101_024.TwilioApiKey.sarif index 129508c5..1107bf69 100644 --- a/Src/Plugins/Tests.Security/TestData/SecurePlaintextSecrets/ExpectedOutputs/SEC101_024.TwilioApiKey.sarif +++ b/Src/Plugins/Tests.Security/TestData/SecurePlaintextSecrets/ExpectedOutputs/SEC101_024.TwilioApiKey.sarif @@ -74,6 +74,7 @@ } ], "fingerprints": { + "AssetFingerprint/v1": "", "ValidationFingerprint/v1": "[key=SK11111111110123456789012345678901]" } }, @@ -114,6 +115,7 @@ } ], "fingerprints": { + "AssetFingerprint/v1": "", "ValidationFingerprint/v1": "[key=SK22222222220123456789012345678901]" } } diff --git a/Src/Plugins/Tests.Security/TestData/SecurePlaintextSecrets/ExpectedOutputs/SEC101_025.SendGridApiKey.sarif b/Src/Plugins/Tests.Security/TestData/SecurePlaintextSecrets/ExpectedOutputs/SEC101_025.SendGridApiKey.sarif index 4ccff6eb..aff4b1a3 100644 --- a/Src/Plugins/Tests.Security/TestData/SecurePlaintextSecrets/ExpectedOutputs/SEC101_025.SendGridApiKey.sarif +++ b/Src/Plugins/Tests.Security/TestData/SecurePlaintextSecrets/ExpectedOutputs/SEC101_025.SendGridApiKey.sarif @@ -74,6 +74,7 @@ } ], "fingerprints": { + "AssetFingerprint/v1": "", "ValidationFingerprint/v1": "[key=SG.0deadbeef0deadbeef0dea.deadbeef0deadbeef0deadbeef0deadbeef0deadbee]" } } diff --git a/Src/Plugins/Tests.Security/TestData/SecurePlaintextSecrets/ExpectedOutputs/SEC101_026.MailgunApiKey.sarif b/Src/Plugins/Tests.Security/TestData/SecurePlaintextSecrets/ExpectedOutputs/SEC101_026.MailgunApiKey.sarif index e203c773..e4facb4e 100644 --- a/Src/Plugins/Tests.Security/TestData/SecurePlaintextSecrets/ExpectedOutputs/SEC101_026.MailgunApiKey.sarif +++ b/Src/Plugins/Tests.Security/TestData/SecurePlaintextSecrets/ExpectedOutputs/SEC101_026.MailgunApiKey.sarif @@ -74,6 +74,7 @@ } ], "fingerprints": { + "AssetFingerprint/v1": "[acct=deadbeef0deadbeef0deadbeef.mailgun.org]", "ValidationFingerprint/v1": "[acct=deadbeef0deadbeef0deadbeef.mailgun.org][key=0deadbeef00deadbeef00deadbeef000-deadbeef-deadbeef]" } } diff --git a/Src/Plugins/Tests.Security/TestData/SecurePlaintextSecrets/ExpectedOutputs/SEC101_027.MailChimpApiKey.sarif b/Src/Plugins/Tests.Security/TestData/SecurePlaintextSecrets/ExpectedOutputs/SEC101_027.MailChimpApiKey.sarif index b7d49213..74a06f60 100644 --- a/Src/Plugins/Tests.Security/TestData/SecurePlaintextSecrets/ExpectedOutputs/SEC101_027.MailChimpApiKey.sarif +++ b/Src/Plugins/Tests.Security/TestData/SecurePlaintextSecrets/ExpectedOutputs/SEC101_027.MailChimpApiKey.sarif @@ -74,6 +74,7 @@ } ], "fingerprints": { + "AssetFingerprint/v1": "", "ValidationFingerprint/v1": "[key=11111111110123456789012345678901-us012345678901]" } }, @@ -114,6 +115,7 @@ } ], "fingerprints": { + "AssetFingerprint/v1": "", "ValidationFingerprint/v1": "[key=22222222220123456789012345678901-us012345678901]" } } diff --git a/Src/Plugins/Tests.Security/TestData/SecurePlaintextSecrets/ExpectedOutputs/SEC101_031.NuGetApiKey.sarif b/Src/Plugins/Tests.Security/TestData/SecurePlaintextSecrets/ExpectedOutputs/SEC101_031.NuGetApiKey.sarif index 9e50b823..7cf04472 100644 --- a/Src/Plugins/Tests.Security/TestData/SecurePlaintextSecrets/ExpectedOutputs/SEC101_031.NuGetApiKey.sarif +++ b/Src/Plugins/Tests.Security/TestData/SecurePlaintextSecrets/ExpectedOutputs/SEC101_031.NuGetApiKey.sarif @@ -74,6 +74,7 @@ } ], "fingerprints": { + "AssetFingerprint/v1": "", "ValidationFingerprint/v1": "[key=oy20deadbeef0deadbee500deadbeef0deadbee50dead0]" } } diff --git a/Src/Plugins/Tests.Security/TestData/SecurePlaintextSecrets/ExpectedOutputs/SEC101_042.DynatraceToken.sarif b/Src/Plugins/Tests.Security/TestData/SecurePlaintextSecrets/ExpectedOutputs/SEC101_042.DynatraceToken.sarif index cfa17bd8..3ef872c1 100644 --- a/Src/Plugins/Tests.Security/TestData/SecurePlaintextSecrets/ExpectedOutputs/SEC101_042.DynatraceToken.sarif +++ b/Src/Plugins/Tests.Security/TestData/SecurePlaintextSecrets/ExpectedOutputs/SEC101_042.DynatraceToken.sarif @@ -74,6 +74,7 @@ } ], "fingerprints": { + "AssetFingerprint/v1": "", "ValidationFingerprint/v1": "[key=dt0a11.111111111101234567890123.0123456789012345678901234567890123456789012345678901234567890123]" } }, @@ -114,6 +115,7 @@ } ], "fingerprints": { + "AssetFingerprint/v1": "", "ValidationFingerprint/v1": "[key=dt0a11.222222222201234567890123.0123456789012345678901234567890123456789012345678901234567890123]" } } diff --git a/Src/Plugins/Tests.Security/TestData/SecurePlaintextSecrets/ExpectedOutputs/SEC101_043.ShopifySharedSecret.sarif b/Src/Plugins/Tests.Security/TestData/SecurePlaintextSecrets/ExpectedOutputs/SEC101_043.ShopifySharedSecret.sarif index 2be0b216..40d6c2d3 100644 --- a/Src/Plugins/Tests.Security/TestData/SecurePlaintextSecrets/ExpectedOutputs/SEC101_043.ShopifySharedSecret.sarif +++ b/Src/Plugins/Tests.Security/TestData/SecurePlaintextSecrets/ExpectedOutputs/SEC101_043.ShopifySharedSecret.sarif @@ -74,6 +74,7 @@ } ], "fingerprints": { + "AssetFingerprint/v1": "", "ValidationFingerprint/v1": "[key=shpss_11111111110123456789012345678901]" } }, @@ -114,6 +115,7 @@ } ], "fingerprints": { + "AssetFingerprint/v1": "", "ValidationFingerprint/v1": "[key=shpss_22222222220123456789012345678901]" } } diff --git a/Src/Plugins/Tests.Security/TestData/SecurePlaintextSecrets/ExpectedOutputs/SEC101_044.ShopifyAccessToken.sarif b/Src/Plugins/Tests.Security/TestData/SecurePlaintextSecrets/ExpectedOutputs/SEC101_044.ShopifyAccessToken.sarif index 5c59cae3..cde2fae0 100644 --- a/Src/Plugins/Tests.Security/TestData/SecurePlaintextSecrets/ExpectedOutputs/SEC101_044.ShopifyAccessToken.sarif +++ b/Src/Plugins/Tests.Security/TestData/SecurePlaintextSecrets/ExpectedOutputs/SEC101_044.ShopifyAccessToken.sarif @@ -74,6 +74,7 @@ } ], "fingerprints": { + "AssetFingerprint/v1": "", "ValidationFingerprint/v1": "[key=shpat_11111111110123456789012345678901]" } }, @@ -114,6 +115,7 @@ } ], "fingerprints": { + "AssetFingerprint/v1": "", "ValidationFingerprint/v1": "[key=shpca_22222222220123456789012345678901]" } }, @@ -154,6 +156,7 @@ } ], "fingerprints": { + "AssetFingerprint/v1": "", "ValidationFingerprint/v1": "[key=shppa_33333333330123456789012345678901]" } } diff --git a/Src/Plugins/Tests.Security/TestData/SecurePlaintextSecrets/ExpectedOutputs/SEC101_045.PostgreSqlConnectionString.sarif b/Src/Plugins/Tests.Security/TestData/SecurePlaintextSecrets/ExpectedOutputs/SEC101_045.PostgreSqlConnectionString.sarif index b20abc84..2762abd1 100644 --- a/Src/Plugins/Tests.Security/TestData/SecurePlaintextSecrets/ExpectedOutputs/SEC101_045.PostgreSqlConnectionString.sarif +++ b/Src/Plugins/Tests.Security/TestData/SecurePlaintextSecrets/ExpectedOutputs/SEC101_045.PostgreSqlConnectionString.sarif @@ -74,6 +74,7 @@ } ], "fingerprints": { + "AssetFingerprint/v1": "[acct=my_user][host=my_host][port=5555][resource=my_db]", "ValidationFingerprint/v1": "[acct=my_user][host=my_host][pwd=my_pw_1][port=5555][resource=my_db]" } }, @@ -114,6 +115,7 @@ } ], "fingerprints": { + "AssetFingerprint/v1": "[acct=my_user][host=my_host][port=5555][resource=my_db]", "ValidationFingerprint/v1": "[acct=my_user][host=my_host][pwd=my_pw_2][port=5555][resource=my_db]" } }, @@ -154,6 +156,7 @@ } ], "fingerprints": { + "AssetFingerprint/v1": "[acct=my_user][host=my_host][port=5555]", "ValidationFingerprint/v1": "[acct=my_user][host=my_host][pwd=my_pw_3][port=5555]" } }, @@ -194,6 +197,7 @@ } ], "fingerprints": { + "AssetFingerprint/v1": "[acct=my_user][host=my_host][port=5555]", "ValidationFingerprint/v1": "[acct=my_user][host=my_host][pwd=my_pw_4][port=5555]" } }, @@ -234,6 +238,7 @@ } ], "fingerprints": { + "AssetFingerprint/v1": "[acct=my_user][host=my_host][port=5555]", "ValidationFingerprint/v1": "[acct=my_user][host=my_host][pwd=my_pw_5][port=5555]" } }, @@ -274,6 +279,7 @@ } ], "fingerprints": { + "AssetFingerprint/v1": "[acct=my_user][host=my_host]", "ValidationFingerprint/v1": "[acct=my_user][host=my_host][pwd=my_pw_5]" } }, @@ -314,6 +320,7 @@ } ], "fingerprints": { + "AssetFingerprint/v1": "[acct=my_user][host=my_host][port=5555]", "ValidationFingerprint/v1": "[acct=my_user][host=my_host][pwd=my_pw_6][port=5555]" } }, @@ -354,6 +361,7 @@ } ], "fingerprints": { + "AssetFingerprint/v1": "[acct=my_user][host=my_host][port=5555][resource=my_db]", "ValidationFingerprint/v1": "[acct=my_user][host=my_host][pwd=my_pw_7][port=5555][resource=my_db]" } }, @@ -394,6 +402,7 @@ } ], "fingerprints": { + "AssetFingerprint/v1": "[acct=my_user][host=my_host][port=5555]", "ValidationFingerprint/v1": "[acct=my_user][host=my_host][pwd=my_pw_7][port=5555]" } }, @@ -434,6 +443,7 @@ } ], "fingerprints": { + "AssetFingerprint/v1": "[acct=my_user][host=my_host][port=5555][resource=my_db]", "ValidationFingerprint/v1": "[acct=my_user][host=my_host][pwd=my_pw_8][port=5555][resource=my_db]" } }, @@ -474,6 +484,7 @@ } ], "fingerprints": { + "AssetFingerprint/v1": "[acct=my_user][host=my_host][port=5555][resource=my_db]", "ValidationFingerprint/v1": "[acct=my_user][host=my_host][pwd=my_pw_9][port=5555][resource=my_db]" } } diff --git a/Src/Plugins/Tests.Security/TestData/SecurePlaintextSecrets/ExpectedOutputs/SEC101_046.SqlConnectionString.sarif b/Src/Plugins/Tests.Security/TestData/SecurePlaintextSecrets/ExpectedOutputs/SEC101_046.SqlConnectionString.sarif index 2b4f66da..77b404df 100644 --- a/Src/Plugins/Tests.Security/TestData/SecurePlaintextSecrets/ExpectedOutputs/SEC101_046.SqlConnectionString.sarif +++ b/Src/Plugins/Tests.Security/TestData/SecurePlaintextSecrets/ExpectedOutputs/SEC101_046.SqlConnectionString.sarif @@ -115,6 +115,7 @@ } ], "fingerprints": { + "AssetFingerprint/v1": "[acct=username2][host=tcp][resource=database2]", "ValidationFingerprint/v1": "[acct=username2][host=tcp][pwd=password2][resource=database2]" } }, @@ -155,6 +156,7 @@ } ], "fingerprints": { + "AssetFingerprint/v1": "[acct=username2][host=tcp:servername2.database.windows.net,1433][platform=Azure][resource=database2]", "ValidationFingerprint/v1": "[acct=username2][host=tcp:servername2.database.windows.net,1433][pwd=password2][resource=database2]" } }, @@ -195,6 +197,7 @@ } ], "fingerprints": { + "AssetFingerprint/v1": "[acct=username4][host=servername4][platform=SqlOnPremise][resource=database4]", "ValidationFingerprint/v1": "[acct=username4][host=servername4][pwd=password4][resource=database4]" } }, @@ -235,6 +238,7 @@ } ], "fingerprints": { + "AssetFingerprint/v1": "[acct=username5][host=database5][platform=SqlOnPremise][resource=database5]", "ValidationFingerprint/v1": "[acct=username5][host=database5][pwd=password5][resource=database5]" } }, @@ -275,6 +279,7 @@ } ], "fingerprints": { + "AssetFingerprint/v1": "[acct=username6][host=servername6][platform=SqlOnPremise][resource=database6]", "ValidationFingerprint/v1": "[acct=username6][host=servername6][pwd=password6][resource=database6]" } }, @@ -315,6 +320,7 @@ } ], "fingerprints": { + "AssetFingerprint/v1": "[acct=username15][host=servername15][platform=SqlOnPremise][resource=database15]", "ValidationFingerprint/v1": "[acct=username15][host=servername15][pwd=password15][resource=database15]" } }, @@ -355,6 +361,7 @@ } ], "fingerprints": { + "AssetFingerprint/v1": "[acct=username8][host=servername8][platform=SqlOnPremise][resource=database8]", "ValidationFingerprint/v1": "[acct=username8][host=servername8][pwd=password8][resource=database8]" } }, @@ -395,6 +402,7 @@ } ], "fingerprints": { + "AssetFingerprint/v1": "[acct=username9][host=servername9][platform=SqlOnPremise][resource=database9]", "ValidationFingerprint/v1": "[acct=username9][host=servername9][pwd=password9][resource=database9]" } }, @@ -435,6 +443,7 @@ } ], "fingerprints": { + "AssetFingerprint/v1": "[acct=username10][host=servername10][platform=SqlOnPremise][resource=database10]", "ValidationFingerprint/v1": "[acct=username10][host=servername10][pwd=password10][resource=database10]" } }, @@ -475,6 +484,7 @@ } ], "fingerprints": { + "AssetFingerprint/v1": "[acct=username14][host=servername14][platform=SqlOnPremise][resource=database14]", "ValidationFingerprint/v1": "[acct=username14][host=servername14][pwd=password14\"][resource=database14]" } }, @@ -515,6 +525,7 @@ } ], "fingerprints": { + "AssetFingerprint/v1": "[acct=username16][host=servername16][platform=SqlOnPremise][resource=database16]", "ValidationFingerprint/v1": "[acct=username16][host=servername16][pwd=password16\"][resource=database16]" } }, @@ -555,6 +566,7 @@ } ], "fingerprints": { + "AssetFingerprint/v1": "[acct=ab][host=localhost][platform=SqlOnPremise][resource=AdventureWorks]", "ValidationFingerprint/v1": "[acct=ab][host=localhost][pwd=a1Pass@@11][resource=AdventureWorks]" } }, @@ -595,6 +607,7 @@ } ], "fingerprints": { + "AssetFingerprint/v1": "[acct=username1][host=servername1.database.windows.net:1433][platform=Azure][resource=database1]", "ValidationFingerprint/v1": "[acct=username1][host=servername1.database.windows.net:1433][pwd=password1][resource=database1]" } }, @@ -635,6 +648,7 @@ } ], "fingerprints": { + "AssetFingerprint/v1": "[acct=username11][host=localhost][platform=SqlOnPremise][resource=database11]", "ValidationFingerprint/v1": "[acct=username11][host=localhost][pwd=password11][resource=database11]" } }, @@ -675,6 +689,7 @@ } ], "fingerprints": { + "AssetFingerprint/v1": "[acct=username12][host=localhost][platform=SqlOnPremise][resource=database12]", "ValidationFingerprint/v1": "[acct=username12][host=localhost][pwd=password12][resource=database12]" } }, @@ -715,6 +730,7 @@ } ], "fingerprints": { + "AssetFingerprint/v1": "[acct=username13][host=localhost][platform=SqlOnPremise][resource=database13]", "ValidationFingerprint/v1": "[acct=username13][host=localhost][pwd=password13][resource=database13]" } }, @@ -755,6 +771,7 @@ } ], "fingerprints": { + "AssetFingerprint/v1": "[acct=username3][host=tcp:servername3.database.windows.net,1433][platform=Azure][resource=databse3]", "ValidationFingerprint/v1": "[acct=username3][host=tcp:servername3.database.windows.net,1433][pwd=password3][resource=databse3]" } }, @@ -795,6 +812,7 @@ } ], "fingerprints": { + "AssetFingerprint/v1": "[acct=username][host=tcp][platform=SqlOnPremise][resource=database2]", "ValidationFingerprint/v1": "[acct=username][host=tcp][pwd=password2][resource=database2]" } } diff --git a/Src/Plugins/Tests.Security/TestData/SecurePlaintextSecrets/ExpectedOutputs/SEC101_047.MySqlConnectionString.sarif b/Src/Plugins/Tests.Security/TestData/SecurePlaintextSecrets/ExpectedOutputs/SEC101_047.MySqlConnectionString.sarif index d0155193..27624a25 100644 --- a/Src/Plugins/Tests.Security/TestData/SecurePlaintextSecrets/ExpectedOutputs/SEC101_047.MySqlConnectionString.sarif +++ b/Src/Plugins/Tests.Security/TestData/SecurePlaintextSecrets/ExpectedOutputs/SEC101_047.MySqlConnectionString.sarif @@ -115,6 +115,7 @@ } ], "fingerprints": { + "AssetFingerprint/v1": "[acct=username@servername][host=your-host][port=3306][resource=your-database]", "ValidationFingerprint/v1": "[acct=username@servername][host=your-host][pwd=your-password][port=3306][resource=your-database]" } }, @@ -155,6 +156,7 @@ } ], "fingerprints": { + "AssetFingerprint/v1": "[acct=username@servername][host=your-host][port=3306][resource=your-database]", "ValidationFingerprint/v1": "[acct=username@servername][host=your-host][pwd=password_11][port=3306][resource=your-database]" } }, @@ -195,6 +197,7 @@ } ], "fingerprints": { + "AssetFingerprint/v1": "[acct=username@servername][host=your-host][platform=SqlOnPremise][resource=your-database]", "ValidationFingerprint/v1": "[acct=username@servername][host=your-host][pwd=your-password][resource=your-database]" } }, @@ -235,6 +238,7 @@ } ], "fingerprints": { + "AssetFingerprint/v1": "[acct=username@servername][host=your-host][platform=SqlOnPremise][resource=your-database]", "ValidationFingerprint/v1": "[acct=username@servername][host=your-host][pwd=password_11][resource=your-database]" } }, @@ -275,6 +279,7 @@ } ], "fingerprints": { + "AssetFingerprint/v1": "[acct=\"WPAdmin@mydemoserver\"][host=\"mydemoserver.mariadb.database.azure.com\"][platform=Azure][resource=\"wpdb\"]", "ValidationFingerprint/v1": "[acct=\"WPAdmin@mydemoserver\"][host=\"mydemoserver.mariadb.database.azure.com\"][pwd=\"][resource=\"wpdb\"]" } }, @@ -315,6 +320,7 @@ } ], "fingerprints": { + "AssetFingerprint/v1": "[acct=\"{username@servername}\"][host=\"{your_host}\"][platform=SqlOnPremise][resource={your_database}]", "ValidationFingerprint/v1": "[acct=\"{username@servername}\"][host=\"{your_host}\"][pwd={your_password}][resource={your_database}]" } }, @@ -355,6 +361,7 @@ } ], "fingerprints": { + "AssetFingerprint/v1": "[acct=username@some-database-name][host=some-database-name.mysql.database.azure.com][platform=Azure][port=3306][resource=catalog_db]", "ValidationFingerprint/v1": "[acct=username@some-database-name][host=some-database-name.mysql.database.azure.com][pwd=password_1][port=3306][resource=catalog_db]" } }, @@ -395,6 +402,7 @@ } ], "fingerprints": { + "AssetFingerprint/v1": "[acct=username@some-database-name][host=some-database-name.mysql.database.azure.com][platform=Azure][port=3306][resource=catalog_db]", "ValidationFingerprint/v1": "[acct=username@some-database-name][host=some-database-name.mysql.database.azure.com][pwd=password_2][port=3306][resource=catalog_db]" } }, @@ -435,6 +443,7 @@ } ], "fingerprints": { + "AssetFingerprint/v1": "[acct=username@some-database-name][host=some-database-name.mysql.database.azure.com][platform=Azure][resource=catalog_db]", "ValidationFingerprint/v1": "[acct=username@some-database-name][host=some-database-name.mysql.database.azure.com][pwd=password_2][resource=catalog_db]" } }, @@ -475,6 +484,7 @@ } ], "fingerprints": { + "AssetFingerprint/v1": "[acct=username@some-database-name][host=some-database-name.mysql.database.azure.com][platform=Azure][port=3306][resource=catalog_db]", "ValidationFingerprint/v1": "[acct=username@some-database-name][host=some-database-name.mysql.database.azure.com][pwd=password_3][port=3306][resource=catalog_db]" } }, @@ -515,6 +525,7 @@ } ], "fingerprints": { + "AssetFingerprint/v1": "[acct=username@some-database-name][host=some-database-name.mysql.database.azure.com][platform=Azure][resource=catalog_db]", "ValidationFingerprint/v1": "[acct=username@some-database-name][host=some-database-name.mysql.database.azure.com][pwd=password_4][resource=catalog_db]" } }, @@ -555,6 +566,7 @@ } ], "fingerprints": { + "AssetFingerprint/v1": "[acct=username@servername][host=your-host][platform=SqlOnPremise][port=3306][resource=your-database]", "ValidationFingerprint/v1": "[acct=username@servername][host=your-host][pwd=your-password][port=3306][resource=your-database]" } }, @@ -595,6 +607,7 @@ } ], "fingerprints": { + "AssetFingerprint/v1": "[acct=username@servername][host=your-host][platform=SqlOnPremise][port=3306][resource=your-database]", "ValidationFingerprint/v1": "[acct=username@servername][host=your-host][pwd=password_11][port=3306][resource=your-database]" } }, @@ -635,6 +648,7 @@ } ], "fingerprints": { + "AssetFingerprint/v1": "[acct=username@some-database-name][host=some-database-name.mysql.database.azure.com:3306][platform=Azure]", "ValidationFingerprint/v1": "[acct=username@some-database-name][host=some-database-name.mysql.database.azure.com:3306][pwd=PASSword_5]" } }, @@ -675,6 +689,7 @@ } ], "fingerprints": { + "AssetFingerprint/v1": "[acct=username@some-database-name]", "ValidationFingerprint/v1": "[acct=username@some-database-name][pwd=PASSword_5]" } }, @@ -715,6 +730,7 @@ } ], "fingerprints": { + "AssetFingerprint/v1": "[acct=cleardbusername1]", "ValidationFingerprint/v1": "[acct=cleardbusername1][pwd=cleardb_PASSWORD1]" } } diff --git a/Src/Plugins/Tests.Security/TestData/SecurePlaintextSecrets/ExpectedOutputs/SEC101_048.CloudantConnectionString.sarif b/Src/Plugins/Tests.Security/TestData/SecurePlaintextSecrets/ExpectedOutputs/SEC101_048.CloudantConnectionString.sarif index 014abe78..ed6cd654 100644 --- a/Src/Plugins/Tests.Security/TestData/SecurePlaintextSecrets/ExpectedOutputs/SEC101_048.CloudantConnectionString.sarif +++ b/Src/Plugins/Tests.Security/TestData/SecurePlaintextSecrets/ExpectedOutputs/SEC101_048.CloudantConnectionString.sarif @@ -77,6 +77,7 @@ } ], "fingerprints": { + "AssetFingerprint/v1": "[acct=apikey-v2-username1111165BB6673E1B79482A8C][uri=https://host1111-47eb-45ce-b125-4a4e1b5a4f7e-bluemix.cloudant.com]", "ValidationFingerprint/v1": "[acct=apikey-v2-username1111165BB6673E1B79482A8C][pwd=password1111123956157d94b25d574586f26d1211e8e589646b4713d5de4801][uri=https://host1111-47eb-45ce-b125-4a4e1b5a4f7e-bluemix.cloudant.com]" } }, @@ -117,6 +118,7 @@ } ], "fingerprints": { + "AssetFingerprint/v1": "[uri=https://host22:password89012345678901234567890123456789012345678901234567890123@username2.cloudant.com]", "ValidationFingerprint/v1": "[uri=https://host22:password89012345678901234567890123456789012345678901234567890123@username2.cloudant.com]" } }, @@ -157,6 +159,7 @@ } ], "fingerprints": { + "AssetFingerprint/v1": "[uri=https://host33:passwordijabcdefghijabcd@username3.cloudant.com]", "ValidationFingerprint/v1": "[uri=https://host33:passwordijabcdefghijabcd@username3.cloudant.com]" } } diff --git a/Src/Plugins/Tests.Security/TestData/SecurePlaintextSecrets/ExpectedOutputs/SEC101_049.PSCredential.sarif b/Src/Plugins/Tests.Security/TestData/SecurePlaintextSecrets/ExpectedOutputs/SEC101_049.PSCredential.sarif index 57e2d14b..f09d2fd8 100644 --- a/Src/Plugins/Tests.Security/TestData/SecurePlaintextSecrets/ExpectedOutputs/SEC101_049.PSCredential.sarif +++ b/Src/Plugins/Tests.Security/TestData/SecurePlaintextSecrets/ExpectedOutputs/SEC101_049.PSCredential.sarif @@ -74,6 +74,7 @@ } ], "fingerprints": { + "AssetFingerprint/v1": "[acct=REDMOND\\username1]", "ValidationFingerprint/v1": "[acct=REDMOND\\username1][pwd=doodle_BLOB1]" } }, @@ -114,6 +115,7 @@ } ], "fingerprints": { + "AssetFingerprint/v1": "[acct=username2]", "ValidationFingerprint/v1": "[acct=username2][pwd=doodle_BLOB2]" } }, @@ -154,6 +156,7 @@ } ], "fingerprints": { + "AssetFingerprint/v1": "[acct=username3]", "ValidationFingerprint/v1": "[acct=username3][pwd=doodle_BLOB3]" } } diff --git a/Src/Plugins/Tests.Security/TestData/SecurePlaintextSecrets/ExpectedOutputs/SEC101_050.SqlCredential.sarif b/Src/Plugins/Tests.Security/TestData/SecurePlaintextSecrets/ExpectedOutputs/SEC101_050.SqlCredential.sarif index 6db93242..1f0253bf 100644 --- a/Src/Plugins/Tests.Security/TestData/SecurePlaintextSecrets/ExpectedOutputs/SEC101_050.SqlCredential.sarif +++ b/Src/Plugins/Tests.Security/TestData/SecurePlaintextSecrets/ExpectedOutputs/SEC101_050.SqlCredential.sarif @@ -74,6 +74,7 @@ } ], "fingerprints": { + "AssetFingerprint/v1": "[acct=username1]", "ValidationFingerprint/v1": "[acct=username1][pwd=doodle_BLOB1]" } }, @@ -114,6 +115,7 @@ } ], "fingerprints": { + "AssetFingerprint/v1": "[acct=username2]", "ValidationFingerprint/v1": "[acct=username2][pwd=doodle_BLOB2]" } } diff --git a/Src/Plugins/Tests.Security/TestData/SecurePlaintextSecrets/ExpectedOutputs/SEC101_051.GpgCredential.sarif b/Src/Plugins/Tests.Security/TestData/SecurePlaintextSecrets/ExpectedOutputs/SEC101_051.GpgCredential.sarif index 400f38c8..94732edc 100644 --- a/Src/Plugins/Tests.Security/TestData/SecurePlaintextSecrets/ExpectedOutputs/SEC101_051.GpgCredential.sarif +++ b/Src/Plugins/Tests.Security/TestData/SecurePlaintextSecrets/ExpectedOutputs/SEC101_051.GpgCredential.sarif @@ -74,6 +74,7 @@ } ], "fingerprints": { + "AssetFingerprint/v1": "[acct=username1@mydomain.com]", "ValidationFingerprint/v1": "[acct=username1@mydomain.com][pwd=doodle_BLOB1]" } }, @@ -114,6 +115,7 @@ } ], "fingerprints": { + "AssetFingerprint/v1": "", "ValidationFingerprint/v1": "[pwd=doodle_BLOB2]" } }, @@ -154,6 +156,7 @@ } ], "fingerprints": { + "AssetFingerprint/v1": "", "ValidationFingerprint/v1": "[pwd=doodle_BLOB3]" } }, @@ -194,6 +197,7 @@ } ], "fingerprints": { + "AssetFingerprint/v1": "", "ValidationFingerprint/v1": "[pwd=doodle_BLOB4]" } } diff --git a/Src/Plugins/Tests.Security/TestData/SecurePlaintextSecrets/ExpectedOutputs/SEC101_052.ConvertToSecureString.sarif b/Src/Plugins/Tests.Security/TestData/SecurePlaintextSecrets/ExpectedOutputs/SEC101_052.ConvertToSecureString.sarif index 85061754..71f5326d 100644 --- a/Src/Plugins/Tests.Security/TestData/SecurePlaintextSecrets/ExpectedOutputs/SEC101_052.ConvertToSecureString.sarif +++ b/Src/Plugins/Tests.Security/TestData/SecurePlaintextSecrets/ExpectedOutputs/SEC101_052.ConvertToSecureString.sarif @@ -73,6 +73,7 @@ } ], "fingerprints": { + "AssetFingerprint/v1": "", "ValidationFingerprint/v1": "[pwd=doodle_BLOB0000]" } }, @@ -112,6 +113,7 @@ } ], "fingerprints": { + "AssetFingerprint/v1": "", "ValidationFingerprint/v1": "[pwd=Doodle$111111]" } }, @@ -151,6 +153,7 @@ } ], "fingerprints": { + "AssetFingerprint/v1": "", "ValidationFingerprint/v1": "[pwd=D00dle2222]" } }, @@ -190,6 +193,7 @@ } ], "fingerprints": { + "AssetFingerprint/v1": "", "ValidationFingerprint/v1": "[pwd=D$oodle3333]" } }, @@ -229,6 +233,7 @@ } ], "fingerprints": { + "AssetFingerprint/v1": "", "ValidationFingerprint/v1": "[pwd=D$oodle4444]" } }, @@ -268,6 +273,7 @@ } ], "fingerprints": { + "AssetFingerprint/v1": "", "ValidationFingerprint/v1": "[pwd=Doodle$555555]" } }, @@ -307,6 +313,7 @@ } ], "fingerprints": { + "AssetFingerprint/v1": "", "ValidationFingerprint/v1": "[pwd=666666]" } }, @@ -346,6 +353,7 @@ } ], "fingerprints": { + "AssetFingerprint/v1": "", "ValidationFingerprint/v1": "[pwd=6ood137777]" } } diff --git a/Src/Plugins/Tests.Security/TestData/SecurePlaintextSecrets/ExpectedOutputs/SEC101_102.AdoPat.sarif b/Src/Plugins/Tests.Security/TestData/SecurePlaintextSecrets/ExpectedOutputs/SEC101_102.AdoPat.sarif index 080e14c3..e302a8c1 100644 --- a/Src/Plugins/Tests.Security/TestData/SecurePlaintextSecrets/ExpectedOutputs/SEC101_102.AdoPat.sarif +++ b/Src/Plugins/Tests.Security/TestData/SecurePlaintextSecrets/ExpectedOutputs/SEC101_102.AdoPat.sarif @@ -74,6 +74,7 @@ } ], "fingerprints": { + "AssetFingerprint/v1": "[platform=AzureDevOps]", "ValidationFingerprint/v1": "[pat=h5lxeqkz4zujkyvzg5emkejgelxj4x64tvyzclprekuloawbbz5q]" } }, @@ -114,6 +115,7 @@ } ], "fingerprints": { + "AssetFingerprint/v1": "[platform=AzureDevOps]", "ValidationFingerprint/v1": "[pat=h5lxeqkz4zujkyvzg5emkejgelxj4x64tvyzclprekuloawbbz5q]" } } diff --git a/Src/Plugins/ValidatorBase.cs b/Src/Plugins/ValidatorBase.cs index 9580018f..4c8e1cce 100644 --- a/Src/Plugins/ValidatorBase.cs +++ b/Src/Plugins/ValidatorBase.cs @@ -33,7 +33,7 @@ protected ValidatorBase() protected virtual string ScanIdentityHttpCustomHeaderValue => "This call originates with a build of the SARIF pattern matcher " + "(https://github.com/microsoft/sarif-pattern/matcher. Someone is " + - "running an automated scan and validation of detected credentials."; + "running an automated scan and attempting to validate detected credentials."; protected virtual string UserAgentValue => "SARIF Pattern Matcher scan tool"; diff --git a/Src/Sarif.PatternMatcher/AssetPlatform.cs b/Src/Sarif.PatternMatcher/AssetPlatform.cs new file mode 100644 index 00000000..364146c1 --- /dev/null +++ b/Src/Sarif.PatternMatcher/AssetPlatform.cs @@ -0,0 +1,78 @@ +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. + +namespace Microsoft.CodeAnalysis.Sarif.PatternMatcher +{ + public enum AssetPlatform + { + /// + /// None. + /// + None = 0, + + /// + /// Unknown platform. + /// + Unknown = 0, + + /// + /// Azure platform. + /// + Azure, + + /// + /// Azure DevOps platform. + /// + AzureDevOps, + + /// + /// Aws Platform. + /// + Aws, + + /// + /// Facebook platform. + /// + Facebook, + + /// + /// GitHub platform + /// + GitHub, + + /// + /// Google platform. + /// + Google, + + /// + /// LinkedIn platform. + /// + LinkedIn, + + /// + /// Npm platform. + /// + Npm, + + /// + /// Slack platform. + /// + Slack, + + /// + /// SqlOnPremise platform. + /// + SqlOnPremise, + + /// + /// Square platform. + /// + Square, + + /// + /// Stripe platform. + /// + Stripe, + } +} diff --git a/Src/Sarif.PatternMatcher/Fingerprint.cs b/Src/Sarif.PatternMatcher/Fingerprint.cs index 9c3a9348..3c547422 100644 --- a/Src/Sarif.PatternMatcher/Fingerprint.cs +++ b/Src/Sarif.PatternMatcher/Fingerprint.cs @@ -17,6 +17,7 @@ public struct Fingerprint public const string AccountKeyName = "acct"; public const string PasswordKeyName = "pwd"; public const string KeyNameKeyName = "keyName"; + public const string PlatformKeyName = "platform"; public const string ResourceKeyName = "resource"; public const string SasTokenKeyName = "sasToken"; public const string ThumbprintKeyName = "thumbprint"; @@ -25,10 +26,29 @@ public struct Fingerprint public const string SymmetricKey256BitKeyName = "skey/256"; private const char RightBracketReplacement = '\t'; + private static readonly HashSet s_emptyDenyList = new HashSet(); + + private static readonly HashSet s_assetOnlyKeys = + new HashSet(new string[] + { + PlatformKeyName, + }); + + private static readonly HashSet s_secretKeys = + new HashSet(new string[] + { + KeyKeyName, + HmacKeyName, + PasswordKeyName, + SasTokenKeyName, + PersonalAccessTokenKeyName, + SymmetricKey128BitKeyName, + SymmetricKey256BitKeyName, + }); public Fingerprint(string fingerprintText) { - Account = Hmac = Host = Port = Id = Key = KeyName = Password = Uri = Resource = null; + Account = Hmac = Host = Port = Id = Key = KeyName = Password = Uri = Platform = Resource = null; SasToken = PersonalAccessToken = SymmetricKey128Bit = SymmetricKey256Bit = Thumbprint = null; fingerprintText = fingerprintText ?? @@ -46,7 +66,7 @@ public Fingerprint(string fingerprintText) nameof(fingerprintText)); } - string computedFingerprint = this.GetFingerprintText(); + string computedFingerprint = this.GetComprehensiveFingerprintText(); if (!computedFingerprint.Equals(fingerprintText)) { throw new ArgumentException( @@ -84,6 +104,8 @@ private enum ParseState public string SasToken { get; set; } + public string Platform { get; set; } + public string Resource { get; set; } public string Thumbprint { get; set; } @@ -94,7 +116,11 @@ private enum ParseState public string PersonalAccessToken { get; set; } - public string GetFingerprintText() => this.ToString(); + public string GetComprehensiveFingerprintText() => ToString(this, denyList: s_emptyDenyList); + + public string GetAssetFingerprintText() => ToString(this, denyList: s_secretKeys); + + public string GetValidationFingerprintText() => ToString(this, denyList: s_assetOnlyKeys); #pragma warning disable SA1107 // Code should not contain multiple statements on one line public void SetProperty(string keyName, string value) @@ -111,6 +137,7 @@ public void SetProperty(string keyName, string value) case KeyNameKeyName: { KeyName = value; break; } case PasswordKeyName: { Password = value; break; } case SasTokenKeyName: { SasToken = value; break; } + case PlatformKeyName: { Platform = value; break; } case ResourceKeyName: { Resource = value; break; } case ThumbprintKeyName: { Thumbprint = value; break; } case SymmetricKey128BitKeyName: { SymmetricKey128Bit = value; break; } @@ -123,82 +150,94 @@ public void SetProperty(string keyName, string value) public override string ToString() { + return ToString(this, s_emptyDenyList); + } + + internal static string ToString(Fingerprint f, ISet denyList) + { + denyList ??= s_emptyDenyList; + var components = new List(3); // These need to remain in alphabetical order. - if (!string.IsNullOrEmpty(Account)) + if (!string.IsNullOrEmpty(f.Account) && !denyList.Contains(AccountKeyName)) + { + components.Add($"[{AccountKeyName}={f.Account.Trim()}]"); + } + + if (!string.IsNullOrEmpty(f.Hmac) && !denyList.Contains(HmacKeyName)) { - components.Add($"[{AccountKeyName}={this.Account.Trim()}]"); + components.Add($"[{HmacKeyName}={f.Hmac.Trim()}]"); } - if (!string.IsNullOrEmpty(Hmac)) + if (!string.IsNullOrEmpty(f.Host) && !denyList.Contains(HostKeyName)) { - components.Add($"[{HmacKeyName}={this.Hmac.Trim()}]"); + components.Add($"[{HostKeyName}={f.Host.Trim()}]"); } - if (!string.IsNullOrEmpty(Host)) + if (!string.IsNullOrEmpty(f.Id) && !denyList.Contains(IdKeyName)) { - components.Add($"[{HostKeyName}={this.Host.Trim()}]"); + components.Add($"[{IdKeyName}={f.Id.Trim()}]"); } - if (!string.IsNullOrEmpty(Id)) + if (!string.IsNullOrEmpty(f.Key) && !denyList.Contains(KeyKeyName)) { - components.Add($"[{IdKeyName}={this.Id.Trim()}]"); + components.Add($"[{KeyKeyName}={f.Key.Trim()}]"); } - if (!string.IsNullOrEmpty(Key)) + if (!string.IsNullOrEmpty(f.KeyName) && !denyList.Contains(KeyNameKeyName)) { - components.Add($"[{KeyKeyName}={this.Key.Trim()}]"); + components.Add($"[{KeyNameKeyName}={f.KeyName.Trim()}]"); } - if (!string.IsNullOrEmpty(KeyName)) + if (!string.IsNullOrEmpty(f.Password) && !denyList.Contains(PasswordKeyName)) { - components.Add($"[{KeyNameKeyName}={this.KeyName.Trim()}]"); + components.Add($"[{PasswordKeyName}={f.Password.Trim()}]"); } - if (!string.IsNullOrEmpty(Password)) + if (!string.IsNullOrEmpty(f.PersonalAccessToken) && !denyList.Contains(PersonalAccessTokenKeyName)) { - components.Add($"[{PasswordKeyName}={this.Password.Trim()}]"); + components.Add($"[{PersonalAccessTokenKeyName}={f.PersonalAccessToken.Trim()}]"); } - if (!string.IsNullOrEmpty(PersonalAccessToken)) + if (!string.IsNullOrEmpty(f.Platform) && !denyList.Contains(PlatformKeyName)) { - components.Add($"[{PersonalAccessTokenKeyName}={this.PersonalAccessToken.Trim()}]"); + components.Add($"[{PlatformKeyName}={f.Platform.Trim()}]"); } - if (!string.IsNullOrEmpty(Port)) + if (!string.IsNullOrEmpty(f.Port) && !denyList.Contains(PortKeyName)) { - components.Add($"[{PortKeyName}={this.Port.Trim()}]"); + components.Add($"[{PortKeyName}={f.Port.Trim()}]"); } - if (!string.IsNullOrEmpty(Resource)) + if (!string.IsNullOrEmpty(f.Resource) && !denyList.Contains(ResourceKeyName)) { - components.Add($"[{ResourceKeyName}={this.Resource.Trim()}]"); + components.Add($"[{ResourceKeyName}={f.Resource.Trim()}]"); } - if (!string.IsNullOrEmpty(SasToken)) + if (!string.IsNullOrEmpty(f.SasToken) && !denyList.Contains(SasTokenKeyName)) { - components.Add($"[{SasTokenKeyName}={this.SasToken.Trim()}]"); + components.Add($"[{SasTokenKeyName}={f.SasToken.Trim()}]"); } - if (!string.IsNullOrEmpty(SymmetricKey128Bit)) + if (!string.IsNullOrEmpty(f.SymmetricKey128Bit) && !denyList.Contains(SymmetricKey128BitKeyName)) { - components.Add($"[{SymmetricKey128BitKeyName}={this.SymmetricKey128Bit.Trim()}]"); + components.Add($"[{SymmetricKey128BitKeyName}={f.SymmetricKey128Bit.Trim()}]"); } - if (!string.IsNullOrEmpty(SymmetricKey256Bit)) + if (!string.IsNullOrEmpty(f.SymmetricKey256Bit) && !denyList.Contains(SymmetricKey256BitKeyName)) { - components.Add($"[{SymmetricKey256BitKeyName}={this.SymmetricKey256Bit.Trim()}]"); + components.Add($"[{SymmetricKey256BitKeyName}={f.SymmetricKey256Bit.Trim()}]"); } - if (!string.IsNullOrEmpty(Thumbprint)) + if (!string.IsNullOrEmpty(f.Thumbprint) && !denyList.Contains(ThumbprintKeyName)) { - components.Add($"[{ThumbprintKeyName}={this.Thumbprint.Trim()}]"); + components.Add($"[{ThumbprintKeyName}={f.Thumbprint.Trim()}]"); } - if (!string.IsNullOrEmpty(Uri)) + if (!string.IsNullOrEmpty(f.Uri) && !denyList.Contains(UriKeyName)) { - components.Add($"[{UriKeyName}={this.Uri.Trim()}]"); + components.Add($"[{UriKeyName}={f.Uri.Trim()}]"); } return components.Count > 0 ? diff --git a/Src/Sarif.PatternMatcher/SearchSkimmer.cs b/Src/Sarif.PatternMatcher/SearchSkimmer.cs index e02874b2..9adef147 100644 --- a/Src/Sarif.PatternMatcher/SearchSkimmer.cs +++ b/Src/Sarif.PatternMatcher/SearchSkimmer.cs @@ -17,6 +17,7 @@ namespace Microsoft.CodeAnalysis.Sarif.PatternMatcher { public class SearchSkimmer : Skimmer { + public const string AssetFingerprint = "AssetFingerprint/v1"; public const string GlobalFingerprint = "GlobalFingerprint/v1"; public const string ValidationFingerprint = "ValidationFingerprint/v1"; public const string DynamicValidationNotEnabled = "No validation occurred as it was not enabled. Pass '--dynamic-validation' on the command-line to validate this match"; @@ -764,6 +765,8 @@ private void RunMatchExpressionForFileNameRegex(AnalyzeContext context, MatchExp private Region ConstructRegion(AnalyzeContext context, FlexMatch regionFlexMatch, string fingerprint) { + // TODO: this code is wrong!! We no longer use the fingerprint to refine the region + int indexOffset = regionFlexMatch.Value.String.IndexOf(fingerprint); int lengthOffset = fingerprint.Length - regionFlexMatch.Length; @@ -847,13 +850,19 @@ private Result ConstructResult( return result; } - private Dictionary BuildFingerprints(string fingerprint) + private Dictionary BuildFingerprints(string fingerprintText) { - if (fingerprint == null) { return null; } + if (string.IsNullOrWhiteSpace(fingerprintText)) + { + return null; + } + + var fingerprint = new Fingerprint(fingerprintText); return new Dictionary() { - { ValidationFingerprint, fingerprint }, + { AssetFingerprint, fingerprint.GetAssetFingerprintText() }, + { ValidationFingerprint, fingerprint.GetValidationFingerprintText() }, }; } diff --git a/Src/Sarif.PatternMatcher/SharedUtilities.cs b/Src/Sarif.PatternMatcher/SharedUtilities.cs new file mode 100644 index 00000000..4f315d80 --- /dev/null +++ b/Src/Sarif.PatternMatcher/SharedUtilities.cs @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. + +using System.Collections.Generic; + +namespace Microsoft.CodeAnalysis.Sarif.PatternMatcher +{ + public static class SharedUtilities + { + public static string GetDatabasePlatformFromHost(string host, out string resource) + { + resource = null; + + var list = new List + { + ".database.windows.net", + ".database.azure.com", + }; + + foreach (string item in list) + { + string result = ExtractResource(item, host, out resource); + if (!string.IsNullOrEmpty(result)) + { + return result; + } + } + + return nameof(AssetPlatform.SqlOnPremise); + } + + private static string ExtractResource(string pattern, string host, out string resource) + { + resource = null; + + int indexOf = host.IndexOf(pattern); + if (indexOf >= 0) + { + resource = host.Substring(0, indexOf); + return nameof(AssetPlatform.Azure); + } + + return string.Empty; + } + } +} diff --git a/Targets/build.plugins.props b/Targets/build.plugins.props index 9f4adc53..c880aa4d 100644 --- a/Targets/build.plugins.props +++ b/Targets/build.plugins.props @@ -3,7 +3,8 @@ + + - - + \ No newline at end of file