diff --git a/src/Sarif.Multitool.Library/Rules/ADO2012.ProvideRequiredReportingDescriptorProperties.cs b/src/Sarif.Multitool.Library/Rules/ADO2012.ProvideRequiredReportingDescriptorProperties.cs index 604523339..b07e68431 100644 --- a/src/Sarif.Multitool.Library/Rules/ADO2012.ProvideRequiredReportingDescriptorProperties.cs +++ b/src/Sarif.Multitool.Library/Rules/ADO2012.ProvideRequiredReportingDescriptorProperties.cs @@ -7,7 +7,7 @@ namespace Microsoft.CodeAnalysis.Sarif.Multitool.Rules { public class AdoProvideRequiredReportingDescriptorProperties - : BaseProvideRequiredResultProperties + : BaseProvideRequiredReportingDescriptorProperties { /// /// ADO2012 diff --git a/src/Sarif.Multitool.Library/Rules/Base2012.ProvideRequiredReportingDescriptorProperties.cs b/src/Sarif.Multitool.Library/Rules/Base2012.ProvideRequiredReportingDescriptorProperties.cs index 873b2eef0..dd2dc8db1 100644 --- a/src/Sarif.Multitool.Library/Rules/Base2012.ProvideRequiredReportingDescriptorProperties.cs +++ b/src/Sarif.Multitool.Library/Rules/Base2012.ProvideRequiredReportingDescriptorProperties.cs @@ -5,7 +5,7 @@ namespace Microsoft.CodeAnalysis.Sarif.Multitool.Rules { - public class Base2012ProvideRequiredReportingDescriptorProperties + public class BaseProvideRequiredReportingDescriptorProperties : SarifValidationSkimmerBase { public override string Id => string.Empty; @@ -15,7 +15,7 @@ public class Base2012ProvideRequiredReportingDescriptorProperties nameof(RuleResources.Base2012_ProvideRequiredReportingDescriptorProperties_Error_MissingIdProperty_Text) }; - private ICollection BaseMessageResourceNames => _baseMessageResourceNames; + protected ICollection BaseMessageResourceNames => _baseMessageResourceNames; public override HashSet RuleKinds => new HashSet(); diff --git a/src/Test.FunctionalTests.Sarif/TestData/Multitool/BaselineOption/ExpectedOutputs/TEST1001.ValidateWithBaseline.sarif b/src/Test.FunctionalTests.Sarif/TestData/Multitool/BaselineOption/ExpectedOutputs/TEST1001.ValidateWithBaseline.sarif index 45e7fb445..a40bed8cb 100644 --- a/src/Test.FunctionalTests.Sarif/TestData/Multitool/BaselineOption/ExpectedOutputs/TEST1001.ValidateWithBaseline.sarif +++ b/src/Test.FunctionalTests.Sarif/TestData/Multitool/BaselineOption/ExpectedOutputs/TEST1001.ValidateWithBaseline.sarif @@ -30,6 +30,9 @@ "text": "The Result object represents an analysis finding and should provide details describing the nature of the problem along with its location in the scan target.\r\n\r\nProvide the 'ruleId' property, which is the unique identifier of the analysis rule that was violated. This property is required by the ADO Advanced Security service.\r\n\r\nProvide the 'message' property, which is a user-facing explanation of the result occurrence. The message's 'text' property is required by the ADO Advanced Security service.\r\n\r\nProvide the 'locations' array, which must contain at least one location object.\r\n\r\nProvide the 'partialFingerprints' dictionary. This property is required by the ADO Advanced Security service." }, "messageStrings": { + "Error_MissingRuleId": { + "text": "{0}: This 'result' object does not provide a 'ruleId' value. This property is required by the {1} service." + }, "Error_EmptyLocationsArray": { "text": "{0}: The 'locations' array on this 'result' object is empty. This property is required by the {1} service." }, @@ -44,9 +47,6 @@ }, "Error_MissingPartialFingerprints": { "text": "{0}: This 'result' object does not provide a 'partialFingerprints' dictionary. This property is required by the {1} service." - }, - "Error_MissingRuleId": { - "text": "{0}: This 'result' object does not provide a 'ruleId' value. This property is required by the {1} service." } }, "defaultConfiguration": { @@ -82,37 +82,6 @@ }, "helpUri": "http://docs.oasis-open.org/sarif/sarif/v2.1.0/sarif-v2.1.0.html" }, - { - "id": "ADO2012", - "name": "AdoProvideRequiredReportingDescriptorProperties", - "fullDescription": { - "text": "Rule metadata should provide information that makes it easy to understand and fix the problem.\r\nrule.id\r\n\r\nProvide the 'id' property whose value is a stable identifier for the rule.\r\n\r\nProvide the 'name' property, which contains a \"friendly name\" that helps users see at a glance the purpose of the rule. For uniformity of experience across all tools that produce SARIF, the friendly name should be a single Pascal-case identifier, for example, 'ProvideRuleFriendlyName'." - }, - "messageStrings": { - "Error_EmptyLocationsArray": { - "text": "{0}: The 'locations' array on this 'result' object is empty. This property is required by the {1} service." - }, - "Error_MissingLocationsArray": { - "text": "{0}: This 'result' object does not provide a 'locations' array. This property is required by the {1} service." - }, - "Error_MissingMessageText": { - "text": "{0}: The 'message' object on this 'result' object does not provide a 'text' property. This property is required by the {1} service." - }, - "Error_MissingMessage": { - "text": "{0}: This 'result' object does not provide a 'message' object. This property is required by the {1} service." - }, - "Error_MissingPartialFingerprints": { - "text": "{0}: This 'result' object does not provide a 'partialFingerprints' dictionary. This property is required by the {1} service." - }, - "Error_MissingName": { - "text": "{0}: This 'reportingDescriptor' object does not provide a 'name' value. This property is required by the {1} service." - } - }, - "defaultConfiguration": { - "level": "error" - }, - "helpUri": "http://docs.oasis-open.org/sarif/sarif/v2.1.0/sarif-v2.1.0.html" - }, { "id": "GH1015", "name": "GhasProvideRequiredResultProperties", @@ -148,6 +117,9 @@ "text": "Provide the 'region' property, along with the appropriate region properties. This property is required by the GitHub Advanced Security service.\r\n\r\nProvide the 'artifactLocation' property. This property is required by the GitHub Advanced Security service." }, "messageStrings": { + "Error_MissingArtifactLocationUri": { + "text": "{0}: The 'artifactLocation' object on this 'physicalLocation' object does not provide a 'uri' object. This property is required by the {1} service." + }, "Error_EmptyLocationsArray": { "text": "{0}: The 'locations' array on this 'result' object is empty. This property is required by the {1} service." }, @@ -162,9 +134,6 @@ }, "Error_MissingPartialFingerprints": { "text": "{0}: This 'result' object does not provide a 'partialFingerprints' dictionary. This property is required by the {1} service." - }, - "Error_MissingArtifactLocationUri": { - "text": "{0}: The 'artifactLocation' object on this 'physicalLocation' object does not provide a 'uri' object. This property is required by the {1} service." } }, "defaultConfiguration": { @@ -179,6 +148,18 @@ "text": "Rule metadata should provide information that makes it easy to understand and fix the problem.\r\n\r\nProvide the 'id' property whose value is a stable identifier for the rule.\r\n\r\nProvide the 'shortDescription' and 'fullDescription' properties.\r\n\r\nProvide the 'help' property and populate the 'text' property with information about the rule." }, "messageStrings": { + "Error_MissingFullDescription": { + "text": "{0}: This 'reportingDescriptor' object does not provide a 'fullDescription' value. This property is required by the {1} service." + }, + "Error_MissingHelpText": { + "text": "{0}: This 'help' object does not provide a 'text' value. This property is required by the {1} service." + }, + "Error_MissingHelp": { + "text": "{0}: This 'reportingDescriptor' object does not provide a 'help' object. This property is required by the {1} service." + }, + "Error_MissingShortDescription": { + "text": "{0}: This 'reportingDescriptor' object does not provide a 'shortDescription' value. This property is required by the {1} service." + }, "Error_EmptyLocationsArray": { "text": "{0}: The 'locations' array on this 'result' object is empty. This property is required by the {1} service." }, @@ -193,18 +174,6 @@ }, "Error_MissingPartialFingerprints": { "text": "{0}: This 'result' object does not provide a 'partialFingerprints' dictionary. This property is required by the {1} service." - }, - "Error_MissingFullDescription": { - "text": "{0}: This 'reportingDescriptor' object does not provide a 'fullDescription' value. This property is required by the {1} service." - }, - "Error_MissingHelpText": { - "text": "{0}: This 'help' object does not provide a 'text' value. This property is required by the {1} service." - }, - "Error_MissingHelp": { - "text": "{0}: This 'reportingDescriptor' object does not provide a 'help' object. This property is required by the {1} service." - }, - "Error_MissingShortDescription": { - "text": "{0}: This 'reportingDescriptor' object does not provide a 'shortDescription' value. This property is required by the {1} service." } }, "defaultConfiguration": { @@ -235,6 +204,9 @@ "text": "Provide information that makes it easy to identify the name and version of your tool.\r\n\r\nProvide the 'driver' property. This property is required by the ADO Advanced Security service.\r\n\r\nProvide the driver's 'name' and 'fullName' properties.\r\n\r\nProvide the driver's 'rules' array." }, "messageStrings": { + "Error_MissingDriverFullName": { + "text": "{0}: This 'driver' object does not provide a 'fullName' value. This property is required by the {1} service." + }, "Error_MissingDriverName": { "text": "{0}: The 'driver' object in this tool does not provide a 'name' value. This property is required by the {1} service." }, @@ -243,9 +215,6 @@ }, "Error_MissingDriver": { "text": "{0}: This 'tool' object does not provide a 'driver' object. This property is required by the {1} service." - }, - "Error_MissingDriverFullName": { - "text": "{0}: This 'driver' object does not provide a 'fullName' value. This property is required by the {1} service." } }, "defaultConfiguration": { @@ -487,67 +456,9 @@ "ResultMatching": {} } }, - { - "ruleId": "ADO2012", - "ruleIndex": 3, - "level": "error", - "message": { - "id": "Error_MissingPartialFingerprints", - "arguments": [ - "runs[0].results[0]", - "Azure DevOps Advanced Security" - ] - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "index": 0 - }, - "region": { - "startLine": 7, - "startColumn": 9 - } - } - } - ], - "baselineState": "new", - "properties": { - "ResultMatching": {} - } - }, - { - "ruleId": "ADO2012", - "ruleIndex": 3, - "level": "error", - "message": { - "id": "Error_MissingLocationsArray", - "arguments": [ - "runs[0].results[0]", - "Azure DevOps Advanced Security" - ] - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "index": 0 - }, - "region": { - "startLine": 7, - "startColumn": 9 - } - } - } - ], - "baselineState": "new", - "properties": { - "ResultMatching": {} - } - }, { "ruleId": "GH1015", - "ruleIndex": 4, + "ruleIndex": 3, "level": "error", "message": { "id": "Error_MissingPartialFingerprints", @@ -576,7 +487,7 @@ }, { "ruleId": "GH1015", - "ruleIndex": 4, + "ruleIndex": 3, "level": "error", "message": { "id": "Error_MissingLocationsArray", @@ -605,7 +516,7 @@ }, { "ruleId": "GH1017", - "ruleIndex": 5, + "ruleIndex": 4, "level": "error", "message": { "id": "Error_MissingPartialFingerprints", @@ -634,7 +545,7 @@ }, { "ruleId": "GH1017", - "ruleIndex": 5, + "ruleIndex": 4, "level": "error", "message": { "id": "Error_MissingLocationsArray", @@ -663,10 +574,10 @@ }, { "ruleId": "GH2012", - "ruleIndex": 6, + "ruleIndex": 5, "level": "error", "message": { - "id": "Error_MissingLocationsArray", + "id": "Error_MissingPartialFingerprints", "arguments": [ "runs[0].results[0]", "GitHub Advanced Security" @@ -692,10 +603,10 @@ }, { "ruleId": "GH2012", - "ruleIndex": 6, + "ruleIndex": 5, "level": "error", "message": { - "id": "Error_MissingPartialFingerprints", + "id": "Error_MissingLocationsArray", "arguments": [ "runs[0].results[0]", "GitHub Advanced Security" @@ -721,7 +632,7 @@ }, { "ruleId": "SARIF2002", - "ruleIndex": 7, + "ruleIndex": 6, "level": "note", "message": { "id": "Note_Default", @@ -864,69 +775,11 @@ } }, { - "ruleId": "ADO2012", + "ruleId": "GH1015", "ruleIndex": 3, "level": "error", "message": { "id": "Error_MissingLocationsArray", - "arguments": [ - "runs[0].results[1]", - "Azure DevOps Advanced Security" - ] - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "index": 0 - }, - "region": { - "startLine": 13, - "startColumn": 9 - } - } - } - ], - "baselineState": "new", - "properties": { - "ResultMatching": {} - } - }, - { - "ruleId": "ADO2012", - "ruleIndex": 3, - "level": "error", - "message": { - "id": "Error_MissingPartialFingerprints", - "arguments": [ - "runs[0].results[1]", - "Azure DevOps Advanced Security" - ] - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "index": 0 - }, - "region": { - "startLine": 13, - "startColumn": 9 - } - } - } - ], - "baselineState": "new", - "properties": { - "ResultMatching": {} - } - }, - { - "ruleId": "GH1015", - "ruleIndex": 4, - "level": "error", - "message": { - "id": "Error_MissingPartialFingerprints", "arguments": [ "runs[0].results[1]", "GitHub Advanced Security" @@ -952,10 +805,10 @@ }, { "ruleId": "GH1015", - "ruleIndex": 4, + "ruleIndex": 3, "level": "error", "message": { - "id": "Error_MissingLocationsArray", + "id": "Error_MissingPartialFingerprints", "arguments": [ "runs[0].results[1]", "GitHub Advanced Security" @@ -981,7 +834,7 @@ }, { "ruleId": "GH1017", - "ruleIndex": 5, + "ruleIndex": 4, "level": "error", "message": { "id": "Error_MissingLocationsArray", @@ -1010,7 +863,7 @@ }, { "ruleId": "GH1017", - "ruleIndex": 5, + "ruleIndex": 4, "level": "error", "message": { "id": "Error_MissingPartialFingerprints", @@ -1039,7 +892,7 @@ }, { "ruleId": "GH2012", - "ruleIndex": 6, + "ruleIndex": 5, "level": "error", "message": { "id": "Error_MissingPartialFingerprints", @@ -1068,7 +921,7 @@ }, { "ruleId": "GH2012", - "ruleIndex": 6, + "ruleIndex": 5, "level": "error", "message": { "id": "Error_MissingLocationsArray", @@ -1097,7 +950,7 @@ }, { "ruleId": "SARIF2002", - "ruleIndex": 7, + "ruleIndex": 6, "level": "note", "message": { "id": "Note_Default", @@ -1128,7 +981,7 @@ "ruleIndex": 1, "level": "error", "message": { - "id": "Error_MissingLocationsArray", + "id": "Error_MissingPartialFingerprints", "arguments": [ "runs[0].results[2]", "Azure DevOps Advanced Security" @@ -1156,35 +1009,6 @@ "ruleId": "ADO1015", "ruleIndex": 1, "level": "error", - "message": { - "id": "Error_MissingPartialFingerprints", - "arguments": [ - "runs[0].results[2]", - "Azure DevOps Advanced Security" - ] - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "index": 0 - }, - "region": { - "startLine": 19, - "startColumn": 9 - } - } - } - ], - "baselineState": "new", - "properties": { - "ResultMatching": {} - } - }, - { - "ruleId": "ADO1017", - "ruleIndex": 2, - "level": "error", "message": { "id": "Error_MissingLocationsArray", "arguments": [ @@ -1240,37 +1064,8 @@ } }, { - "ruleId": "ADO2012", - "ruleIndex": 3, - "level": "error", - "message": { - "id": "Error_MissingPartialFingerprints", - "arguments": [ - "runs[0].results[2]", - "Azure DevOps Advanced Security" - ] - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "index": 0 - }, - "region": { - "startLine": 19, - "startColumn": 9 - } - } - } - ], - "baselineState": "new", - "properties": { - "ResultMatching": {} - } - }, - { - "ruleId": "ADO2012", - "ruleIndex": 3, + "ruleId": "ADO1017", + "ruleIndex": 2, "level": "error", "message": { "id": "Error_MissingLocationsArray", @@ -1299,7 +1094,7 @@ }, { "ruleId": "GH1015", - "ruleIndex": 4, + "ruleIndex": 3, "level": "error", "message": { "id": "Error_MissingPartialFingerprints", @@ -1328,7 +1123,7 @@ }, { "ruleId": "GH1015", - "ruleIndex": 4, + "ruleIndex": 3, "level": "error", "message": { "id": "Error_MissingLocationsArray", @@ -1357,7 +1152,7 @@ }, { "ruleId": "GH1017", - "ruleIndex": 5, + "ruleIndex": 4, "level": "error", "message": { "id": "Error_MissingPartialFingerprints", @@ -1386,7 +1181,7 @@ }, { "ruleId": "GH1017", - "ruleIndex": 5, + "ruleIndex": 4, "level": "error", "message": { "id": "Error_MissingLocationsArray", @@ -1415,7 +1210,7 @@ }, { "ruleId": "GH2012", - "ruleIndex": 6, + "ruleIndex": 5, "level": "error", "message": { "id": "Error_MissingLocationsArray", @@ -1444,7 +1239,7 @@ }, { "ruleId": "GH2012", - "ruleIndex": 6, + "ruleIndex": 5, "level": "error", "message": { "id": "Error_MissingPartialFingerprints", @@ -1473,7 +1268,7 @@ }, { "ruleId": "SARIF2002", - "ruleIndex": 7, + "ruleIndex": 6, "level": "note", "message": { "id": "Note_Default", @@ -1501,7 +1296,7 @@ }, { "ruleId": "ADO1018", - "ruleIndex": 8, + "ruleIndex": 7, "level": "error", "message": { "id": "Error_MissingDriverRules", @@ -1530,7 +1325,7 @@ }, { "ruleId": "ADO1018", - "ruleIndex": 8, + "ruleIndex": 7, "level": "error", "message": { "id": "Error_MissingDriverRules", @@ -1559,7 +1354,7 @@ }, { "ruleId": "GH1018", - "ruleIndex": 9, + "ruleIndex": 8, "level": "error", "message": { "id": "Error_MissingDriverRules", @@ -1588,7 +1383,7 @@ }, { "ruleId": "SARIF2005", - "ruleIndex": 10, + "ruleIndex": 9, "message": { "id": "Warning_ProvideToolVersion", "arguments": [ @@ -1617,7 +1412,7 @@ }, { "ruleId": "SARIF2005", - "ruleIndex": 10, + "ruleIndex": 9, "message": { "id": "Warning_ProvideToolnformationUri", "arguments": [ @@ -1645,7 +1440,7 @@ }, { "ruleId": "SARIF2012", - "ruleIndex": 11, + "ruleIndex": 10, "level": "note", "message": { "id": "Note_ProvideMetadataForAllViolatedRules", diff --git a/src/Test.FunctionalTests.Sarif/TestData/Multitool/BaselineOption/ExpectedOutputs/TEST1002.ValidateBaseline.NoResults.sarif b/src/Test.FunctionalTests.Sarif/TestData/Multitool/BaselineOption/ExpectedOutputs/TEST1002.ValidateBaseline.NoResults.sarif index 45e7fb445..a40bed8cb 100644 --- a/src/Test.FunctionalTests.Sarif/TestData/Multitool/BaselineOption/ExpectedOutputs/TEST1002.ValidateBaseline.NoResults.sarif +++ b/src/Test.FunctionalTests.Sarif/TestData/Multitool/BaselineOption/ExpectedOutputs/TEST1002.ValidateBaseline.NoResults.sarif @@ -30,6 +30,9 @@ "text": "The Result object represents an analysis finding and should provide details describing the nature of the problem along with its location in the scan target.\r\n\r\nProvide the 'ruleId' property, which is the unique identifier of the analysis rule that was violated. This property is required by the ADO Advanced Security service.\r\n\r\nProvide the 'message' property, which is a user-facing explanation of the result occurrence. The message's 'text' property is required by the ADO Advanced Security service.\r\n\r\nProvide the 'locations' array, which must contain at least one location object.\r\n\r\nProvide the 'partialFingerprints' dictionary. This property is required by the ADO Advanced Security service." }, "messageStrings": { + "Error_MissingRuleId": { + "text": "{0}: This 'result' object does not provide a 'ruleId' value. This property is required by the {1} service." + }, "Error_EmptyLocationsArray": { "text": "{0}: The 'locations' array on this 'result' object is empty. This property is required by the {1} service." }, @@ -44,9 +47,6 @@ }, "Error_MissingPartialFingerprints": { "text": "{0}: This 'result' object does not provide a 'partialFingerprints' dictionary. This property is required by the {1} service." - }, - "Error_MissingRuleId": { - "text": "{0}: This 'result' object does not provide a 'ruleId' value. This property is required by the {1} service." } }, "defaultConfiguration": { @@ -82,37 +82,6 @@ }, "helpUri": "http://docs.oasis-open.org/sarif/sarif/v2.1.0/sarif-v2.1.0.html" }, - { - "id": "ADO2012", - "name": "AdoProvideRequiredReportingDescriptorProperties", - "fullDescription": { - "text": "Rule metadata should provide information that makes it easy to understand and fix the problem.\r\nrule.id\r\n\r\nProvide the 'id' property whose value is a stable identifier for the rule.\r\n\r\nProvide the 'name' property, which contains a \"friendly name\" that helps users see at a glance the purpose of the rule. For uniformity of experience across all tools that produce SARIF, the friendly name should be a single Pascal-case identifier, for example, 'ProvideRuleFriendlyName'." - }, - "messageStrings": { - "Error_EmptyLocationsArray": { - "text": "{0}: The 'locations' array on this 'result' object is empty. This property is required by the {1} service." - }, - "Error_MissingLocationsArray": { - "text": "{0}: This 'result' object does not provide a 'locations' array. This property is required by the {1} service." - }, - "Error_MissingMessageText": { - "text": "{0}: The 'message' object on this 'result' object does not provide a 'text' property. This property is required by the {1} service." - }, - "Error_MissingMessage": { - "text": "{0}: This 'result' object does not provide a 'message' object. This property is required by the {1} service." - }, - "Error_MissingPartialFingerprints": { - "text": "{0}: This 'result' object does not provide a 'partialFingerprints' dictionary. This property is required by the {1} service." - }, - "Error_MissingName": { - "text": "{0}: This 'reportingDescriptor' object does not provide a 'name' value. This property is required by the {1} service." - } - }, - "defaultConfiguration": { - "level": "error" - }, - "helpUri": "http://docs.oasis-open.org/sarif/sarif/v2.1.0/sarif-v2.1.0.html" - }, { "id": "GH1015", "name": "GhasProvideRequiredResultProperties", @@ -148,6 +117,9 @@ "text": "Provide the 'region' property, along with the appropriate region properties. This property is required by the GitHub Advanced Security service.\r\n\r\nProvide the 'artifactLocation' property. This property is required by the GitHub Advanced Security service." }, "messageStrings": { + "Error_MissingArtifactLocationUri": { + "text": "{0}: The 'artifactLocation' object on this 'physicalLocation' object does not provide a 'uri' object. This property is required by the {1} service." + }, "Error_EmptyLocationsArray": { "text": "{0}: The 'locations' array on this 'result' object is empty. This property is required by the {1} service." }, @@ -162,9 +134,6 @@ }, "Error_MissingPartialFingerprints": { "text": "{0}: This 'result' object does not provide a 'partialFingerprints' dictionary. This property is required by the {1} service." - }, - "Error_MissingArtifactLocationUri": { - "text": "{0}: The 'artifactLocation' object on this 'physicalLocation' object does not provide a 'uri' object. This property is required by the {1} service." } }, "defaultConfiguration": { @@ -179,6 +148,18 @@ "text": "Rule metadata should provide information that makes it easy to understand and fix the problem.\r\n\r\nProvide the 'id' property whose value is a stable identifier for the rule.\r\n\r\nProvide the 'shortDescription' and 'fullDescription' properties.\r\n\r\nProvide the 'help' property and populate the 'text' property with information about the rule." }, "messageStrings": { + "Error_MissingFullDescription": { + "text": "{0}: This 'reportingDescriptor' object does not provide a 'fullDescription' value. This property is required by the {1} service." + }, + "Error_MissingHelpText": { + "text": "{0}: This 'help' object does not provide a 'text' value. This property is required by the {1} service." + }, + "Error_MissingHelp": { + "text": "{0}: This 'reportingDescriptor' object does not provide a 'help' object. This property is required by the {1} service." + }, + "Error_MissingShortDescription": { + "text": "{0}: This 'reportingDescriptor' object does not provide a 'shortDescription' value. This property is required by the {1} service." + }, "Error_EmptyLocationsArray": { "text": "{0}: The 'locations' array on this 'result' object is empty. This property is required by the {1} service." }, @@ -193,18 +174,6 @@ }, "Error_MissingPartialFingerprints": { "text": "{0}: This 'result' object does not provide a 'partialFingerprints' dictionary. This property is required by the {1} service." - }, - "Error_MissingFullDescription": { - "text": "{0}: This 'reportingDescriptor' object does not provide a 'fullDescription' value. This property is required by the {1} service." - }, - "Error_MissingHelpText": { - "text": "{0}: This 'help' object does not provide a 'text' value. This property is required by the {1} service." - }, - "Error_MissingHelp": { - "text": "{0}: This 'reportingDescriptor' object does not provide a 'help' object. This property is required by the {1} service." - }, - "Error_MissingShortDescription": { - "text": "{0}: This 'reportingDescriptor' object does not provide a 'shortDescription' value. This property is required by the {1} service." } }, "defaultConfiguration": { @@ -235,6 +204,9 @@ "text": "Provide information that makes it easy to identify the name and version of your tool.\r\n\r\nProvide the 'driver' property. This property is required by the ADO Advanced Security service.\r\n\r\nProvide the driver's 'name' and 'fullName' properties.\r\n\r\nProvide the driver's 'rules' array." }, "messageStrings": { + "Error_MissingDriverFullName": { + "text": "{0}: This 'driver' object does not provide a 'fullName' value. This property is required by the {1} service." + }, "Error_MissingDriverName": { "text": "{0}: The 'driver' object in this tool does not provide a 'name' value. This property is required by the {1} service." }, @@ -243,9 +215,6 @@ }, "Error_MissingDriver": { "text": "{0}: This 'tool' object does not provide a 'driver' object. This property is required by the {1} service." - }, - "Error_MissingDriverFullName": { - "text": "{0}: This 'driver' object does not provide a 'fullName' value. This property is required by the {1} service." } }, "defaultConfiguration": { @@ -487,67 +456,9 @@ "ResultMatching": {} } }, - { - "ruleId": "ADO2012", - "ruleIndex": 3, - "level": "error", - "message": { - "id": "Error_MissingPartialFingerprints", - "arguments": [ - "runs[0].results[0]", - "Azure DevOps Advanced Security" - ] - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "index": 0 - }, - "region": { - "startLine": 7, - "startColumn": 9 - } - } - } - ], - "baselineState": "new", - "properties": { - "ResultMatching": {} - } - }, - { - "ruleId": "ADO2012", - "ruleIndex": 3, - "level": "error", - "message": { - "id": "Error_MissingLocationsArray", - "arguments": [ - "runs[0].results[0]", - "Azure DevOps Advanced Security" - ] - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "index": 0 - }, - "region": { - "startLine": 7, - "startColumn": 9 - } - } - } - ], - "baselineState": "new", - "properties": { - "ResultMatching": {} - } - }, { "ruleId": "GH1015", - "ruleIndex": 4, + "ruleIndex": 3, "level": "error", "message": { "id": "Error_MissingPartialFingerprints", @@ -576,7 +487,7 @@ }, { "ruleId": "GH1015", - "ruleIndex": 4, + "ruleIndex": 3, "level": "error", "message": { "id": "Error_MissingLocationsArray", @@ -605,7 +516,7 @@ }, { "ruleId": "GH1017", - "ruleIndex": 5, + "ruleIndex": 4, "level": "error", "message": { "id": "Error_MissingPartialFingerprints", @@ -634,7 +545,7 @@ }, { "ruleId": "GH1017", - "ruleIndex": 5, + "ruleIndex": 4, "level": "error", "message": { "id": "Error_MissingLocationsArray", @@ -663,10 +574,10 @@ }, { "ruleId": "GH2012", - "ruleIndex": 6, + "ruleIndex": 5, "level": "error", "message": { - "id": "Error_MissingLocationsArray", + "id": "Error_MissingPartialFingerprints", "arguments": [ "runs[0].results[0]", "GitHub Advanced Security" @@ -692,10 +603,10 @@ }, { "ruleId": "GH2012", - "ruleIndex": 6, + "ruleIndex": 5, "level": "error", "message": { - "id": "Error_MissingPartialFingerprints", + "id": "Error_MissingLocationsArray", "arguments": [ "runs[0].results[0]", "GitHub Advanced Security" @@ -721,7 +632,7 @@ }, { "ruleId": "SARIF2002", - "ruleIndex": 7, + "ruleIndex": 6, "level": "note", "message": { "id": "Note_Default", @@ -864,69 +775,11 @@ } }, { - "ruleId": "ADO2012", + "ruleId": "GH1015", "ruleIndex": 3, "level": "error", "message": { "id": "Error_MissingLocationsArray", - "arguments": [ - "runs[0].results[1]", - "Azure DevOps Advanced Security" - ] - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "index": 0 - }, - "region": { - "startLine": 13, - "startColumn": 9 - } - } - } - ], - "baselineState": "new", - "properties": { - "ResultMatching": {} - } - }, - { - "ruleId": "ADO2012", - "ruleIndex": 3, - "level": "error", - "message": { - "id": "Error_MissingPartialFingerprints", - "arguments": [ - "runs[0].results[1]", - "Azure DevOps Advanced Security" - ] - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "index": 0 - }, - "region": { - "startLine": 13, - "startColumn": 9 - } - } - } - ], - "baselineState": "new", - "properties": { - "ResultMatching": {} - } - }, - { - "ruleId": "GH1015", - "ruleIndex": 4, - "level": "error", - "message": { - "id": "Error_MissingPartialFingerprints", "arguments": [ "runs[0].results[1]", "GitHub Advanced Security" @@ -952,10 +805,10 @@ }, { "ruleId": "GH1015", - "ruleIndex": 4, + "ruleIndex": 3, "level": "error", "message": { - "id": "Error_MissingLocationsArray", + "id": "Error_MissingPartialFingerprints", "arguments": [ "runs[0].results[1]", "GitHub Advanced Security" @@ -981,7 +834,7 @@ }, { "ruleId": "GH1017", - "ruleIndex": 5, + "ruleIndex": 4, "level": "error", "message": { "id": "Error_MissingLocationsArray", @@ -1010,7 +863,7 @@ }, { "ruleId": "GH1017", - "ruleIndex": 5, + "ruleIndex": 4, "level": "error", "message": { "id": "Error_MissingPartialFingerprints", @@ -1039,7 +892,7 @@ }, { "ruleId": "GH2012", - "ruleIndex": 6, + "ruleIndex": 5, "level": "error", "message": { "id": "Error_MissingPartialFingerprints", @@ -1068,7 +921,7 @@ }, { "ruleId": "GH2012", - "ruleIndex": 6, + "ruleIndex": 5, "level": "error", "message": { "id": "Error_MissingLocationsArray", @@ -1097,7 +950,7 @@ }, { "ruleId": "SARIF2002", - "ruleIndex": 7, + "ruleIndex": 6, "level": "note", "message": { "id": "Note_Default", @@ -1128,7 +981,7 @@ "ruleIndex": 1, "level": "error", "message": { - "id": "Error_MissingLocationsArray", + "id": "Error_MissingPartialFingerprints", "arguments": [ "runs[0].results[2]", "Azure DevOps Advanced Security" @@ -1156,35 +1009,6 @@ "ruleId": "ADO1015", "ruleIndex": 1, "level": "error", - "message": { - "id": "Error_MissingPartialFingerprints", - "arguments": [ - "runs[0].results[2]", - "Azure DevOps Advanced Security" - ] - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "index": 0 - }, - "region": { - "startLine": 19, - "startColumn": 9 - } - } - } - ], - "baselineState": "new", - "properties": { - "ResultMatching": {} - } - }, - { - "ruleId": "ADO1017", - "ruleIndex": 2, - "level": "error", "message": { "id": "Error_MissingLocationsArray", "arguments": [ @@ -1240,37 +1064,8 @@ } }, { - "ruleId": "ADO2012", - "ruleIndex": 3, - "level": "error", - "message": { - "id": "Error_MissingPartialFingerprints", - "arguments": [ - "runs[0].results[2]", - "Azure DevOps Advanced Security" - ] - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "index": 0 - }, - "region": { - "startLine": 19, - "startColumn": 9 - } - } - } - ], - "baselineState": "new", - "properties": { - "ResultMatching": {} - } - }, - { - "ruleId": "ADO2012", - "ruleIndex": 3, + "ruleId": "ADO1017", + "ruleIndex": 2, "level": "error", "message": { "id": "Error_MissingLocationsArray", @@ -1299,7 +1094,7 @@ }, { "ruleId": "GH1015", - "ruleIndex": 4, + "ruleIndex": 3, "level": "error", "message": { "id": "Error_MissingPartialFingerprints", @@ -1328,7 +1123,7 @@ }, { "ruleId": "GH1015", - "ruleIndex": 4, + "ruleIndex": 3, "level": "error", "message": { "id": "Error_MissingLocationsArray", @@ -1357,7 +1152,7 @@ }, { "ruleId": "GH1017", - "ruleIndex": 5, + "ruleIndex": 4, "level": "error", "message": { "id": "Error_MissingPartialFingerprints", @@ -1386,7 +1181,7 @@ }, { "ruleId": "GH1017", - "ruleIndex": 5, + "ruleIndex": 4, "level": "error", "message": { "id": "Error_MissingLocationsArray", @@ -1415,7 +1210,7 @@ }, { "ruleId": "GH2012", - "ruleIndex": 6, + "ruleIndex": 5, "level": "error", "message": { "id": "Error_MissingLocationsArray", @@ -1444,7 +1239,7 @@ }, { "ruleId": "GH2012", - "ruleIndex": 6, + "ruleIndex": 5, "level": "error", "message": { "id": "Error_MissingPartialFingerprints", @@ -1473,7 +1268,7 @@ }, { "ruleId": "SARIF2002", - "ruleIndex": 7, + "ruleIndex": 6, "level": "note", "message": { "id": "Note_Default", @@ -1501,7 +1296,7 @@ }, { "ruleId": "ADO1018", - "ruleIndex": 8, + "ruleIndex": 7, "level": "error", "message": { "id": "Error_MissingDriverRules", @@ -1530,7 +1325,7 @@ }, { "ruleId": "ADO1018", - "ruleIndex": 8, + "ruleIndex": 7, "level": "error", "message": { "id": "Error_MissingDriverRules", @@ -1559,7 +1354,7 @@ }, { "ruleId": "GH1018", - "ruleIndex": 9, + "ruleIndex": 8, "level": "error", "message": { "id": "Error_MissingDriverRules", @@ -1588,7 +1383,7 @@ }, { "ruleId": "SARIF2005", - "ruleIndex": 10, + "ruleIndex": 9, "message": { "id": "Warning_ProvideToolVersion", "arguments": [ @@ -1617,7 +1412,7 @@ }, { "ruleId": "SARIF2005", - "ruleIndex": 10, + "ruleIndex": 9, "message": { "id": "Warning_ProvideToolnformationUri", "arguments": [ @@ -1645,7 +1440,7 @@ }, { "ruleId": "SARIF2012", - "ruleIndex": 11, + "ruleIndex": 10, "level": "note", "message": { "id": "Note_ProvideMetadataForAllViolatedRules", diff --git a/src/Test.FunctionalTests.Sarif/TestData/Multitool/BaselineOption/ExpectedOutputs/TEST1003.ValidateBaseline.AbsentResults.sarif b/src/Test.FunctionalTests.Sarif/TestData/Multitool/BaselineOption/ExpectedOutputs/TEST1003.ValidateBaseline.AbsentResults.sarif index 45e7fb445..a40bed8cb 100644 --- a/src/Test.FunctionalTests.Sarif/TestData/Multitool/BaselineOption/ExpectedOutputs/TEST1003.ValidateBaseline.AbsentResults.sarif +++ b/src/Test.FunctionalTests.Sarif/TestData/Multitool/BaselineOption/ExpectedOutputs/TEST1003.ValidateBaseline.AbsentResults.sarif @@ -30,6 +30,9 @@ "text": "The Result object represents an analysis finding and should provide details describing the nature of the problem along with its location in the scan target.\r\n\r\nProvide the 'ruleId' property, which is the unique identifier of the analysis rule that was violated. This property is required by the ADO Advanced Security service.\r\n\r\nProvide the 'message' property, which is a user-facing explanation of the result occurrence. The message's 'text' property is required by the ADO Advanced Security service.\r\n\r\nProvide the 'locations' array, which must contain at least one location object.\r\n\r\nProvide the 'partialFingerprints' dictionary. This property is required by the ADO Advanced Security service." }, "messageStrings": { + "Error_MissingRuleId": { + "text": "{0}: This 'result' object does not provide a 'ruleId' value. This property is required by the {1} service." + }, "Error_EmptyLocationsArray": { "text": "{0}: The 'locations' array on this 'result' object is empty. This property is required by the {1} service." }, @@ -44,9 +47,6 @@ }, "Error_MissingPartialFingerprints": { "text": "{0}: This 'result' object does not provide a 'partialFingerprints' dictionary. This property is required by the {1} service." - }, - "Error_MissingRuleId": { - "text": "{0}: This 'result' object does not provide a 'ruleId' value. This property is required by the {1} service." } }, "defaultConfiguration": { @@ -82,37 +82,6 @@ }, "helpUri": "http://docs.oasis-open.org/sarif/sarif/v2.1.0/sarif-v2.1.0.html" }, - { - "id": "ADO2012", - "name": "AdoProvideRequiredReportingDescriptorProperties", - "fullDescription": { - "text": "Rule metadata should provide information that makes it easy to understand and fix the problem.\r\nrule.id\r\n\r\nProvide the 'id' property whose value is a stable identifier for the rule.\r\n\r\nProvide the 'name' property, which contains a \"friendly name\" that helps users see at a glance the purpose of the rule. For uniformity of experience across all tools that produce SARIF, the friendly name should be a single Pascal-case identifier, for example, 'ProvideRuleFriendlyName'." - }, - "messageStrings": { - "Error_EmptyLocationsArray": { - "text": "{0}: The 'locations' array on this 'result' object is empty. This property is required by the {1} service." - }, - "Error_MissingLocationsArray": { - "text": "{0}: This 'result' object does not provide a 'locations' array. This property is required by the {1} service." - }, - "Error_MissingMessageText": { - "text": "{0}: The 'message' object on this 'result' object does not provide a 'text' property. This property is required by the {1} service." - }, - "Error_MissingMessage": { - "text": "{0}: This 'result' object does not provide a 'message' object. This property is required by the {1} service." - }, - "Error_MissingPartialFingerprints": { - "text": "{0}: This 'result' object does not provide a 'partialFingerprints' dictionary. This property is required by the {1} service." - }, - "Error_MissingName": { - "text": "{0}: This 'reportingDescriptor' object does not provide a 'name' value. This property is required by the {1} service." - } - }, - "defaultConfiguration": { - "level": "error" - }, - "helpUri": "http://docs.oasis-open.org/sarif/sarif/v2.1.0/sarif-v2.1.0.html" - }, { "id": "GH1015", "name": "GhasProvideRequiredResultProperties", @@ -148,6 +117,9 @@ "text": "Provide the 'region' property, along with the appropriate region properties. This property is required by the GitHub Advanced Security service.\r\n\r\nProvide the 'artifactLocation' property. This property is required by the GitHub Advanced Security service." }, "messageStrings": { + "Error_MissingArtifactLocationUri": { + "text": "{0}: The 'artifactLocation' object on this 'physicalLocation' object does not provide a 'uri' object. This property is required by the {1} service." + }, "Error_EmptyLocationsArray": { "text": "{0}: The 'locations' array on this 'result' object is empty. This property is required by the {1} service." }, @@ -162,9 +134,6 @@ }, "Error_MissingPartialFingerprints": { "text": "{0}: This 'result' object does not provide a 'partialFingerprints' dictionary. This property is required by the {1} service." - }, - "Error_MissingArtifactLocationUri": { - "text": "{0}: The 'artifactLocation' object on this 'physicalLocation' object does not provide a 'uri' object. This property is required by the {1} service." } }, "defaultConfiguration": { @@ -179,6 +148,18 @@ "text": "Rule metadata should provide information that makes it easy to understand and fix the problem.\r\n\r\nProvide the 'id' property whose value is a stable identifier for the rule.\r\n\r\nProvide the 'shortDescription' and 'fullDescription' properties.\r\n\r\nProvide the 'help' property and populate the 'text' property with information about the rule." }, "messageStrings": { + "Error_MissingFullDescription": { + "text": "{0}: This 'reportingDescriptor' object does not provide a 'fullDescription' value. This property is required by the {1} service." + }, + "Error_MissingHelpText": { + "text": "{0}: This 'help' object does not provide a 'text' value. This property is required by the {1} service." + }, + "Error_MissingHelp": { + "text": "{0}: This 'reportingDescriptor' object does not provide a 'help' object. This property is required by the {1} service." + }, + "Error_MissingShortDescription": { + "text": "{0}: This 'reportingDescriptor' object does not provide a 'shortDescription' value. This property is required by the {1} service." + }, "Error_EmptyLocationsArray": { "text": "{0}: The 'locations' array on this 'result' object is empty. This property is required by the {1} service." }, @@ -193,18 +174,6 @@ }, "Error_MissingPartialFingerprints": { "text": "{0}: This 'result' object does not provide a 'partialFingerprints' dictionary. This property is required by the {1} service." - }, - "Error_MissingFullDescription": { - "text": "{0}: This 'reportingDescriptor' object does not provide a 'fullDescription' value. This property is required by the {1} service." - }, - "Error_MissingHelpText": { - "text": "{0}: This 'help' object does not provide a 'text' value. This property is required by the {1} service." - }, - "Error_MissingHelp": { - "text": "{0}: This 'reportingDescriptor' object does not provide a 'help' object. This property is required by the {1} service." - }, - "Error_MissingShortDescription": { - "text": "{0}: This 'reportingDescriptor' object does not provide a 'shortDescription' value. This property is required by the {1} service." } }, "defaultConfiguration": { @@ -235,6 +204,9 @@ "text": "Provide information that makes it easy to identify the name and version of your tool.\r\n\r\nProvide the 'driver' property. This property is required by the ADO Advanced Security service.\r\n\r\nProvide the driver's 'name' and 'fullName' properties.\r\n\r\nProvide the driver's 'rules' array." }, "messageStrings": { + "Error_MissingDriverFullName": { + "text": "{0}: This 'driver' object does not provide a 'fullName' value. This property is required by the {1} service." + }, "Error_MissingDriverName": { "text": "{0}: The 'driver' object in this tool does not provide a 'name' value. This property is required by the {1} service." }, @@ -243,9 +215,6 @@ }, "Error_MissingDriver": { "text": "{0}: This 'tool' object does not provide a 'driver' object. This property is required by the {1} service." - }, - "Error_MissingDriverFullName": { - "text": "{0}: This 'driver' object does not provide a 'fullName' value. This property is required by the {1} service." } }, "defaultConfiguration": { @@ -487,67 +456,9 @@ "ResultMatching": {} } }, - { - "ruleId": "ADO2012", - "ruleIndex": 3, - "level": "error", - "message": { - "id": "Error_MissingPartialFingerprints", - "arguments": [ - "runs[0].results[0]", - "Azure DevOps Advanced Security" - ] - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "index": 0 - }, - "region": { - "startLine": 7, - "startColumn": 9 - } - } - } - ], - "baselineState": "new", - "properties": { - "ResultMatching": {} - } - }, - { - "ruleId": "ADO2012", - "ruleIndex": 3, - "level": "error", - "message": { - "id": "Error_MissingLocationsArray", - "arguments": [ - "runs[0].results[0]", - "Azure DevOps Advanced Security" - ] - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "index": 0 - }, - "region": { - "startLine": 7, - "startColumn": 9 - } - } - } - ], - "baselineState": "new", - "properties": { - "ResultMatching": {} - } - }, { "ruleId": "GH1015", - "ruleIndex": 4, + "ruleIndex": 3, "level": "error", "message": { "id": "Error_MissingPartialFingerprints", @@ -576,7 +487,7 @@ }, { "ruleId": "GH1015", - "ruleIndex": 4, + "ruleIndex": 3, "level": "error", "message": { "id": "Error_MissingLocationsArray", @@ -605,7 +516,7 @@ }, { "ruleId": "GH1017", - "ruleIndex": 5, + "ruleIndex": 4, "level": "error", "message": { "id": "Error_MissingPartialFingerprints", @@ -634,7 +545,7 @@ }, { "ruleId": "GH1017", - "ruleIndex": 5, + "ruleIndex": 4, "level": "error", "message": { "id": "Error_MissingLocationsArray", @@ -663,10 +574,10 @@ }, { "ruleId": "GH2012", - "ruleIndex": 6, + "ruleIndex": 5, "level": "error", "message": { - "id": "Error_MissingLocationsArray", + "id": "Error_MissingPartialFingerprints", "arguments": [ "runs[0].results[0]", "GitHub Advanced Security" @@ -692,10 +603,10 @@ }, { "ruleId": "GH2012", - "ruleIndex": 6, + "ruleIndex": 5, "level": "error", "message": { - "id": "Error_MissingPartialFingerprints", + "id": "Error_MissingLocationsArray", "arguments": [ "runs[0].results[0]", "GitHub Advanced Security" @@ -721,7 +632,7 @@ }, { "ruleId": "SARIF2002", - "ruleIndex": 7, + "ruleIndex": 6, "level": "note", "message": { "id": "Note_Default", @@ -864,69 +775,11 @@ } }, { - "ruleId": "ADO2012", + "ruleId": "GH1015", "ruleIndex": 3, "level": "error", "message": { "id": "Error_MissingLocationsArray", - "arguments": [ - "runs[0].results[1]", - "Azure DevOps Advanced Security" - ] - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "index": 0 - }, - "region": { - "startLine": 13, - "startColumn": 9 - } - } - } - ], - "baselineState": "new", - "properties": { - "ResultMatching": {} - } - }, - { - "ruleId": "ADO2012", - "ruleIndex": 3, - "level": "error", - "message": { - "id": "Error_MissingPartialFingerprints", - "arguments": [ - "runs[0].results[1]", - "Azure DevOps Advanced Security" - ] - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "index": 0 - }, - "region": { - "startLine": 13, - "startColumn": 9 - } - } - } - ], - "baselineState": "new", - "properties": { - "ResultMatching": {} - } - }, - { - "ruleId": "GH1015", - "ruleIndex": 4, - "level": "error", - "message": { - "id": "Error_MissingPartialFingerprints", "arguments": [ "runs[0].results[1]", "GitHub Advanced Security" @@ -952,10 +805,10 @@ }, { "ruleId": "GH1015", - "ruleIndex": 4, + "ruleIndex": 3, "level": "error", "message": { - "id": "Error_MissingLocationsArray", + "id": "Error_MissingPartialFingerprints", "arguments": [ "runs[0].results[1]", "GitHub Advanced Security" @@ -981,7 +834,7 @@ }, { "ruleId": "GH1017", - "ruleIndex": 5, + "ruleIndex": 4, "level": "error", "message": { "id": "Error_MissingLocationsArray", @@ -1010,7 +863,7 @@ }, { "ruleId": "GH1017", - "ruleIndex": 5, + "ruleIndex": 4, "level": "error", "message": { "id": "Error_MissingPartialFingerprints", @@ -1039,7 +892,7 @@ }, { "ruleId": "GH2012", - "ruleIndex": 6, + "ruleIndex": 5, "level": "error", "message": { "id": "Error_MissingPartialFingerprints", @@ -1068,7 +921,7 @@ }, { "ruleId": "GH2012", - "ruleIndex": 6, + "ruleIndex": 5, "level": "error", "message": { "id": "Error_MissingLocationsArray", @@ -1097,7 +950,7 @@ }, { "ruleId": "SARIF2002", - "ruleIndex": 7, + "ruleIndex": 6, "level": "note", "message": { "id": "Note_Default", @@ -1128,7 +981,7 @@ "ruleIndex": 1, "level": "error", "message": { - "id": "Error_MissingLocationsArray", + "id": "Error_MissingPartialFingerprints", "arguments": [ "runs[0].results[2]", "Azure DevOps Advanced Security" @@ -1156,35 +1009,6 @@ "ruleId": "ADO1015", "ruleIndex": 1, "level": "error", - "message": { - "id": "Error_MissingPartialFingerprints", - "arguments": [ - "runs[0].results[2]", - "Azure DevOps Advanced Security" - ] - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "index": 0 - }, - "region": { - "startLine": 19, - "startColumn": 9 - } - } - } - ], - "baselineState": "new", - "properties": { - "ResultMatching": {} - } - }, - { - "ruleId": "ADO1017", - "ruleIndex": 2, - "level": "error", "message": { "id": "Error_MissingLocationsArray", "arguments": [ @@ -1240,37 +1064,8 @@ } }, { - "ruleId": "ADO2012", - "ruleIndex": 3, - "level": "error", - "message": { - "id": "Error_MissingPartialFingerprints", - "arguments": [ - "runs[0].results[2]", - "Azure DevOps Advanced Security" - ] - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "index": 0 - }, - "region": { - "startLine": 19, - "startColumn": 9 - } - } - } - ], - "baselineState": "new", - "properties": { - "ResultMatching": {} - } - }, - { - "ruleId": "ADO2012", - "ruleIndex": 3, + "ruleId": "ADO1017", + "ruleIndex": 2, "level": "error", "message": { "id": "Error_MissingLocationsArray", @@ -1299,7 +1094,7 @@ }, { "ruleId": "GH1015", - "ruleIndex": 4, + "ruleIndex": 3, "level": "error", "message": { "id": "Error_MissingPartialFingerprints", @@ -1328,7 +1123,7 @@ }, { "ruleId": "GH1015", - "ruleIndex": 4, + "ruleIndex": 3, "level": "error", "message": { "id": "Error_MissingLocationsArray", @@ -1357,7 +1152,7 @@ }, { "ruleId": "GH1017", - "ruleIndex": 5, + "ruleIndex": 4, "level": "error", "message": { "id": "Error_MissingPartialFingerprints", @@ -1386,7 +1181,7 @@ }, { "ruleId": "GH1017", - "ruleIndex": 5, + "ruleIndex": 4, "level": "error", "message": { "id": "Error_MissingLocationsArray", @@ -1415,7 +1210,7 @@ }, { "ruleId": "GH2012", - "ruleIndex": 6, + "ruleIndex": 5, "level": "error", "message": { "id": "Error_MissingLocationsArray", @@ -1444,7 +1239,7 @@ }, { "ruleId": "GH2012", - "ruleIndex": 6, + "ruleIndex": 5, "level": "error", "message": { "id": "Error_MissingPartialFingerprints", @@ -1473,7 +1268,7 @@ }, { "ruleId": "SARIF2002", - "ruleIndex": 7, + "ruleIndex": 6, "level": "note", "message": { "id": "Note_Default", @@ -1501,7 +1296,7 @@ }, { "ruleId": "ADO1018", - "ruleIndex": 8, + "ruleIndex": 7, "level": "error", "message": { "id": "Error_MissingDriverRules", @@ -1530,7 +1325,7 @@ }, { "ruleId": "ADO1018", - "ruleIndex": 8, + "ruleIndex": 7, "level": "error", "message": { "id": "Error_MissingDriverRules", @@ -1559,7 +1354,7 @@ }, { "ruleId": "GH1018", - "ruleIndex": 9, + "ruleIndex": 8, "level": "error", "message": { "id": "Error_MissingDriverRules", @@ -1588,7 +1383,7 @@ }, { "ruleId": "SARIF2005", - "ruleIndex": 10, + "ruleIndex": 9, "message": { "id": "Warning_ProvideToolVersion", "arguments": [ @@ -1617,7 +1412,7 @@ }, { "ruleId": "SARIF2005", - "ruleIndex": 10, + "ruleIndex": 9, "message": { "id": "Warning_ProvideToolnformationUri", "arguments": [ @@ -1645,7 +1440,7 @@ }, { "ruleId": "SARIF2012", - "ruleIndex": 11, + "ruleIndex": 10, "level": "note", "message": { "id": "Note_ProvideMetadataForAllViolatedRules", diff --git a/src/Test.FunctionalTests.Sarif/TestData/Multitool/BaselineOption/ExpectedOutputs/TEST1004.ValidateBaseline.NewResults.sarif b/src/Test.FunctionalTests.Sarif/TestData/Multitool/BaselineOption/ExpectedOutputs/TEST1004.ValidateBaseline.NewResults.sarif index a27e82c46..cd122f5d8 100644 --- a/src/Test.FunctionalTests.Sarif/TestData/Multitool/BaselineOption/ExpectedOutputs/TEST1004.ValidateBaseline.NewResults.sarif +++ b/src/Test.FunctionalTests.Sarif/TestData/Multitool/BaselineOption/ExpectedOutputs/TEST1004.ValidateBaseline.NewResults.sarif @@ -30,6 +30,9 @@ "text": "The Result object represents an analysis finding and should provide details describing the nature of the problem along with its location in the scan target.\r\n\r\nProvide the 'ruleId' property, which is the unique identifier of the analysis rule that was violated. This property is required by the ADO Advanced Security service.\r\n\r\nProvide the 'message' property, which is a user-facing explanation of the result occurrence. The message's 'text' property is required by the ADO Advanced Security service.\r\n\r\nProvide the 'locations' array, which must contain at least one location object.\r\n\r\nProvide the 'partialFingerprints' dictionary. This property is required by the ADO Advanced Security service." }, "messageStrings": { + "Error_MissingRuleId": { + "text": "{0}: This 'result' object does not provide a 'ruleId' value. This property is required by the {1} service." + }, "Error_EmptyLocationsArray": { "text": "{0}: The 'locations' array on this 'result' object is empty. This property is required by the {1} service." }, @@ -44,9 +47,6 @@ }, "Error_MissingPartialFingerprints": { "text": "{0}: This 'result' object does not provide a 'partialFingerprints' dictionary. This property is required by the {1} service." - }, - "Error_MissingRuleId": { - "text": "{0}: This 'result' object does not provide a 'ruleId' value. This property is required by the {1} service." } }, "defaultConfiguration": { @@ -82,37 +82,6 @@ }, "helpUri": "http://docs.oasis-open.org/sarif/sarif/v2.1.0/sarif-v2.1.0.html" }, - { - "id": "ADO2012", - "name": "AdoProvideRequiredReportingDescriptorProperties", - "fullDescription": { - "text": "Rule metadata should provide information that makes it easy to understand and fix the problem.\r\nrule.id\r\n\r\nProvide the 'id' property whose value is a stable identifier for the rule.\r\n\r\nProvide the 'name' property, which contains a \"friendly name\" that helps users see at a glance the purpose of the rule. For uniformity of experience across all tools that produce SARIF, the friendly name should be a single Pascal-case identifier, for example, 'ProvideRuleFriendlyName'." - }, - "messageStrings": { - "Error_EmptyLocationsArray": { - "text": "{0}: The 'locations' array on this 'result' object is empty. This property is required by the {1} service." - }, - "Error_MissingLocationsArray": { - "text": "{0}: This 'result' object does not provide a 'locations' array. This property is required by the {1} service." - }, - "Error_MissingMessageText": { - "text": "{0}: The 'message' object on this 'result' object does not provide a 'text' property. This property is required by the {1} service." - }, - "Error_MissingMessage": { - "text": "{0}: This 'result' object does not provide a 'message' object. This property is required by the {1} service." - }, - "Error_MissingPartialFingerprints": { - "text": "{0}: This 'result' object does not provide a 'partialFingerprints' dictionary. This property is required by the {1} service." - }, - "Error_MissingName": { - "text": "{0}: This 'reportingDescriptor' object does not provide a 'name' value. This property is required by the {1} service." - } - }, - "defaultConfiguration": { - "level": "error" - }, - "helpUri": "http://docs.oasis-open.org/sarif/sarif/v2.1.0/sarif-v2.1.0.html" - }, { "id": "GH1015", "name": "GhasProvideRequiredResultProperties", @@ -148,6 +117,9 @@ "text": "Provide the 'region' property, along with the appropriate region properties. This property is required by the GitHub Advanced Security service.\r\n\r\nProvide the 'artifactLocation' property. This property is required by the GitHub Advanced Security service." }, "messageStrings": { + "Error_MissingArtifactLocationUri": { + "text": "{0}: The 'artifactLocation' object on this 'physicalLocation' object does not provide a 'uri' object. This property is required by the {1} service." + }, "Error_EmptyLocationsArray": { "text": "{0}: The 'locations' array on this 'result' object is empty. This property is required by the {1} service." }, @@ -162,9 +134,6 @@ }, "Error_MissingPartialFingerprints": { "text": "{0}: This 'result' object does not provide a 'partialFingerprints' dictionary. This property is required by the {1} service." - }, - "Error_MissingArtifactLocationUri": { - "text": "{0}: The 'artifactLocation' object on this 'physicalLocation' object does not provide a 'uri' object. This property is required by the {1} service." } }, "defaultConfiguration": { @@ -179,6 +148,18 @@ "text": "Rule metadata should provide information that makes it easy to understand and fix the problem.\r\n\r\nProvide the 'id' property whose value is a stable identifier for the rule.\r\n\r\nProvide the 'shortDescription' and 'fullDescription' properties.\r\n\r\nProvide the 'help' property and populate the 'text' property with information about the rule." }, "messageStrings": { + "Error_MissingFullDescription": { + "text": "{0}: This 'reportingDescriptor' object does not provide a 'fullDescription' value. This property is required by the {1} service." + }, + "Error_MissingHelpText": { + "text": "{0}: This 'help' object does not provide a 'text' value. This property is required by the {1} service." + }, + "Error_MissingHelp": { + "text": "{0}: This 'reportingDescriptor' object does not provide a 'help' object. This property is required by the {1} service." + }, + "Error_MissingShortDescription": { + "text": "{0}: This 'reportingDescriptor' object does not provide a 'shortDescription' value. This property is required by the {1} service." + }, "Error_EmptyLocationsArray": { "text": "{0}: The 'locations' array on this 'result' object is empty. This property is required by the {1} service." }, @@ -193,18 +174,6 @@ }, "Error_MissingPartialFingerprints": { "text": "{0}: This 'result' object does not provide a 'partialFingerprints' dictionary. This property is required by the {1} service." - }, - "Error_MissingFullDescription": { - "text": "{0}: This 'reportingDescriptor' object does not provide a 'fullDescription' value. This property is required by the {1} service." - }, - "Error_MissingHelpText": { - "text": "{0}: This 'help' object does not provide a 'text' value. This property is required by the {1} service." - }, - "Error_MissingHelp": { - "text": "{0}: This 'reportingDescriptor' object does not provide a 'help' object. This property is required by the {1} service." - }, - "Error_MissingShortDescription": { - "text": "{0}: This 'reportingDescriptor' object does not provide a 'shortDescription' value. This property is required by the {1} service." } }, "defaultConfiguration": { @@ -235,6 +204,9 @@ "text": "Provide information that makes it easy to identify the name and version of your tool.\r\n\r\nProvide the 'driver' property. This property is required by the ADO Advanced Security service.\r\n\r\nProvide the driver's 'name' and 'fullName' properties.\r\n\r\nProvide the driver's 'rules' array." }, "messageStrings": { + "Error_MissingDriverFullName": { + "text": "{0}: This 'driver' object does not provide a 'fullName' value. This property is required by the {1} service." + }, "Error_MissingDriverName": { "text": "{0}: The 'driver' object in this tool does not provide a 'name' value. This property is required by the {1} service." }, @@ -243,9 +215,6 @@ }, "Error_MissingDriver": { "text": "{0}: This 'tool' object does not provide a 'driver' object. This property is required by the {1} service." - }, - "Error_MissingDriverFullName": { - "text": "{0}: This 'driver' object does not provide a 'fullName' value. This property is required by the {1} service." } }, "defaultConfiguration": { @@ -487,67 +456,9 @@ "ResultMatching": {} } }, - { - "ruleId": "ADO2012", - "ruleIndex": 3, - "level": "error", - "message": { - "id": "Error_MissingPartialFingerprints", - "arguments": [ - "runs[0].results[0]", - "Azure DevOps Advanced Security" - ] - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "index": 0 - }, - "region": { - "startLine": 7, - "startColumn": 9 - } - } - } - ], - "baselineState": "new", - "properties": { - "ResultMatching": {} - } - }, - { - "ruleId": "ADO2012", - "ruleIndex": 3, - "level": "error", - "message": { - "id": "Error_MissingLocationsArray", - "arguments": [ - "runs[0].results[0]", - "Azure DevOps Advanced Security" - ] - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "index": 0 - }, - "region": { - "startLine": 7, - "startColumn": 9 - } - } - } - ], - "baselineState": "new", - "properties": { - "ResultMatching": {} - } - }, { "ruleId": "GH1015", - "ruleIndex": 4, + "ruleIndex": 3, "level": "error", "message": { "id": "Error_MissingPartialFingerprints", @@ -576,7 +487,7 @@ }, { "ruleId": "GH1015", - "ruleIndex": 4, + "ruleIndex": 3, "level": "error", "message": { "id": "Error_MissingLocationsArray", @@ -605,7 +516,7 @@ }, { "ruleId": "GH1017", - "ruleIndex": 5, + "ruleIndex": 4, "level": "error", "message": { "id": "Error_MissingPartialFingerprints", @@ -634,7 +545,7 @@ }, { "ruleId": "GH1017", - "ruleIndex": 5, + "ruleIndex": 4, "level": "error", "message": { "id": "Error_MissingLocationsArray", @@ -663,10 +574,10 @@ }, { "ruleId": "GH2012", - "ruleIndex": 6, + "ruleIndex": 5, "level": "error", "message": { - "id": "Error_MissingLocationsArray", + "id": "Error_MissingPartialFingerprints", "arguments": [ "runs[0].results[0]", "GitHub Advanced Security" @@ -692,10 +603,10 @@ }, { "ruleId": "GH2012", - "ruleIndex": 6, + "ruleIndex": 5, "level": "error", "message": { - "id": "Error_MissingPartialFingerprints", + "id": "Error_MissingLocationsArray", "arguments": [ "runs[0].results[0]", "GitHub Advanced Security" @@ -721,7 +632,7 @@ }, { "ruleId": "SARIF2002", - "ruleIndex": 7, + "ruleIndex": 6, "level": "note", "message": { "id": "Note_Default", @@ -864,69 +775,11 @@ } }, { - "ruleId": "ADO2012", + "ruleId": "GH1015", "ruleIndex": 3, "level": "error", "message": { "id": "Error_MissingLocationsArray", - "arguments": [ - "runs[0].results[1]", - "Azure DevOps Advanced Security" - ] - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "index": 0 - }, - "region": { - "startLine": 13, - "startColumn": 9 - } - } - } - ], - "baselineState": "new", - "properties": { - "ResultMatching": {} - } - }, - { - "ruleId": "ADO2012", - "ruleIndex": 3, - "level": "error", - "message": { - "id": "Error_MissingPartialFingerprints", - "arguments": [ - "runs[0].results[1]", - "Azure DevOps Advanced Security" - ] - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "index": 0 - }, - "region": { - "startLine": 13, - "startColumn": 9 - } - } - } - ], - "baselineState": "new", - "properties": { - "ResultMatching": {} - } - }, - { - "ruleId": "GH1015", - "ruleIndex": 4, - "level": "error", - "message": { - "id": "Error_MissingPartialFingerprints", "arguments": [ "runs[0].results[1]", "GitHub Advanced Security" @@ -952,10 +805,10 @@ }, { "ruleId": "GH1015", - "ruleIndex": 4, + "ruleIndex": 3, "level": "error", "message": { - "id": "Error_MissingLocationsArray", + "id": "Error_MissingPartialFingerprints", "arguments": [ "runs[0].results[1]", "GitHub Advanced Security" @@ -981,7 +834,7 @@ }, { "ruleId": "GH1017", - "ruleIndex": 5, + "ruleIndex": 4, "level": "error", "message": { "id": "Error_MissingLocationsArray", @@ -1010,7 +863,7 @@ }, { "ruleId": "GH1017", - "ruleIndex": 5, + "ruleIndex": 4, "level": "error", "message": { "id": "Error_MissingPartialFingerprints", @@ -1039,7 +892,7 @@ }, { "ruleId": "GH2012", - "ruleIndex": 6, + "ruleIndex": 5, "level": "error", "message": { "id": "Error_MissingPartialFingerprints", @@ -1068,7 +921,7 @@ }, { "ruleId": "GH2012", - "ruleIndex": 6, + "ruleIndex": 5, "level": "error", "message": { "id": "Error_MissingLocationsArray", @@ -1097,7 +950,7 @@ }, { "ruleId": "SARIF2002", - "ruleIndex": 7, + "ruleIndex": 6, "level": "note", "message": { "id": "Note_Default", @@ -1128,7 +981,7 @@ "ruleIndex": 1, "level": "error", "message": { - "id": "Error_MissingLocationsArray", + "id": "Error_MissingPartialFingerprints", "arguments": [ "runs[0].results[2]", "Azure DevOps Advanced Security" @@ -1156,35 +1009,6 @@ "ruleId": "ADO1015", "ruleIndex": 1, "level": "error", - "message": { - "id": "Error_MissingPartialFingerprints", - "arguments": [ - "runs[0].results[2]", - "Azure DevOps Advanced Security" - ] - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "index": 0 - }, - "region": { - "startLine": 19, - "startColumn": 9 - } - } - } - ], - "baselineState": "new", - "properties": { - "ResultMatching": {} - } - }, - { - "ruleId": "ADO1017", - "ruleIndex": 2, - "level": "error", "message": { "id": "Error_MissingLocationsArray", "arguments": [ @@ -1240,37 +1064,8 @@ } }, { - "ruleId": "ADO2012", - "ruleIndex": 3, - "level": "error", - "message": { - "id": "Error_MissingPartialFingerprints", - "arguments": [ - "runs[0].results[2]", - "Azure DevOps Advanced Security" - ] - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "index": 0 - }, - "region": { - "startLine": 19, - "startColumn": 9 - } - } - } - ], - "baselineState": "new", - "properties": { - "ResultMatching": {} - } - }, - { - "ruleId": "ADO2012", - "ruleIndex": 3, + "ruleId": "ADO1017", + "ruleIndex": 2, "level": "error", "message": { "id": "Error_MissingLocationsArray", @@ -1299,7 +1094,7 @@ }, { "ruleId": "GH1015", - "ruleIndex": 4, + "ruleIndex": 3, "level": "error", "message": { "id": "Error_MissingPartialFingerprints", @@ -1328,7 +1123,7 @@ }, { "ruleId": "GH1015", - "ruleIndex": 4, + "ruleIndex": 3, "level": "error", "message": { "id": "Error_MissingLocationsArray", @@ -1357,7 +1152,7 @@ }, { "ruleId": "GH1017", - "ruleIndex": 5, + "ruleIndex": 4, "level": "error", "message": { "id": "Error_MissingPartialFingerprints", @@ -1386,7 +1181,7 @@ }, { "ruleId": "GH1017", - "ruleIndex": 5, + "ruleIndex": 4, "level": "error", "message": { "id": "Error_MissingLocationsArray", @@ -1415,7 +1210,7 @@ }, { "ruleId": "GH2012", - "ruleIndex": 6, + "ruleIndex": 5, "level": "error", "message": { "id": "Error_MissingLocationsArray", @@ -1444,7 +1239,7 @@ }, { "ruleId": "GH2012", - "ruleIndex": 6, + "ruleIndex": 5, "level": "error", "message": { "id": "Error_MissingPartialFingerprints", @@ -1473,7 +1268,7 @@ }, { "ruleId": "SARIF2002", - "ruleIndex": 7, + "ruleIndex": 6, "level": "note", "message": { "id": "Note_Default", @@ -1501,7 +1296,7 @@ }, { "ruleId": "ADO1018", - "ruleIndex": 8, + "ruleIndex": 7, "level": "error", "message": { "id": "Error_MissingDriverRules", @@ -1530,7 +1325,7 @@ }, { "ruleId": "ADO1018", - "ruleIndex": 8, + "ruleIndex": 7, "level": "error", "message": { "id": "Error_MissingDriverRules", @@ -1559,7 +1354,7 @@ }, { "ruleId": "GH1018", - "ruleIndex": 9, + "ruleIndex": 8, "level": "error", "message": { "id": "Error_MissingDriverRules", @@ -1588,7 +1383,7 @@ }, { "ruleId": "SARIF2005", - "ruleIndex": 10, + "ruleIndex": 9, "message": { "id": "Warning_ProvideToolVersion", "arguments": [ @@ -1617,7 +1412,7 @@ }, { "ruleId": "SARIF2005", - "ruleIndex": 10, + "ruleIndex": 9, "message": { "id": "Warning_ProvideToolnformationUri", "arguments": [ @@ -1645,7 +1440,7 @@ }, { "ruleId": "SARIF2012", - "ruleIndex": 11, + "ruleIndex": 10, "level": "note", "message": { "id": "Note_ProvideMetadataForAllViolatedRules", diff --git a/src/Test.FunctionalTests.Sarif/TestData/Multitool/BaselineOption/ExpectedOutputs/TEST1005.ValidateBaseline.UnchangedResults.sarif b/src/Test.FunctionalTests.Sarif/TestData/Multitool/BaselineOption/ExpectedOutputs/TEST1005.ValidateBaseline.UnchangedResults.sarif index a27e82c46..cd122f5d8 100644 --- a/src/Test.FunctionalTests.Sarif/TestData/Multitool/BaselineOption/ExpectedOutputs/TEST1005.ValidateBaseline.UnchangedResults.sarif +++ b/src/Test.FunctionalTests.Sarif/TestData/Multitool/BaselineOption/ExpectedOutputs/TEST1005.ValidateBaseline.UnchangedResults.sarif @@ -30,6 +30,9 @@ "text": "The Result object represents an analysis finding and should provide details describing the nature of the problem along with its location in the scan target.\r\n\r\nProvide the 'ruleId' property, which is the unique identifier of the analysis rule that was violated. This property is required by the ADO Advanced Security service.\r\n\r\nProvide the 'message' property, which is a user-facing explanation of the result occurrence. The message's 'text' property is required by the ADO Advanced Security service.\r\n\r\nProvide the 'locations' array, which must contain at least one location object.\r\n\r\nProvide the 'partialFingerprints' dictionary. This property is required by the ADO Advanced Security service." }, "messageStrings": { + "Error_MissingRuleId": { + "text": "{0}: This 'result' object does not provide a 'ruleId' value. This property is required by the {1} service." + }, "Error_EmptyLocationsArray": { "text": "{0}: The 'locations' array on this 'result' object is empty. This property is required by the {1} service." }, @@ -44,9 +47,6 @@ }, "Error_MissingPartialFingerprints": { "text": "{0}: This 'result' object does not provide a 'partialFingerprints' dictionary. This property is required by the {1} service." - }, - "Error_MissingRuleId": { - "text": "{0}: This 'result' object does not provide a 'ruleId' value. This property is required by the {1} service." } }, "defaultConfiguration": { @@ -82,37 +82,6 @@ }, "helpUri": "http://docs.oasis-open.org/sarif/sarif/v2.1.0/sarif-v2.1.0.html" }, - { - "id": "ADO2012", - "name": "AdoProvideRequiredReportingDescriptorProperties", - "fullDescription": { - "text": "Rule metadata should provide information that makes it easy to understand and fix the problem.\r\nrule.id\r\n\r\nProvide the 'id' property whose value is a stable identifier for the rule.\r\n\r\nProvide the 'name' property, which contains a \"friendly name\" that helps users see at a glance the purpose of the rule. For uniformity of experience across all tools that produce SARIF, the friendly name should be a single Pascal-case identifier, for example, 'ProvideRuleFriendlyName'." - }, - "messageStrings": { - "Error_EmptyLocationsArray": { - "text": "{0}: The 'locations' array on this 'result' object is empty. This property is required by the {1} service." - }, - "Error_MissingLocationsArray": { - "text": "{0}: This 'result' object does not provide a 'locations' array. This property is required by the {1} service." - }, - "Error_MissingMessageText": { - "text": "{0}: The 'message' object on this 'result' object does not provide a 'text' property. This property is required by the {1} service." - }, - "Error_MissingMessage": { - "text": "{0}: This 'result' object does not provide a 'message' object. This property is required by the {1} service." - }, - "Error_MissingPartialFingerprints": { - "text": "{0}: This 'result' object does not provide a 'partialFingerprints' dictionary. This property is required by the {1} service." - }, - "Error_MissingName": { - "text": "{0}: This 'reportingDescriptor' object does not provide a 'name' value. This property is required by the {1} service." - } - }, - "defaultConfiguration": { - "level": "error" - }, - "helpUri": "http://docs.oasis-open.org/sarif/sarif/v2.1.0/sarif-v2.1.0.html" - }, { "id": "GH1015", "name": "GhasProvideRequiredResultProperties", @@ -148,6 +117,9 @@ "text": "Provide the 'region' property, along with the appropriate region properties. This property is required by the GitHub Advanced Security service.\r\n\r\nProvide the 'artifactLocation' property. This property is required by the GitHub Advanced Security service." }, "messageStrings": { + "Error_MissingArtifactLocationUri": { + "text": "{0}: The 'artifactLocation' object on this 'physicalLocation' object does not provide a 'uri' object. This property is required by the {1} service." + }, "Error_EmptyLocationsArray": { "text": "{0}: The 'locations' array on this 'result' object is empty. This property is required by the {1} service." }, @@ -162,9 +134,6 @@ }, "Error_MissingPartialFingerprints": { "text": "{0}: This 'result' object does not provide a 'partialFingerprints' dictionary. This property is required by the {1} service." - }, - "Error_MissingArtifactLocationUri": { - "text": "{0}: The 'artifactLocation' object on this 'physicalLocation' object does not provide a 'uri' object. This property is required by the {1} service." } }, "defaultConfiguration": { @@ -179,6 +148,18 @@ "text": "Rule metadata should provide information that makes it easy to understand and fix the problem.\r\n\r\nProvide the 'id' property whose value is a stable identifier for the rule.\r\n\r\nProvide the 'shortDescription' and 'fullDescription' properties.\r\n\r\nProvide the 'help' property and populate the 'text' property with information about the rule." }, "messageStrings": { + "Error_MissingFullDescription": { + "text": "{0}: This 'reportingDescriptor' object does not provide a 'fullDescription' value. This property is required by the {1} service." + }, + "Error_MissingHelpText": { + "text": "{0}: This 'help' object does not provide a 'text' value. This property is required by the {1} service." + }, + "Error_MissingHelp": { + "text": "{0}: This 'reportingDescriptor' object does not provide a 'help' object. This property is required by the {1} service." + }, + "Error_MissingShortDescription": { + "text": "{0}: This 'reportingDescriptor' object does not provide a 'shortDescription' value. This property is required by the {1} service." + }, "Error_EmptyLocationsArray": { "text": "{0}: The 'locations' array on this 'result' object is empty. This property is required by the {1} service." }, @@ -193,18 +174,6 @@ }, "Error_MissingPartialFingerprints": { "text": "{0}: This 'result' object does not provide a 'partialFingerprints' dictionary. This property is required by the {1} service." - }, - "Error_MissingFullDescription": { - "text": "{0}: This 'reportingDescriptor' object does not provide a 'fullDescription' value. This property is required by the {1} service." - }, - "Error_MissingHelpText": { - "text": "{0}: This 'help' object does not provide a 'text' value. This property is required by the {1} service." - }, - "Error_MissingHelp": { - "text": "{0}: This 'reportingDescriptor' object does not provide a 'help' object. This property is required by the {1} service." - }, - "Error_MissingShortDescription": { - "text": "{0}: This 'reportingDescriptor' object does not provide a 'shortDescription' value. This property is required by the {1} service." } }, "defaultConfiguration": { @@ -235,6 +204,9 @@ "text": "Provide information that makes it easy to identify the name and version of your tool.\r\n\r\nProvide the 'driver' property. This property is required by the ADO Advanced Security service.\r\n\r\nProvide the driver's 'name' and 'fullName' properties.\r\n\r\nProvide the driver's 'rules' array." }, "messageStrings": { + "Error_MissingDriverFullName": { + "text": "{0}: This 'driver' object does not provide a 'fullName' value. This property is required by the {1} service." + }, "Error_MissingDriverName": { "text": "{0}: The 'driver' object in this tool does not provide a 'name' value. This property is required by the {1} service." }, @@ -243,9 +215,6 @@ }, "Error_MissingDriver": { "text": "{0}: This 'tool' object does not provide a 'driver' object. This property is required by the {1} service." - }, - "Error_MissingDriverFullName": { - "text": "{0}: This 'driver' object does not provide a 'fullName' value. This property is required by the {1} service." } }, "defaultConfiguration": { @@ -487,67 +456,9 @@ "ResultMatching": {} } }, - { - "ruleId": "ADO2012", - "ruleIndex": 3, - "level": "error", - "message": { - "id": "Error_MissingPartialFingerprints", - "arguments": [ - "runs[0].results[0]", - "Azure DevOps Advanced Security" - ] - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "index": 0 - }, - "region": { - "startLine": 7, - "startColumn": 9 - } - } - } - ], - "baselineState": "new", - "properties": { - "ResultMatching": {} - } - }, - { - "ruleId": "ADO2012", - "ruleIndex": 3, - "level": "error", - "message": { - "id": "Error_MissingLocationsArray", - "arguments": [ - "runs[0].results[0]", - "Azure DevOps Advanced Security" - ] - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "index": 0 - }, - "region": { - "startLine": 7, - "startColumn": 9 - } - } - } - ], - "baselineState": "new", - "properties": { - "ResultMatching": {} - } - }, { "ruleId": "GH1015", - "ruleIndex": 4, + "ruleIndex": 3, "level": "error", "message": { "id": "Error_MissingPartialFingerprints", @@ -576,7 +487,7 @@ }, { "ruleId": "GH1015", - "ruleIndex": 4, + "ruleIndex": 3, "level": "error", "message": { "id": "Error_MissingLocationsArray", @@ -605,7 +516,7 @@ }, { "ruleId": "GH1017", - "ruleIndex": 5, + "ruleIndex": 4, "level": "error", "message": { "id": "Error_MissingPartialFingerprints", @@ -634,7 +545,7 @@ }, { "ruleId": "GH1017", - "ruleIndex": 5, + "ruleIndex": 4, "level": "error", "message": { "id": "Error_MissingLocationsArray", @@ -663,10 +574,10 @@ }, { "ruleId": "GH2012", - "ruleIndex": 6, + "ruleIndex": 5, "level": "error", "message": { - "id": "Error_MissingLocationsArray", + "id": "Error_MissingPartialFingerprints", "arguments": [ "runs[0].results[0]", "GitHub Advanced Security" @@ -692,10 +603,10 @@ }, { "ruleId": "GH2012", - "ruleIndex": 6, + "ruleIndex": 5, "level": "error", "message": { - "id": "Error_MissingPartialFingerprints", + "id": "Error_MissingLocationsArray", "arguments": [ "runs[0].results[0]", "GitHub Advanced Security" @@ -721,7 +632,7 @@ }, { "ruleId": "SARIF2002", - "ruleIndex": 7, + "ruleIndex": 6, "level": "note", "message": { "id": "Note_Default", @@ -864,69 +775,11 @@ } }, { - "ruleId": "ADO2012", + "ruleId": "GH1015", "ruleIndex": 3, "level": "error", "message": { "id": "Error_MissingLocationsArray", - "arguments": [ - "runs[0].results[1]", - "Azure DevOps Advanced Security" - ] - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "index": 0 - }, - "region": { - "startLine": 13, - "startColumn": 9 - } - } - } - ], - "baselineState": "new", - "properties": { - "ResultMatching": {} - } - }, - { - "ruleId": "ADO2012", - "ruleIndex": 3, - "level": "error", - "message": { - "id": "Error_MissingPartialFingerprints", - "arguments": [ - "runs[0].results[1]", - "Azure DevOps Advanced Security" - ] - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "index": 0 - }, - "region": { - "startLine": 13, - "startColumn": 9 - } - } - } - ], - "baselineState": "new", - "properties": { - "ResultMatching": {} - } - }, - { - "ruleId": "GH1015", - "ruleIndex": 4, - "level": "error", - "message": { - "id": "Error_MissingPartialFingerprints", "arguments": [ "runs[0].results[1]", "GitHub Advanced Security" @@ -952,10 +805,10 @@ }, { "ruleId": "GH1015", - "ruleIndex": 4, + "ruleIndex": 3, "level": "error", "message": { - "id": "Error_MissingLocationsArray", + "id": "Error_MissingPartialFingerprints", "arguments": [ "runs[0].results[1]", "GitHub Advanced Security" @@ -981,7 +834,7 @@ }, { "ruleId": "GH1017", - "ruleIndex": 5, + "ruleIndex": 4, "level": "error", "message": { "id": "Error_MissingLocationsArray", @@ -1010,7 +863,7 @@ }, { "ruleId": "GH1017", - "ruleIndex": 5, + "ruleIndex": 4, "level": "error", "message": { "id": "Error_MissingPartialFingerprints", @@ -1039,7 +892,7 @@ }, { "ruleId": "GH2012", - "ruleIndex": 6, + "ruleIndex": 5, "level": "error", "message": { "id": "Error_MissingPartialFingerprints", @@ -1068,7 +921,7 @@ }, { "ruleId": "GH2012", - "ruleIndex": 6, + "ruleIndex": 5, "level": "error", "message": { "id": "Error_MissingLocationsArray", @@ -1097,7 +950,7 @@ }, { "ruleId": "SARIF2002", - "ruleIndex": 7, + "ruleIndex": 6, "level": "note", "message": { "id": "Note_Default", @@ -1128,7 +981,7 @@ "ruleIndex": 1, "level": "error", "message": { - "id": "Error_MissingLocationsArray", + "id": "Error_MissingPartialFingerprints", "arguments": [ "runs[0].results[2]", "Azure DevOps Advanced Security" @@ -1156,35 +1009,6 @@ "ruleId": "ADO1015", "ruleIndex": 1, "level": "error", - "message": { - "id": "Error_MissingPartialFingerprints", - "arguments": [ - "runs[0].results[2]", - "Azure DevOps Advanced Security" - ] - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "index": 0 - }, - "region": { - "startLine": 19, - "startColumn": 9 - } - } - } - ], - "baselineState": "new", - "properties": { - "ResultMatching": {} - } - }, - { - "ruleId": "ADO1017", - "ruleIndex": 2, - "level": "error", "message": { "id": "Error_MissingLocationsArray", "arguments": [ @@ -1240,37 +1064,8 @@ } }, { - "ruleId": "ADO2012", - "ruleIndex": 3, - "level": "error", - "message": { - "id": "Error_MissingPartialFingerprints", - "arguments": [ - "runs[0].results[2]", - "Azure DevOps Advanced Security" - ] - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "index": 0 - }, - "region": { - "startLine": 19, - "startColumn": 9 - } - } - } - ], - "baselineState": "new", - "properties": { - "ResultMatching": {} - } - }, - { - "ruleId": "ADO2012", - "ruleIndex": 3, + "ruleId": "ADO1017", + "ruleIndex": 2, "level": "error", "message": { "id": "Error_MissingLocationsArray", @@ -1299,7 +1094,7 @@ }, { "ruleId": "GH1015", - "ruleIndex": 4, + "ruleIndex": 3, "level": "error", "message": { "id": "Error_MissingPartialFingerprints", @@ -1328,7 +1123,7 @@ }, { "ruleId": "GH1015", - "ruleIndex": 4, + "ruleIndex": 3, "level": "error", "message": { "id": "Error_MissingLocationsArray", @@ -1357,7 +1152,7 @@ }, { "ruleId": "GH1017", - "ruleIndex": 5, + "ruleIndex": 4, "level": "error", "message": { "id": "Error_MissingPartialFingerprints", @@ -1386,7 +1181,7 @@ }, { "ruleId": "GH1017", - "ruleIndex": 5, + "ruleIndex": 4, "level": "error", "message": { "id": "Error_MissingLocationsArray", @@ -1415,7 +1210,7 @@ }, { "ruleId": "GH2012", - "ruleIndex": 6, + "ruleIndex": 5, "level": "error", "message": { "id": "Error_MissingLocationsArray", @@ -1444,7 +1239,7 @@ }, { "ruleId": "GH2012", - "ruleIndex": 6, + "ruleIndex": 5, "level": "error", "message": { "id": "Error_MissingPartialFingerprints", @@ -1473,7 +1268,7 @@ }, { "ruleId": "SARIF2002", - "ruleIndex": 7, + "ruleIndex": 6, "level": "note", "message": { "id": "Note_Default", @@ -1501,7 +1296,7 @@ }, { "ruleId": "ADO1018", - "ruleIndex": 8, + "ruleIndex": 7, "level": "error", "message": { "id": "Error_MissingDriverRules", @@ -1530,7 +1325,7 @@ }, { "ruleId": "ADO1018", - "ruleIndex": 8, + "ruleIndex": 7, "level": "error", "message": { "id": "Error_MissingDriverRules", @@ -1559,7 +1354,7 @@ }, { "ruleId": "GH1018", - "ruleIndex": 9, + "ruleIndex": 8, "level": "error", "message": { "id": "Error_MissingDriverRules", @@ -1588,7 +1383,7 @@ }, { "ruleId": "SARIF2005", - "ruleIndex": 10, + "ruleIndex": 9, "message": { "id": "Warning_ProvideToolVersion", "arguments": [ @@ -1617,7 +1412,7 @@ }, { "ruleId": "SARIF2005", - "ruleIndex": 10, + "ruleIndex": 9, "message": { "id": "Warning_ProvideToolnformationUri", "arguments": [ @@ -1645,7 +1440,7 @@ }, { "ruleId": "SARIF2012", - "ruleIndex": 11, + "ruleIndex": 10, "level": "note", "message": { "id": "Note_ProvideMetadataForAllViolatedRules", diff --git a/src/Test.FunctionalTests.Sarif/TestData/Multitool/BaselineOption/ExpectedOutputs/TEST1006.ValidateBaseline.UpdatedResults.sarif b/src/Test.FunctionalTests.Sarif/TestData/Multitool/BaselineOption/ExpectedOutputs/TEST1006.ValidateBaseline.UpdatedResults.sarif index 05cf02955..2a004c9b2 100644 --- a/src/Test.FunctionalTests.Sarif/TestData/Multitool/BaselineOption/ExpectedOutputs/TEST1006.ValidateBaseline.UpdatedResults.sarif +++ b/src/Test.FunctionalTests.Sarif/TestData/Multitool/BaselineOption/ExpectedOutputs/TEST1006.ValidateBaseline.UpdatedResults.sarif @@ -30,6 +30,9 @@ "text": "The Result object represents an analysis finding and should provide details describing the nature of the problem along with its location in the scan target.\r\n\r\nProvide the 'ruleId' property, which is the unique identifier of the analysis rule that was violated. This property is required by the ADO Advanced Security service.\r\n\r\nProvide the 'message' property, which is a user-facing explanation of the result occurrence. The message's 'text' property is required by the ADO Advanced Security service.\r\n\r\nProvide the 'locations' array, which must contain at least one location object.\r\n\r\nProvide the 'partialFingerprints' dictionary. This property is required by the ADO Advanced Security service." }, "messageStrings": { + "Error_MissingRuleId": { + "text": "{0}: This 'result' object does not provide a 'ruleId' value. This property is required by the {1} service." + }, "Error_EmptyLocationsArray": { "text": "{0}: The 'locations' array on this 'result' object is empty. This property is required by the {1} service." }, @@ -44,9 +47,6 @@ }, "Error_MissingPartialFingerprints": { "text": "{0}: This 'result' object does not provide a 'partialFingerprints' dictionary. This property is required by the {1} service." - }, - "Error_MissingRuleId": { - "text": "{0}: This 'result' object does not provide a 'ruleId' value. This property is required by the {1} service." } }, "defaultConfiguration": { @@ -82,37 +82,6 @@ }, "helpUri": "http://docs.oasis-open.org/sarif/sarif/v2.1.0/sarif-v2.1.0.html" }, - { - "id": "ADO2012", - "name": "AdoProvideRequiredReportingDescriptorProperties", - "fullDescription": { - "text": "Rule metadata should provide information that makes it easy to understand and fix the problem.\r\nrule.id\r\n\r\nProvide the 'id' property whose value is a stable identifier for the rule.\r\n\r\nProvide the 'name' property, which contains a \"friendly name\" that helps users see at a glance the purpose of the rule. For uniformity of experience across all tools that produce SARIF, the friendly name should be a single Pascal-case identifier, for example, 'ProvideRuleFriendlyName'." - }, - "messageStrings": { - "Error_EmptyLocationsArray": { - "text": "{0}: The 'locations' array on this 'result' object is empty. This property is required by the {1} service." - }, - "Error_MissingLocationsArray": { - "text": "{0}: This 'result' object does not provide a 'locations' array. This property is required by the {1} service." - }, - "Error_MissingMessageText": { - "text": "{0}: The 'message' object on this 'result' object does not provide a 'text' property. This property is required by the {1} service." - }, - "Error_MissingMessage": { - "text": "{0}: This 'result' object does not provide a 'message' object. This property is required by the {1} service." - }, - "Error_MissingPartialFingerprints": { - "text": "{0}: This 'result' object does not provide a 'partialFingerprints' dictionary. This property is required by the {1} service." - }, - "Error_MissingName": { - "text": "{0}: This 'reportingDescriptor' object does not provide a 'name' value. This property is required by the {1} service." - } - }, - "defaultConfiguration": { - "level": "error" - }, - "helpUri": "http://docs.oasis-open.org/sarif/sarif/v2.1.0/sarif-v2.1.0.html" - }, { "id": "GH1015", "name": "GhasProvideRequiredResultProperties", @@ -148,6 +117,9 @@ "text": "Provide the 'region' property, along with the appropriate region properties. This property is required by the GitHub Advanced Security service.\r\n\r\nProvide the 'artifactLocation' property. This property is required by the GitHub Advanced Security service." }, "messageStrings": { + "Error_MissingArtifactLocationUri": { + "text": "{0}: The 'artifactLocation' object on this 'physicalLocation' object does not provide a 'uri' object. This property is required by the {1} service." + }, "Error_EmptyLocationsArray": { "text": "{0}: The 'locations' array on this 'result' object is empty. This property is required by the {1} service." }, @@ -162,9 +134,6 @@ }, "Error_MissingPartialFingerprints": { "text": "{0}: This 'result' object does not provide a 'partialFingerprints' dictionary. This property is required by the {1} service." - }, - "Error_MissingArtifactLocationUri": { - "text": "{0}: The 'artifactLocation' object on this 'physicalLocation' object does not provide a 'uri' object. This property is required by the {1} service." } }, "defaultConfiguration": { @@ -179,6 +148,18 @@ "text": "Rule metadata should provide information that makes it easy to understand and fix the problem.\r\n\r\nProvide the 'id' property whose value is a stable identifier for the rule.\r\n\r\nProvide the 'shortDescription' and 'fullDescription' properties.\r\n\r\nProvide the 'help' property and populate the 'text' property with information about the rule." }, "messageStrings": { + "Error_MissingFullDescription": { + "text": "{0}: This 'reportingDescriptor' object does not provide a 'fullDescription' value. This property is required by the {1} service." + }, + "Error_MissingHelpText": { + "text": "{0}: This 'help' object does not provide a 'text' value. This property is required by the {1} service." + }, + "Error_MissingHelp": { + "text": "{0}: This 'reportingDescriptor' object does not provide a 'help' object. This property is required by the {1} service." + }, + "Error_MissingShortDescription": { + "text": "{0}: This 'reportingDescriptor' object does not provide a 'shortDescription' value. This property is required by the {1} service." + }, "Error_EmptyLocationsArray": { "text": "{0}: The 'locations' array on this 'result' object is empty. This property is required by the {1} service." }, @@ -193,18 +174,6 @@ }, "Error_MissingPartialFingerprints": { "text": "{0}: This 'result' object does not provide a 'partialFingerprints' dictionary. This property is required by the {1} service." - }, - "Error_MissingFullDescription": { - "text": "{0}: This 'reportingDescriptor' object does not provide a 'fullDescription' value. This property is required by the {1} service." - }, - "Error_MissingHelpText": { - "text": "{0}: This 'help' object does not provide a 'text' value. This property is required by the {1} service." - }, - "Error_MissingHelp": { - "text": "{0}: This 'reportingDescriptor' object does not provide a 'help' object. This property is required by the {1} service." - }, - "Error_MissingShortDescription": { - "text": "{0}: This 'reportingDescriptor' object does not provide a 'shortDescription' value. This property is required by the {1} service." } }, "defaultConfiguration": { @@ -235,6 +204,9 @@ "text": "Provide information that makes it easy to identify the name and version of your tool.\r\n\r\nProvide the 'driver' property. This property is required by the ADO Advanced Security service.\r\n\r\nProvide the driver's 'name' and 'fullName' properties.\r\n\r\nProvide the driver's 'rules' array." }, "messageStrings": { + "Error_MissingDriverFullName": { + "text": "{0}: This 'driver' object does not provide a 'fullName' value. This property is required by the {1} service." + }, "Error_MissingDriverName": { "text": "{0}: The 'driver' object in this tool does not provide a 'name' value. This property is required by the {1} service." }, @@ -243,9 +215,6 @@ }, "Error_MissingDriver": { "text": "{0}: This 'tool' object does not provide a 'driver' object. This property is required by the {1} service." - }, - "Error_MissingDriverFullName": { - "text": "{0}: This 'driver' object does not provide a 'fullName' value. This property is required by the {1} service." } }, "defaultConfiguration": { @@ -487,67 +456,9 @@ "ResultMatching": {} } }, - { - "ruleId": "ADO2012", - "ruleIndex": 3, - "level": "error", - "message": { - "id": "Error_MissingPartialFingerprints", - "arguments": [ - "runs[0].results[0]", - "Azure DevOps Advanced Security" - ] - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "index": 0 - }, - "region": { - "startLine": 7, - "startColumn": 9 - } - } - } - ], - "baselineState": "new", - "properties": { - "ResultMatching": {} - } - }, - { - "ruleId": "ADO2012", - "ruleIndex": 3, - "level": "error", - "message": { - "id": "Error_MissingLocationsArray", - "arguments": [ - "runs[0].results[0]", - "Azure DevOps Advanced Security" - ] - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "index": 0 - }, - "region": { - "startLine": 7, - "startColumn": 9 - } - } - } - ], - "baselineState": "new", - "properties": { - "ResultMatching": {} - } - }, { "ruleId": "GH1015", - "ruleIndex": 4, + "ruleIndex": 3, "level": "error", "message": { "id": "Error_MissingPartialFingerprints", @@ -576,7 +487,7 @@ }, { "ruleId": "GH1015", - "ruleIndex": 4, + "ruleIndex": 3, "level": "error", "message": { "id": "Error_MissingLocationsArray", @@ -605,7 +516,7 @@ }, { "ruleId": "GH1017", - "ruleIndex": 5, + "ruleIndex": 4, "level": "error", "message": { "id": "Error_MissingPartialFingerprints", @@ -634,7 +545,7 @@ }, { "ruleId": "GH1017", - "ruleIndex": 5, + "ruleIndex": 4, "level": "error", "message": { "id": "Error_MissingLocationsArray", @@ -663,10 +574,10 @@ }, { "ruleId": "GH2012", - "ruleIndex": 6, + "ruleIndex": 5, "level": "error", "message": { - "id": "Error_MissingLocationsArray", + "id": "Error_MissingPartialFingerprints", "arguments": [ "runs[0].results[0]", "GitHub Advanced Security" @@ -692,10 +603,10 @@ }, { "ruleId": "GH2012", - "ruleIndex": 6, + "ruleIndex": 5, "level": "error", "message": { - "id": "Error_MissingPartialFingerprints", + "id": "Error_MissingLocationsArray", "arguments": [ "runs[0].results[0]", "GitHub Advanced Security" @@ -721,7 +632,7 @@ }, { "ruleId": "SARIF2002", - "ruleIndex": 7, + "ruleIndex": 6, "level": "note", "message": { "id": "Note_Default", @@ -864,69 +775,11 @@ } }, { - "ruleId": "ADO2012", + "ruleId": "GH1015", "ruleIndex": 3, "level": "error", "message": { "id": "Error_MissingLocationsArray", - "arguments": [ - "runs[0].results[1]", - "Azure DevOps Advanced Security" - ] - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "index": 0 - }, - "region": { - "startLine": 13, - "startColumn": 9 - } - } - } - ], - "baselineState": "new", - "properties": { - "ResultMatching": {} - } - }, - { - "ruleId": "ADO2012", - "ruleIndex": 3, - "level": "error", - "message": { - "id": "Error_MissingPartialFingerprints", - "arguments": [ - "runs[0].results[1]", - "Azure DevOps Advanced Security" - ] - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "index": 0 - }, - "region": { - "startLine": 13, - "startColumn": 9 - } - } - } - ], - "baselineState": "new", - "properties": { - "ResultMatching": {} - } - }, - { - "ruleId": "GH1015", - "ruleIndex": 4, - "level": "error", - "message": { - "id": "Error_MissingPartialFingerprints", "arguments": [ "runs[0].results[1]", "GitHub Advanced Security" @@ -952,10 +805,10 @@ }, { "ruleId": "GH1015", - "ruleIndex": 4, + "ruleIndex": 3, "level": "error", "message": { - "id": "Error_MissingLocationsArray", + "id": "Error_MissingPartialFingerprints", "arguments": [ "runs[0].results[1]", "GitHub Advanced Security" @@ -981,7 +834,7 @@ }, { "ruleId": "GH1017", - "ruleIndex": 5, + "ruleIndex": 4, "level": "error", "message": { "id": "Error_MissingLocationsArray", @@ -1010,7 +863,7 @@ }, { "ruleId": "GH1017", - "ruleIndex": 5, + "ruleIndex": 4, "level": "error", "message": { "id": "Error_MissingPartialFingerprints", @@ -1039,7 +892,7 @@ }, { "ruleId": "GH2012", - "ruleIndex": 6, + "ruleIndex": 5, "level": "error", "message": { "id": "Error_MissingPartialFingerprints", @@ -1068,7 +921,7 @@ }, { "ruleId": "GH2012", - "ruleIndex": 6, + "ruleIndex": 5, "level": "error", "message": { "id": "Error_MissingLocationsArray", @@ -1097,7 +950,7 @@ }, { "ruleId": "SARIF2002", - "ruleIndex": 7, + "ruleIndex": 6, "level": "note", "message": { "id": "Note_Default", @@ -1128,7 +981,7 @@ "ruleIndex": 1, "level": "error", "message": { - "id": "Error_MissingLocationsArray", + "id": "Error_MissingPartialFingerprints", "arguments": [ "runs[0].results[2]", "Azure DevOps Advanced Security" @@ -1156,35 +1009,6 @@ "ruleId": "ADO1015", "ruleIndex": 1, "level": "error", - "message": { - "id": "Error_MissingPartialFingerprints", - "arguments": [ - "runs[0].results[2]", - "Azure DevOps Advanced Security" - ] - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "index": 0 - }, - "region": { - "startLine": 19, - "startColumn": 9 - } - } - } - ], - "baselineState": "new", - "properties": { - "ResultMatching": {} - } - }, - { - "ruleId": "ADO1017", - "ruleIndex": 2, - "level": "error", "message": { "id": "Error_MissingLocationsArray", "arguments": [ @@ -1240,37 +1064,8 @@ } }, { - "ruleId": "ADO2012", - "ruleIndex": 3, - "level": "error", - "message": { - "id": "Error_MissingPartialFingerprints", - "arguments": [ - "runs[0].results[2]", - "Azure DevOps Advanced Security" - ] - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "index": 0 - }, - "region": { - "startLine": 19, - "startColumn": 9 - } - } - } - ], - "baselineState": "new", - "properties": { - "ResultMatching": {} - } - }, - { - "ruleId": "ADO2012", - "ruleIndex": 3, + "ruleId": "ADO1017", + "ruleIndex": 2, "level": "error", "message": { "id": "Error_MissingLocationsArray", @@ -1299,7 +1094,7 @@ }, { "ruleId": "GH1015", - "ruleIndex": 4, + "ruleIndex": 3, "level": "error", "message": { "id": "Error_MissingPartialFingerprints", @@ -1328,7 +1123,7 @@ }, { "ruleId": "GH1015", - "ruleIndex": 4, + "ruleIndex": 3, "level": "error", "message": { "id": "Error_MissingLocationsArray", @@ -1357,7 +1152,7 @@ }, { "ruleId": "GH1017", - "ruleIndex": 5, + "ruleIndex": 4, "level": "error", "message": { "id": "Error_MissingPartialFingerprints", @@ -1386,7 +1181,7 @@ }, { "ruleId": "GH1017", - "ruleIndex": 5, + "ruleIndex": 4, "level": "error", "message": { "id": "Error_MissingLocationsArray", @@ -1415,7 +1210,7 @@ }, { "ruleId": "GH2012", - "ruleIndex": 6, + "ruleIndex": 5, "level": "error", "message": { "id": "Error_MissingLocationsArray", @@ -1444,7 +1239,7 @@ }, { "ruleId": "GH2012", - "ruleIndex": 6, + "ruleIndex": 5, "level": "error", "message": { "id": "Error_MissingPartialFingerprints", @@ -1473,7 +1268,7 @@ }, { "ruleId": "SARIF2002", - "ruleIndex": 7, + "ruleIndex": 6, "level": "note", "message": { "id": "Note_Default", @@ -1501,7 +1296,7 @@ }, { "ruleId": "ADO1018", - "ruleIndex": 8, + "ruleIndex": 7, "level": "error", "message": { "id": "Error_MissingDriverRules", @@ -1530,7 +1325,7 @@ }, { "ruleId": "ADO1018", - "ruleIndex": 8, + "ruleIndex": 7, "level": "error", "message": { "id": "Error_MissingDriverRules", @@ -1559,7 +1354,7 @@ }, { "ruleId": "GH1018", - "ruleIndex": 9, + "ruleIndex": 8, "level": "error", "message": { "id": "Error_MissingDriverRules", @@ -1588,7 +1383,7 @@ }, { "ruleId": "SARIF2005", - "ruleIndex": 10, + "ruleIndex": 9, "message": { "id": "Warning_ProvideToolVersion", "arguments": [ @@ -1617,7 +1412,7 @@ }, { "ruleId": "SARIF2005", - "ruleIndex": 10, + "ruleIndex": 9, "message": { "id": "Warning_ProvideToolnformationUri", "arguments": [ @@ -1645,7 +1440,7 @@ }, { "ruleId": "SARIF2012", - "ruleIndex": 11, + "ruleIndex": 10, "level": "note", "message": { "id": "Note_ProvideMetadataForAllViolatedRules", diff --git a/src/Test.FunctionalTests.Sarif/TestData/Multitool/BaselineOption/ExpectedOutputs/TEST1007.ValidateBaseline.LessResultsThanBaseline.sarif b/src/Test.FunctionalTests.Sarif/TestData/Multitool/BaselineOption/ExpectedOutputs/TEST1007.ValidateBaseline.LessResultsThanBaseline.sarif index b6096438a..d3a3221d7 100644 --- a/src/Test.FunctionalTests.Sarif/TestData/Multitool/BaselineOption/ExpectedOutputs/TEST1007.ValidateBaseline.LessResultsThanBaseline.sarif +++ b/src/Test.FunctionalTests.Sarif/TestData/Multitool/BaselineOption/ExpectedOutputs/TEST1007.ValidateBaseline.LessResultsThanBaseline.sarif @@ -58,6 +58,9 @@ "text": "The Result object represents an analysis finding and should provide details describing the nature of the problem along with its location in the scan target.\r\n\r\nProvide the 'ruleId' property, which is the unique identifier of the analysis rule that was violated. This property is required by the ADO Advanced Security service.\r\n\r\nProvide the 'message' property, which is a user-facing explanation of the result occurrence. The message's 'text' property is required by the ADO Advanced Security service.\r\n\r\nProvide the 'locations' array, which must contain at least one location object.\r\n\r\nProvide the 'partialFingerprints' dictionary. This property is required by the ADO Advanced Security service." }, "messageStrings": { + "Error_MissingRuleId": { + "text": "{0}: This 'result' object does not provide a 'ruleId' value. This property is required by the {1} service." + }, "Error_EmptyLocationsArray": { "text": "{0}: The 'locations' array on this 'result' object is empty. This property is required by the {1} service." }, @@ -72,9 +75,6 @@ }, "Error_MissingPartialFingerprints": { "text": "{0}: This 'result' object does not provide a 'partialFingerprints' dictionary. This property is required by the {1} service." - }, - "Error_MissingRuleId": { - "text": "{0}: This 'result' object does not provide a 'ruleId' value. This property is required by the {1} service." } }, "defaultConfiguration": { @@ -110,37 +110,6 @@ }, "helpUri": "http://docs.oasis-open.org/sarif/sarif/v2.1.0/sarif-v2.1.0.html" }, - { - "id": "ADO2012", - "name": "AdoProvideRequiredReportingDescriptorProperties", - "fullDescription": { - "text": "Rule metadata should provide information that makes it easy to understand and fix the problem.\r\nrule.id\r\n\r\nProvide the 'id' property whose value is a stable identifier for the rule.\r\n\r\nProvide the 'name' property, which contains a \"friendly name\" that helps users see at a glance the purpose of the rule. For uniformity of experience across all tools that produce SARIF, the friendly name should be a single Pascal-case identifier, for example, 'ProvideRuleFriendlyName'." - }, - "messageStrings": { - "Error_EmptyLocationsArray": { - "text": "{0}: The 'locations' array on this 'result' object is empty. This property is required by the {1} service." - }, - "Error_MissingLocationsArray": { - "text": "{0}: This 'result' object does not provide a 'locations' array. This property is required by the {1} service." - }, - "Error_MissingMessageText": { - "text": "{0}: The 'message' object on this 'result' object does not provide a 'text' property. This property is required by the {1} service." - }, - "Error_MissingMessage": { - "text": "{0}: This 'result' object does not provide a 'message' object. This property is required by the {1} service." - }, - "Error_MissingPartialFingerprints": { - "text": "{0}: This 'result' object does not provide a 'partialFingerprints' dictionary. This property is required by the {1} service." - }, - "Error_MissingName": { - "text": "{0}: This 'reportingDescriptor' object does not provide a 'name' value. This property is required by the {1} service." - } - }, - "defaultConfiguration": { - "level": "error" - }, - "helpUri": "http://docs.oasis-open.org/sarif/sarif/v2.1.0/sarif-v2.1.0.html" - }, { "id": "GH1015", "name": "GhasProvideRequiredResultProperties", @@ -176,6 +145,9 @@ "text": "Provide the 'region' property, along with the appropriate region properties. This property is required by the GitHub Advanced Security service.\r\n\r\nProvide the 'artifactLocation' property. This property is required by the GitHub Advanced Security service." }, "messageStrings": { + "Error_MissingArtifactLocationUri": { + "text": "{0}: The 'artifactLocation' object on this 'physicalLocation' object does not provide a 'uri' object. This property is required by the {1} service." + }, "Error_EmptyLocationsArray": { "text": "{0}: The 'locations' array on this 'result' object is empty. This property is required by the {1} service." }, @@ -190,9 +162,6 @@ }, "Error_MissingPartialFingerprints": { "text": "{0}: This 'result' object does not provide a 'partialFingerprints' dictionary. This property is required by the {1} service." - }, - "Error_MissingArtifactLocationUri": { - "text": "{0}: The 'artifactLocation' object on this 'physicalLocation' object does not provide a 'uri' object. This property is required by the {1} service." } }, "defaultConfiguration": { @@ -207,6 +176,18 @@ "text": "Rule metadata should provide information that makes it easy to understand and fix the problem.\r\n\r\nProvide the 'id' property whose value is a stable identifier for the rule.\r\n\r\nProvide the 'shortDescription' and 'fullDescription' properties.\r\n\r\nProvide the 'help' property and populate the 'text' property with information about the rule." }, "messageStrings": { + "Error_MissingFullDescription": { + "text": "{0}: This 'reportingDescriptor' object does not provide a 'fullDescription' value. This property is required by the {1} service." + }, + "Error_MissingHelpText": { + "text": "{0}: This 'help' object does not provide a 'text' value. This property is required by the {1} service." + }, + "Error_MissingHelp": { + "text": "{0}: This 'reportingDescriptor' object does not provide a 'help' object. This property is required by the {1} service." + }, + "Error_MissingShortDescription": { + "text": "{0}: This 'reportingDescriptor' object does not provide a 'shortDescription' value. This property is required by the {1} service." + }, "Error_EmptyLocationsArray": { "text": "{0}: The 'locations' array on this 'result' object is empty. This property is required by the {1} service." }, @@ -221,18 +202,6 @@ }, "Error_MissingPartialFingerprints": { "text": "{0}: This 'result' object does not provide a 'partialFingerprints' dictionary. This property is required by the {1} service." - }, - "Error_MissingFullDescription": { - "text": "{0}: This 'reportingDescriptor' object does not provide a 'fullDescription' value. This property is required by the {1} service." - }, - "Error_MissingHelpText": { - "text": "{0}: This 'help' object does not provide a 'text' value. This property is required by the {1} service." - }, - "Error_MissingHelp": { - "text": "{0}: This 'reportingDescriptor' object does not provide a 'help' object. This property is required by the {1} service." - }, - "Error_MissingShortDescription": { - "text": "{0}: This 'reportingDescriptor' object does not provide a 'shortDescription' value. This property is required by the {1} service." } }, "defaultConfiguration": { @@ -263,6 +232,9 @@ "text": "Provide information that makes it easy to identify the name and version of your tool.\r\n\r\nProvide the 'driver' property. This property is required by the ADO Advanced Security service.\r\n\r\nProvide the driver's 'name' and 'fullName' properties.\r\n\r\nProvide the driver's 'rules' array." }, "messageStrings": { + "Error_MissingDriverFullName": { + "text": "{0}: This 'driver' object does not provide a 'fullName' value. This property is required by the {1} service." + }, "Error_MissingDriverName": { "text": "{0}: The 'driver' object in this tool does not provide a 'name' value. This property is required by the {1} service." }, @@ -271,9 +243,6 @@ }, "Error_MissingDriver": { "text": "{0}: This 'tool' object does not provide a 'driver' object. This property is required by the {1} service." - }, - "Error_MissingDriverFullName": { - "text": "{0}: This 'driver' object does not provide a 'fullName' value. This property is required by the {1} service." } }, "defaultConfiguration": { @@ -522,67 +491,9 @@ "ResultMatching": {} } }, - { - "ruleId": "ADO2012", - "ruleIndex": 4, - "level": "error", - "message": { - "id": "Error_MissingPartialFingerprints", - "arguments": [ - "runs[0].results[0]", - "Azure DevOps Advanced Security" - ] - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "index": 1 - }, - "region": { - "startLine": 7, - "startColumn": 9 - } - } - } - ], - "baselineState": "new", - "properties": { - "ResultMatching": {} - } - }, - { - "ruleId": "ADO2012", - "ruleIndex": 4, - "level": "error", - "message": { - "id": "Error_MissingLocationsArray", - "arguments": [ - "runs[0].results[0]", - "Azure DevOps Advanced Security" - ] - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "index": 1 - }, - "region": { - "startLine": 7, - "startColumn": 9 - } - } - } - ], - "baselineState": "new", - "properties": { - "ResultMatching": {} - } - }, { "ruleId": "GH1015", - "ruleIndex": 5, + "ruleIndex": 4, "level": "error", "message": { "id": "Error_MissingPartialFingerprints", @@ -611,7 +522,7 @@ }, { "ruleId": "GH1015", - "ruleIndex": 5, + "ruleIndex": 4, "level": "error", "message": { "id": "Error_MissingLocationsArray", @@ -640,7 +551,7 @@ }, { "ruleId": "GH1017", - "ruleIndex": 6, + "ruleIndex": 5, "level": "error", "message": { "id": "Error_MissingPartialFingerprints", @@ -669,7 +580,7 @@ }, { "ruleId": "GH1017", - "ruleIndex": 6, + "ruleIndex": 5, "level": "error", "message": { "id": "Error_MissingLocationsArray", @@ -698,10 +609,10 @@ }, { "ruleId": "GH2012", - "ruleIndex": 7, + "ruleIndex": 6, "level": "error", "message": { - "id": "Error_MissingLocationsArray", + "id": "Error_MissingPartialFingerprints", "arguments": [ "runs[0].results[0]", "GitHub Advanced Security" @@ -727,10 +638,10 @@ }, { "ruleId": "GH2012", - "ruleIndex": 7, + "ruleIndex": 6, "level": "error", "message": { - "id": "Error_MissingPartialFingerprints", + "id": "Error_MissingLocationsArray", "arguments": [ "runs[0].results[0]", "GitHub Advanced Security" @@ -756,7 +667,7 @@ }, { "ruleId": "SARIF2002", - "ruleIndex": 8, + "ruleIndex": 7, "level": "note", "message": { "id": "Note_Default", @@ -899,69 +810,11 @@ } }, { - "ruleId": "ADO2012", + "ruleId": "GH1015", "ruleIndex": 4, "level": "error", "message": { "id": "Error_MissingLocationsArray", - "arguments": [ - "runs[0].results[1]", - "Azure DevOps Advanced Security" - ] - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "index": 1 - }, - "region": { - "startLine": 13, - "startColumn": 9 - } - } - } - ], - "baselineState": "new", - "properties": { - "ResultMatching": {} - } - }, - { - "ruleId": "ADO2012", - "ruleIndex": 4, - "level": "error", - "message": { - "id": "Error_MissingPartialFingerprints", - "arguments": [ - "runs[0].results[1]", - "Azure DevOps Advanced Security" - ] - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "index": 1 - }, - "region": { - "startLine": 13, - "startColumn": 9 - } - } - } - ], - "baselineState": "new", - "properties": { - "ResultMatching": {} - } - }, - { - "ruleId": "GH1015", - "ruleIndex": 5, - "level": "error", - "message": { - "id": "Error_MissingPartialFingerprints", "arguments": [ "runs[0].results[1]", "GitHub Advanced Security" @@ -987,10 +840,10 @@ }, { "ruleId": "GH1015", - "ruleIndex": 5, + "ruleIndex": 4, "level": "error", "message": { - "id": "Error_MissingLocationsArray", + "id": "Error_MissingPartialFingerprints", "arguments": [ "runs[0].results[1]", "GitHub Advanced Security" @@ -1016,7 +869,7 @@ }, { "ruleId": "GH1017", - "ruleIndex": 6, + "ruleIndex": 5, "level": "error", "message": { "id": "Error_MissingLocationsArray", @@ -1045,7 +898,7 @@ }, { "ruleId": "GH1017", - "ruleIndex": 6, + "ruleIndex": 5, "level": "error", "message": { "id": "Error_MissingPartialFingerprints", @@ -1074,7 +927,7 @@ }, { "ruleId": "GH2012", - "ruleIndex": 7, + "ruleIndex": 6, "level": "error", "message": { "id": "Error_MissingPartialFingerprints", @@ -1103,7 +956,7 @@ }, { "ruleId": "GH2012", - "ruleIndex": 7, + "ruleIndex": 6, "level": "error", "message": { "id": "Error_MissingLocationsArray", @@ -1132,7 +985,7 @@ }, { "ruleId": "SARIF2002", - "ruleIndex": 8, + "ruleIndex": 7, "level": "note", "message": { "id": "Note_Default", @@ -1163,7 +1016,7 @@ "ruleIndex": 2, "level": "error", "message": { - "id": "Error_MissingLocationsArray", + "id": "Error_MissingPartialFingerprints", "arguments": [ "runs[0].results[2]", "Azure DevOps Advanced Security" @@ -1191,35 +1044,6 @@ "ruleId": "ADO1015", "ruleIndex": 2, "level": "error", - "message": { - "id": "Error_MissingPartialFingerprints", - "arguments": [ - "runs[0].results[2]", - "Azure DevOps Advanced Security" - ] - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "index": 1 - }, - "region": { - "startLine": 19, - "startColumn": 9 - } - } - } - ], - "baselineState": "new", - "properties": { - "ResultMatching": {} - } - }, - { - "ruleId": "ADO1017", - "ruleIndex": 3, - "level": "error", "message": { "id": "Error_MissingLocationsArray", "arguments": [ @@ -1275,37 +1099,8 @@ } }, { - "ruleId": "ADO2012", - "ruleIndex": 4, - "level": "error", - "message": { - "id": "Error_MissingPartialFingerprints", - "arguments": [ - "runs[0].results[2]", - "Azure DevOps Advanced Security" - ] - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "index": 1 - }, - "region": { - "startLine": 19, - "startColumn": 9 - } - } - } - ], - "baselineState": "new", - "properties": { - "ResultMatching": {} - } - }, - { - "ruleId": "ADO2012", - "ruleIndex": 4, + "ruleId": "ADO1017", + "ruleIndex": 3, "level": "error", "message": { "id": "Error_MissingLocationsArray", @@ -1334,7 +1129,7 @@ }, { "ruleId": "GH1015", - "ruleIndex": 5, + "ruleIndex": 4, "level": "error", "message": { "id": "Error_MissingPartialFingerprints", @@ -1363,7 +1158,7 @@ }, { "ruleId": "GH1015", - "ruleIndex": 5, + "ruleIndex": 4, "level": "error", "message": { "id": "Error_MissingLocationsArray", @@ -1392,7 +1187,7 @@ }, { "ruleId": "GH1017", - "ruleIndex": 6, + "ruleIndex": 5, "level": "error", "message": { "id": "Error_MissingPartialFingerprints", @@ -1421,7 +1216,7 @@ }, { "ruleId": "GH1017", - "ruleIndex": 6, + "ruleIndex": 5, "level": "error", "message": { "id": "Error_MissingLocationsArray", @@ -1450,7 +1245,7 @@ }, { "ruleId": "GH2012", - "ruleIndex": 7, + "ruleIndex": 6, "level": "error", "message": { "id": "Error_MissingLocationsArray", @@ -1479,7 +1274,7 @@ }, { "ruleId": "GH2012", - "ruleIndex": 7, + "ruleIndex": 6, "level": "error", "message": { "id": "Error_MissingPartialFingerprints", @@ -1508,7 +1303,7 @@ }, { "ruleId": "SARIF2002", - "ruleIndex": 8, + "ruleIndex": 7, "level": "note", "message": { "id": "Note_Default", @@ -1536,7 +1331,7 @@ }, { "ruleId": "ADO1018", - "ruleIndex": 9, + "ruleIndex": 8, "level": "error", "message": { "id": "Error_MissingDriverRules", @@ -1565,7 +1360,7 @@ }, { "ruleId": "ADO1018", - "ruleIndex": 9, + "ruleIndex": 8, "level": "error", "message": { "id": "Error_MissingDriverRules", @@ -1594,7 +1389,7 @@ }, { "ruleId": "GH1018", - "ruleIndex": 10, + "ruleIndex": 9, "level": "error", "message": { "id": "Error_MissingDriverRules", @@ -1623,7 +1418,7 @@ }, { "ruleId": "SARIF2005", - "ruleIndex": 11, + "ruleIndex": 10, "message": { "id": "Warning_ProvideToolVersion", "arguments": [ @@ -1652,7 +1447,7 @@ }, { "ruleId": "SARIF2005", - "ruleIndex": 11, + "ruleIndex": 10, "message": { "id": "Warning_ProvideToolnformationUri", "arguments": [ diff --git a/src/Test.FunctionalTests.Sarif/TestData/Multitool/BaselineOption/ExpectedOutputs/TEST1008.ValidateBaseline.InlineUpdate.sarif b/src/Test.FunctionalTests.Sarif/TestData/Multitool/BaselineOption/ExpectedOutputs/TEST1008.ValidateBaseline.InlineUpdate.sarif index 15f9d4fce..a0c56af66 100644 --- a/src/Test.FunctionalTests.Sarif/TestData/Multitool/BaselineOption/ExpectedOutputs/TEST1008.ValidateBaseline.InlineUpdate.sarif +++ b/src/Test.FunctionalTests.Sarif/TestData/Multitool/BaselineOption/ExpectedOutputs/TEST1008.ValidateBaseline.InlineUpdate.sarif @@ -30,6 +30,9 @@ "text": "The Result object represents an analysis finding and should provide details describing the nature of the problem along with its location in the scan target.\r\n\r\nProvide the 'ruleId' property, which is the unique identifier of the analysis rule that was violated. This property is required by the ADO Advanced Security service.\r\n\r\nProvide the 'message' property, which is a user-facing explanation of the result occurrence. The message's 'text' property is required by the ADO Advanced Security service.\r\n\r\nProvide the 'locations' array, which must contain at least one location object.\r\n\r\nProvide the 'partialFingerprints' dictionary. This property is required by the ADO Advanced Security service." }, "messageStrings": { + "Error_MissingRuleId": { + "text": "{0}: This 'result' object does not provide a 'ruleId' value. This property is required by the {1} service." + }, "Error_EmptyLocationsArray": { "text": "{0}: The 'locations' array on this 'result' object is empty. This property is required by the {1} service." }, @@ -44,9 +47,6 @@ }, "Error_MissingPartialFingerprints": { "text": "{0}: This 'result' object does not provide a 'partialFingerprints' dictionary. This property is required by the {1} service." - }, - "Error_MissingRuleId": { - "text": "{0}: This 'result' object does not provide a 'ruleId' value. This property is required by the {1} service." } }, "defaultConfiguration": { @@ -82,37 +82,6 @@ }, "helpUri": "http://docs.oasis-open.org/sarif/sarif/v2.1.0/sarif-v2.1.0.html" }, - { - "id": "ADO2012", - "name": "AdoProvideRequiredReportingDescriptorProperties", - "fullDescription": { - "text": "Rule metadata should provide information that makes it easy to understand and fix the problem.\r\nrule.id\r\n\r\nProvide the 'id' property whose value is a stable identifier for the rule.\r\n\r\nProvide the 'name' property, which contains a \"friendly name\" that helps users see at a glance the purpose of the rule. For uniformity of experience across all tools that produce SARIF, the friendly name should be a single Pascal-case identifier, for example, 'ProvideRuleFriendlyName'." - }, - "messageStrings": { - "Error_EmptyLocationsArray": { - "text": "{0}: The 'locations' array on this 'result' object is empty. This property is required by the {1} service." - }, - "Error_MissingLocationsArray": { - "text": "{0}: This 'result' object does not provide a 'locations' array. This property is required by the {1} service." - }, - "Error_MissingMessageText": { - "text": "{0}: The 'message' object on this 'result' object does not provide a 'text' property. This property is required by the {1} service." - }, - "Error_MissingMessage": { - "text": "{0}: This 'result' object does not provide a 'message' object. This property is required by the {1} service." - }, - "Error_MissingPartialFingerprints": { - "text": "{0}: This 'result' object does not provide a 'partialFingerprints' dictionary. This property is required by the {1} service." - }, - "Error_MissingName": { - "text": "{0}: This 'reportingDescriptor' object does not provide a 'name' value. This property is required by the {1} service." - } - }, - "defaultConfiguration": { - "level": "error" - }, - "helpUri": "http://docs.oasis-open.org/sarif/sarif/v2.1.0/sarif-v2.1.0.html" - }, { "id": "GH1015", "name": "GhasProvideRequiredResultProperties", @@ -148,6 +117,9 @@ "text": "Provide the 'region' property, along with the appropriate region properties. This property is required by the GitHub Advanced Security service.\r\n\r\nProvide the 'artifactLocation' property. This property is required by the GitHub Advanced Security service." }, "messageStrings": { + "Error_MissingArtifactLocationUri": { + "text": "{0}: The 'artifactLocation' object on this 'physicalLocation' object does not provide a 'uri' object. This property is required by the {1} service." + }, "Error_EmptyLocationsArray": { "text": "{0}: The 'locations' array on this 'result' object is empty. This property is required by the {1} service." }, @@ -162,9 +134,6 @@ }, "Error_MissingPartialFingerprints": { "text": "{0}: This 'result' object does not provide a 'partialFingerprints' dictionary. This property is required by the {1} service." - }, - "Error_MissingArtifactLocationUri": { - "text": "{0}: The 'artifactLocation' object on this 'physicalLocation' object does not provide a 'uri' object. This property is required by the {1} service." } }, "defaultConfiguration": { @@ -179,6 +148,18 @@ "text": "Rule metadata should provide information that makes it easy to understand and fix the problem.\r\n\r\nProvide the 'id' property whose value is a stable identifier for the rule.\r\n\r\nProvide the 'shortDescription' and 'fullDescription' properties.\r\n\r\nProvide the 'help' property and populate the 'text' property with information about the rule." }, "messageStrings": { + "Error_MissingFullDescription": { + "text": "{0}: This 'reportingDescriptor' object does not provide a 'fullDescription' value. This property is required by the {1} service." + }, + "Error_MissingHelpText": { + "text": "{0}: This 'help' object does not provide a 'text' value. This property is required by the {1} service." + }, + "Error_MissingHelp": { + "text": "{0}: This 'reportingDescriptor' object does not provide a 'help' object. This property is required by the {1} service." + }, + "Error_MissingShortDescription": { + "text": "{0}: This 'reportingDescriptor' object does not provide a 'shortDescription' value. This property is required by the {1} service." + }, "Error_EmptyLocationsArray": { "text": "{0}: The 'locations' array on this 'result' object is empty. This property is required by the {1} service." }, @@ -193,18 +174,6 @@ }, "Error_MissingPartialFingerprints": { "text": "{0}: This 'result' object does not provide a 'partialFingerprints' dictionary. This property is required by the {1} service." - }, - "Error_MissingFullDescription": { - "text": "{0}: This 'reportingDescriptor' object does not provide a 'fullDescription' value. This property is required by the {1} service." - }, - "Error_MissingHelpText": { - "text": "{0}: This 'help' object does not provide a 'text' value. This property is required by the {1} service." - }, - "Error_MissingHelp": { - "text": "{0}: This 'reportingDescriptor' object does not provide a 'help' object. This property is required by the {1} service." - }, - "Error_MissingShortDescription": { - "text": "{0}: This 'reportingDescriptor' object does not provide a 'shortDescription' value. This property is required by the {1} service." } }, "defaultConfiguration": { @@ -235,6 +204,9 @@ "text": "Provide information that makes it easy to identify the name and version of your tool.\r\n\r\nProvide the 'driver' property. This property is required by the ADO Advanced Security service.\r\n\r\nProvide the driver's 'name' and 'fullName' properties.\r\n\r\nProvide the driver's 'rules' array." }, "messageStrings": { + "Error_MissingDriverFullName": { + "text": "{0}: This 'driver' object does not provide a 'fullName' value. This property is required by the {1} service." + }, "Error_MissingDriverName": { "text": "{0}: The 'driver' object in this tool does not provide a 'name' value. This property is required by the {1} service." }, @@ -243,9 +215,6 @@ }, "Error_MissingDriver": { "text": "{0}: This 'tool' object does not provide a 'driver' object. This property is required by the {1} service." - }, - "Error_MissingDriverFullName": { - "text": "{0}: This 'driver' object does not provide a 'fullName' value. This property is required by the {1} service." } }, "defaultConfiguration": { @@ -487,67 +456,9 @@ "ResultMatching": {} } }, - { - "ruleId": "ADO2012", - "ruleIndex": 3, - "level": "error", - "message": { - "id": "Error_MissingPartialFingerprints", - "arguments": [ - "runs[0].results[0]", - "Azure DevOps Advanced Security" - ] - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "index": 0 - }, - "region": { - "startLine": 7, - "startColumn": 9 - } - } - } - ], - "baselineState": "new", - "properties": { - "ResultMatching": {} - } - }, - { - "ruleId": "ADO2012", - "ruleIndex": 3, - "level": "error", - "message": { - "id": "Error_MissingLocationsArray", - "arguments": [ - "runs[0].results[0]", - "Azure DevOps Advanced Security" - ] - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "index": 0 - }, - "region": { - "startLine": 7, - "startColumn": 9 - } - } - } - ], - "baselineState": "new", - "properties": { - "ResultMatching": {} - } - }, { "ruleId": "GH1015", - "ruleIndex": 4, + "ruleIndex": 3, "level": "error", "message": { "id": "Error_MissingPartialFingerprints", @@ -576,7 +487,7 @@ }, { "ruleId": "GH1015", - "ruleIndex": 4, + "ruleIndex": 3, "level": "error", "message": { "id": "Error_MissingLocationsArray", @@ -605,7 +516,7 @@ }, { "ruleId": "GH1017", - "ruleIndex": 5, + "ruleIndex": 4, "level": "error", "message": { "id": "Error_MissingPartialFingerprints", @@ -634,7 +545,7 @@ }, { "ruleId": "GH1017", - "ruleIndex": 5, + "ruleIndex": 4, "level": "error", "message": { "id": "Error_MissingLocationsArray", @@ -663,10 +574,10 @@ }, { "ruleId": "GH2012", - "ruleIndex": 6, + "ruleIndex": 5, "level": "error", "message": { - "id": "Error_MissingLocationsArray", + "id": "Error_MissingPartialFingerprints", "arguments": [ "runs[0].results[0]", "GitHub Advanced Security" @@ -692,10 +603,10 @@ }, { "ruleId": "GH2012", - "ruleIndex": 6, + "ruleIndex": 5, "level": "error", "message": { - "id": "Error_MissingPartialFingerprints", + "id": "Error_MissingLocationsArray", "arguments": [ "runs[0].results[0]", "GitHub Advanced Security" @@ -721,7 +632,7 @@ }, { "ruleId": "SARIF2002", - "ruleIndex": 7, + "ruleIndex": 6, "level": "note", "message": { "id": "Note_Default", @@ -864,69 +775,11 @@ } }, { - "ruleId": "ADO2012", + "ruleId": "GH1015", "ruleIndex": 3, "level": "error", "message": { "id": "Error_MissingLocationsArray", - "arguments": [ - "runs[0].results[1]", - "Azure DevOps Advanced Security" - ] - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "index": 0 - }, - "region": { - "startLine": 13, - "startColumn": 9 - } - } - } - ], - "baselineState": "new", - "properties": { - "ResultMatching": {} - } - }, - { - "ruleId": "ADO2012", - "ruleIndex": 3, - "level": "error", - "message": { - "id": "Error_MissingPartialFingerprints", - "arguments": [ - "runs[0].results[1]", - "Azure DevOps Advanced Security" - ] - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "index": 0 - }, - "region": { - "startLine": 13, - "startColumn": 9 - } - } - } - ], - "baselineState": "new", - "properties": { - "ResultMatching": {} - } - }, - { - "ruleId": "GH1015", - "ruleIndex": 4, - "level": "error", - "message": { - "id": "Error_MissingPartialFingerprints", "arguments": [ "runs[0].results[1]", "GitHub Advanced Security" @@ -952,10 +805,10 @@ }, { "ruleId": "GH1015", - "ruleIndex": 4, + "ruleIndex": 3, "level": "error", "message": { - "id": "Error_MissingLocationsArray", + "id": "Error_MissingPartialFingerprints", "arguments": [ "runs[0].results[1]", "GitHub Advanced Security" @@ -981,7 +834,7 @@ }, { "ruleId": "GH1017", - "ruleIndex": 5, + "ruleIndex": 4, "level": "error", "message": { "id": "Error_MissingLocationsArray", @@ -1010,7 +863,7 @@ }, { "ruleId": "GH1017", - "ruleIndex": 5, + "ruleIndex": 4, "level": "error", "message": { "id": "Error_MissingPartialFingerprints", @@ -1039,7 +892,7 @@ }, { "ruleId": "GH2012", - "ruleIndex": 6, + "ruleIndex": 5, "level": "error", "message": { "id": "Error_MissingPartialFingerprints", @@ -1068,7 +921,7 @@ }, { "ruleId": "GH2012", - "ruleIndex": 6, + "ruleIndex": 5, "level": "error", "message": { "id": "Error_MissingLocationsArray", @@ -1097,7 +950,7 @@ }, { "ruleId": "SARIF2002", - "ruleIndex": 7, + "ruleIndex": 6, "level": "note", "message": { "id": "Note_Default", @@ -1128,7 +981,7 @@ "ruleIndex": 1, "level": "error", "message": { - "id": "Error_MissingLocationsArray", + "id": "Error_MissingPartialFingerprints", "arguments": [ "runs[0].results[2]", "Azure DevOps Advanced Security" @@ -1156,35 +1009,6 @@ "ruleId": "ADO1015", "ruleIndex": 1, "level": "error", - "message": { - "id": "Error_MissingPartialFingerprints", - "arguments": [ - "runs[0].results[2]", - "Azure DevOps Advanced Security" - ] - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "index": 0 - }, - "region": { - "startLine": 19, - "startColumn": 9 - } - } - } - ], - "baselineState": "new", - "properties": { - "ResultMatching": {} - } - }, - { - "ruleId": "ADO1017", - "ruleIndex": 2, - "level": "error", "message": { "id": "Error_MissingLocationsArray", "arguments": [ @@ -1240,37 +1064,8 @@ } }, { - "ruleId": "ADO2012", - "ruleIndex": 3, - "level": "error", - "message": { - "id": "Error_MissingPartialFingerprints", - "arguments": [ - "runs[0].results[2]", - "Azure DevOps Advanced Security" - ] - }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "index": 0 - }, - "region": { - "startLine": 19, - "startColumn": 9 - } - } - } - ], - "baselineState": "new", - "properties": { - "ResultMatching": {} - } - }, - { - "ruleId": "ADO2012", - "ruleIndex": 3, + "ruleId": "ADO1017", + "ruleIndex": 2, "level": "error", "message": { "id": "Error_MissingLocationsArray", @@ -1299,7 +1094,7 @@ }, { "ruleId": "GH1015", - "ruleIndex": 4, + "ruleIndex": 3, "level": "error", "message": { "id": "Error_MissingPartialFingerprints", @@ -1328,7 +1123,7 @@ }, { "ruleId": "GH1015", - "ruleIndex": 4, + "ruleIndex": 3, "level": "error", "message": { "id": "Error_MissingLocationsArray", @@ -1357,7 +1152,7 @@ }, { "ruleId": "GH1017", - "ruleIndex": 5, + "ruleIndex": 4, "level": "error", "message": { "id": "Error_MissingPartialFingerprints", @@ -1386,7 +1181,7 @@ }, { "ruleId": "GH1017", - "ruleIndex": 5, + "ruleIndex": 4, "level": "error", "message": { "id": "Error_MissingLocationsArray", @@ -1415,7 +1210,7 @@ }, { "ruleId": "GH2012", - "ruleIndex": 6, + "ruleIndex": 5, "level": "error", "message": { "id": "Error_MissingLocationsArray", @@ -1444,7 +1239,7 @@ }, { "ruleId": "GH2012", - "ruleIndex": 6, + "ruleIndex": 5, "level": "error", "message": { "id": "Error_MissingPartialFingerprints", @@ -1473,7 +1268,7 @@ }, { "ruleId": "SARIF2002", - "ruleIndex": 7, + "ruleIndex": 6, "level": "note", "message": { "id": "Note_Default", @@ -1501,7 +1296,7 @@ }, { "ruleId": "ADO1018", - "ruleIndex": 8, + "ruleIndex": 7, "level": "error", "message": { "id": "Error_MissingDriverRules", @@ -1530,7 +1325,7 @@ }, { "ruleId": "ADO1018", - "ruleIndex": 8, + "ruleIndex": 7, "level": "error", "message": { "id": "Error_MissingDriverRules", @@ -1559,7 +1354,7 @@ }, { "ruleId": "GH1018", - "ruleIndex": 9, + "ruleIndex": 8, "level": "error", "message": { "id": "Error_MissingDriverRules", @@ -1588,7 +1383,7 @@ }, { "ruleId": "SARIF2005", - "ruleIndex": 10, + "ruleIndex": 9, "message": { "id": "Warning_ProvideToolVersion", "arguments": [ @@ -1617,7 +1412,7 @@ }, { "ruleId": "SARIF2005", - "ruleIndex": 10, + "ruleIndex": 9, "message": { "id": "Warning_ProvideToolnformationUri", "arguments": [ @@ -1645,7 +1440,7 @@ }, { "ruleId": "SARIF2012", - "ruleIndex": 11, + "ruleIndex": 10, "level": "note", "message": { "id": "Note_ProvideMetadataForAllViolatedRules",