diff --git a/docs/Producing effective SARIF.md b/docs/Producing effective SARIF.md index 7cc2662df..1b2ad2668 100644 --- a/docs/Producing effective SARIF.md +++ b/docs/Producing effective SARIF.md @@ -435,10 +435,14 @@ If 'version' is used, facilitate comparison between versions by specifying a ver #### Description +URIs that refer to locations such as rule help pages and result-related work items should be reachable via a GET request. + #### Messages ##### `Default`: warning +{0}: The URI '{1}' was not reachable via a GET request. + --- ### Rule `SARIF2007.ExpressPathsRelativeToRepoRoot` diff --git a/docs/Rule factoring.xlsx b/docs/Rule factoring.xlsx index 29711c742..3befc51f0 100644 Binary files a/docs/Rule factoring.xlsx and b/docs/Rule factoring.xlsx differ diff --git a/src/Sarif.Multitool/Rules/RuleResources.Designer.cs b/src/Sarif.Multitool/Rules/RuleResources.Designer.cs index 9021ec315..12662fae3 100644 --- a/src/Sarif.Multitool/Rules/RuleResources.Designer.cs +++ b/src/Sarif.Multitool/Rules/RuleResources.Designer.cs @@ -512,7 +512,7 @@ internal static string SARIF2005_ProvideToolProperties_Warning_UseNumericToolVer } /// - /// Looks up a localized string similar to Placeholder_SARIF2006_UrisShouldBeReachable_FullDescription_Text. + /// Looks up a localized string similar to URIs that refer to locations such as rule help pages and result-related work items should be reachable via an HTTP GET request.. /// internal static string SARIF2006_UrisShouldBeReachable_FullDescription_Text { get { @@ -521,7 +521,7 @@ internal static string SARIF2006_UrisShouldBeReachable_FullDescription_Text { } /// - /// Looks up a localized string similar to {0}: Placeholder {1}. + /// Looks up a localized string similar to {0}: The URI '{1}' was not reachable via an HTTP GET request.. /// internal static string SARIF2006_UrisShouldBeReachable_Warning_Default_Text { get { diff --git a/src/Sarif.Multitool/Rules/RuleResources.resx b/src/Sarif.Multitool/Rules/RuleResources.resx index c364484ad..99289af5b 100644 --- a/src/Sarif.Multitool/Rules/RuleResources.resx +++ b/src/Sarif.Multitool/Rules/RuleResources.resx @@ -293,10 +293,10 @@ Similarly, most 'result' objects contain at least one 'artifactLocation' object. {0}: The 'rules' array contains no information beyond the ids of the rules. Removing this array might reduce the log file size without losing information. In some scenarios (for example, when assessing compliance with policy), the 'rules' array might be used to record the full set of rules that were evaluated. In such a scenario, the 'rules' array should be retained even if it contains only id information. - Placeholder_SARIF2006_UrisShouldBeReachable_FullDescription_Text + URIs that refer to locations such as rule help pages and result-related work items should be reachable via an HTTP GET request. - {0}: Placeholder {1} + {0}: The URI '{1}' was not reachable via an HTTP GET request. Placeholder_SARIF2007_ExpressPathsRelativeToRepoRoot_FullDescription_Text diff --git a/src/Sarif.Multitool/Rules/SARIF2006.UrisShouldBeReachable.cs b/src/Sarif.Multitool/Rules/SARIF2006.UrisShouldBeReachable.cs index ecc5f5197..a3d11f445 100644 --- a/src/Sarif.Multitool/Rules/SARIF2006.UrisShouldBeReachable.cs +++ b/src/Sarif.Multitool/Rules/SARIF2006.UrisShouldBeReachable.cs @@ -18,7 +18,8 @@ public class UrisShouldBeReachable : SarifValidationSkimmerBase public override string Id => RuleId.UrisShouldBeReachable; /// - /// Placeholder + /// URIs that refer to locations such as rule help pages and result-related work items + /// should be reachable via an HTTP GET request. /// public override MultiformatMessageString FullDescription => new MultiformatMessageString { Text = RuleResources.SARIF2006_UrisShouldBeReachable_FullDescription_Text }; @@ -85,10 +86,10 @@ private void AnalyzeUri(string uriString, string pointer) Uri uri = new Uri(uriString, UriKind.Absolute); if (!IsUriReachable(uri.AbsoluteUri)) { - // {0}: Placeholder '{1}' + // {0}: The URI '{1}' was not reachable via an HTTP GET request. LogResult( pointer, - nameof(RuleResources.SARIF1005_UriMustBeAbsolute_Error_Default_Text), + nameof(RuleResources.SARIF2006_UrisShouldBeReachable_Warning_Default_Text), uriString); } } diff --git a/src/Test.FunctionalTests.Sarif/TestData/Multitool/ValidateCommand/ExpectedOutputs/SARIF2006.UrisShouldBeReachable_Invalid.sarif b/src/Test.FunctionalTests.Sarif/TestData/Multitool/ValidateCommand/ExpectedOutputs/SARIF2006.UrisShouldBeReachable_Invalid.sarif index 0ccd1de33..81b812019 100644 --- a/src/Test.FunctionalTests.Sarif/TestData/Multitool/ValidateCommand/ExpectedOutputs/SARIF2006.UrisShouldBeReachable_Invalid.sarif +++ b/src/Test.FunctionalTests.Sarif/TestData/Multitool/ValidateCommand/ExpectedOutputs/SARIF2006.UrisShouldBeReachable_Invalid.sarif @@ -11,14 +11,14 @@ "id": "SARIF2006", "name": "UrisShouldBeReachable", "shortDescription": { - "text": "Placeholder_SARIF2006_UrisShouldBeReachable_FullDescription_Text." + "text": "URIs that refer to locations such as rule help pages and result-related work items should be reachable via an HTTP GET request." }, "fullDescription": { - "text": "Placeholder_SARIF2006_UrisShouldBeReachable_FullDescription_Text" + "text": "URIs that refer to locations such as rule help pages and result-related work items should be reachable via an HTTP GET request." }, "messageStrings": { "Warning_Default": { - "text": "{0}: Placeholder {1}" + "text": "{0}: The URI '{1}' was not reachable via an HTTP GET request." } }, "helpUri": "http://docs.oasis-open.org/sarif/sarif/v2.1.0/sarif-v2.1.0.html" @@ -62,7 +62,7 @@ "ruleId": "SARIF2006", "ruleIndex": 0, "message": { - "id": "Error_Default", + "id": "Warning_Default", "arguments": [ "runs[0].results[0].workItemUris[0]", "https://example.com/my-project/issues/42" @@ -86,7 +86,7 @@ "ruleId": "SARIF2006", "ruleIndex": 0, "message": { - "id": "Error_Default", + "id": "Warning_Default", "arguments": [ "runs[0].tool.driver.downloadUri", "http://www.example.com/tools/codescanner/download.html" @@ -110,7 +110,7 @@ "ruleId": "SARIF2006", "ruleIndex": 0, "message": { - "id": "Error_Default", + "id": "Warning_Default", "arguments": [ "runs[0].tool.driver.rules[0].helpUri", "http://www.example.com/rules/tst0001.html" @@ -134,7 +134,7 @@ "ruleId": "SARIF2006", "ruleIndex": 0, "message": { - "id": "Error_Default", + "id": "Warning_Default", "arguments": [ "runs[0].versionControlProvenance[0].repositoryUri", "https://example.com/my-project"