diff --git a/ReleaseHistory.md b/ReleaseHistory.md index cd28b86c4..f0e02304c 100644 --- a/ReleaseHistory.md +++ b/ReleaseHistory.md @@ -1,4 +1,8 @@ # SARIF Package Release History (SDK, Driver, Converters, and Multitool) +## **v4.3.1** UNRELEASED +* BUG: Improve `HdfConverter` ensure uri data is populated and to provide location and region data property from `SourceLocation`. [#2704](https://github.com/microsoft/sarif-sdk/pull/2704) +* BUG: Correct `run.language` regex in JSON schema. [#2708]https://github.com/microsoft/sarif-sdk/pull/2708 + ## **v4.3.0** [Sdk](https://www.nuget.org/packages/Sarif.Sdk/v4.3.0) | [Driver](https://www.nuget.org/packages/Sarif.Driver/v4.3.0) | [Converters](https://www.nuget.org/packages/Sarif.Converters/v4.3.0) | [Multitool](https://www.nuget.org/packages/Sarif.Multitool/v4.3.0) | [Multitool Library](https://www.nuget.org/packages/Sarif.Multitool.Library/v4.3.0) * BUG: Resolve `NullReferenceException` retrieving `MultithreadedZipArchiveArtifactProvider.SizeInBytes` after content have been faulted in. diff --git a/src/Sarif.Converters/HdfConverter.cs b/src/Sarif.Converters/HdfConverter.cs index daabc60df..1eb2a1b46 100644 --- a/src/Sarif.Converters/HdfConverter.cs +++ b/src/Sarif.Converters/HdfConverter.cs @@ -173,14 +173,14 @@ private static (ReportingDescriptor, IList) SarifRuleAndResultFromHdfCon { ArtifactLocation = new ArtifactLocation { - Uri = new Uri(".", UriKind.Relative), + Uri = new Uri(execJsonControl.SourceLocation.Ref ?? "file:///", UriKind.RelativeOrAbsolute), UriBaseId = "ROOTPATH", }, Region = new Region { - StartLine = 1, + StartLine = execJsonControl.SourceLocation.Line ?? 1, StartColumn = 1, - EndLine = 1, + EndLine = execJsonControl.SourceLocation.Line ?? 1, EndColumn = 1, } } diff --git a/src/Sarif.Converters/HdfModel/SourceLocation.cs b/src/Sarif.Converters/HdfModel/SourceLocation.cs index c67b95914..077dadeb5 100644 --- a/src/Sarif.Converters/HdfModel/SourceLocation.cs +++ b/src/Sarif.Converters/HdfModel/SourceLocation.cs @@ -10,13 +10,13 @@ public partial class SourceLocation /// /// The line at which this statement is located in the file /// - [JsonProperty("line", Required = Required.Default)] - public double Line { get; set; } + [JsonProperty("line", Required = Required.DisallowNull, NullValueHandling = NullValueHandling.Ignore)] + public int? Line { get; set; } /// /// Path to the file that this statement originates from /// - [JsonProperty("ref", Required = Required.Default)] + [JsonProperty("ref", Required = Required.DisallowNull, NullValueHandling = NullValueHandling.Ignore)] public string Ref { get; set; } } } diff --git a/src/Sarif.Driver/Sdk/AnalyzeOptionsBase.cs b/src/Sarif.Driver/Sdk/AnalyzeOptionsBase.cs index 2e59e8d33..496181bfd 100644 --- a/src/Sarif.Driver/Sdk/AnalyzeOptionsBase.cs +++ b/src/Sarif.Driver/Sdk/AnalyzeOptionsBase.cs @@ -36,6 +36,11 @@ public abstract class AnalyzeOptionsBase : CommonOptionsBase HelpText = "Path to policy file that will be used to configure analysis. This defaults to 'default.configuration.xml' beside the main tool; passing value of 'default' or removing that file will configure the tool to use its built-in settings.")] public string ConfigurationFilePath { get; set; } + [Option( + "output-config", + HelpText = "Path to a policy file to which all analysis settings from the current run will be saved.")] + public string OutputConfigurationFilePath { get; set; } + [Option( 'q', "quiet", diff --git a/src/Sarif.Driver/Sdk/CommonOptionsBase.cs b/src/Sarif.Driver/Sdk/CommonOptionsBase.cs index 20e90d0c1..f3c095010 100644 --- a/src/Sarif.Driver/Sdk/CommonOptionsBase.cs +++ b/src/Sarif.Driver/Sdk/CommonOptionsBase.cs @@ -110,7 +110,7 @@ internal static IEnumerable NormalizeFilePersistenceOpti [Option( "automation-guid", HelpText = "A guid that will be persisted to the 'Run.AutomationDetails.Guid' property. See section '3.17.4' of the SARIF specification for more information.")] - public Guid? AutomationGuid { get; set; } + public Guid AutomationGuid { get; set; } public Formatting Formatting => this.PrettyPrint || (!this.PrettyPrint && !this.Minify) ? Formatting.Indented diff --git a/src/Sarif.Driver/Sdk/MultithreadedAnalyzeCommandBase.cs b/src/Sarif.Driver/Sdk/MultithreadedAnalyzeCommandBase.cs index 220f86dc1..bce732073 100644 --- a/src/Sarif.Driver/Sdk/MultithreadedAnalyzeCommandBase.cs +++ b/src/Sarif.Driver/Sdk/MultithreadedAnalyzeCommandBase.cs @@ -11,6 +11,7 @@ using System.Linq; using System.Net; using System.Net.Http; +using System.Reflection; using System.Runtime.InteropServices; using System.Threading.Channels; using System.Threading.Tasks; @@ -293,22 +294,22 @@ public virtual TContext InitializeGlobalContextFromOptions(TOptions options, ref context.Logger ??= InitializeLogger(context); // Finally, handle the remaining options. - + context.PostUri = options.PostUri ?? context.PostUri; context.AutomationId = options.AutomationId ?? context.AutomationId; context.Threads = options.Threads > 0 ? options.Threads : context.Threads; - context.AutomationGuid = options.AutomationGuid ?? context.AutomationGuid; + context.AutomationGuid = options.AutomationGuid != default ? options.AutomationGuid : context.AutomationGuid; context.OutputFilePath = options.OutputFilePath ?? context.OutputFilePath; - context.EventsFilePath = Environment.GetEnvironmentVariable("SPMI_ETW") ?? options.EventsFilePath ?? context.EventsFilePath; - context.PostUri = options.PostUri != null ? options.PostUri : context.PostUri; + context.BaselineFilePath = options.BaselineFilePath ?? context.BaselineFilePath; context.Recurse = options.Recurse != null ? options.Recurse.Value : context.Recurse; context.Traces = options.Trace.Any() ? InitializeStringSet(options.Trace) : context.Traces; - context.BaselineFilePath = options.BaselineFilePath != null ? options.BaselineFilePath : context.BaselineFilePath; + context.GlobalFilePathDenyRegex = options.GlobalFilePathDenyRegex ?? context.GlobalFilePathDenyRegex; + context.OutputConfigurationFilePath = options.OutputConfigurationFilePath ?? context.OutputConfigurationFilePath; context.DataToInsert = options.DataToInsert?.Any() == true ? options.DataToInsert.ToFlags() : context.DataToInsert; context.DataToRemove = options.DataToRemove?.Any() == true ? options.DataToRemove.ToFlags() : context.DataToRemove; + context.EventsFilePath = Environment.GetEnvironmentVariable("SPMI_ETW") ?? options.EventsFilePath ?? context.EventsFilePath; context.OutputFileOptions = options.OutputFileOptions?.Any() == true ? options.OutputFileOptions.ToFlags() : context.OutputFileOptions; context.PluginFilePaths = options.PluginFilePaths?.Any() == true ? options.PluginFilePaths?.ToImmutableHashSet() : context.PluginFilePaths; context.InsertProperties = options.InsertProperties?.Any() == true ? InitializeStringSet(options.InsertProperties) : context.InsertProperties; - context.GlobalFilePathDenyRegex = options.GlobalFilePathDenyRegex != null ? options.GlobalFilePathDenyRegex : context.GlobalFilePathDenyRegex; context.MaxFileSizeInKilobytes = options.MaxFileSizeInKilobytes != null ? options.MaxFileSizeInKilobytes.Value : context.MaxFileSizeInKilobytes; context.TargetFileSpecifiers = options.TargetFileSpecifiers?.Any() == true ? InitializeStringSet(options.TargetFileSpecifiers) : context.TargetFileSpecifiers; context.InvocationPropertiesToLog = options.InvocationPropertiesToLog?.Any() == true ? InitializeStringSet(options.InvocationPropertiesToLog) : context.InvocationPropertiesToLog; @@ -824,12 +825,25 @@ internal string GetConfigurationFileName(string configurationFilePath, IFileSyst : null; } + if (!File.Exists(configurationFilePath)) + { + string fileName = Path.GetFileNameWithoutExtension(configurationFilePath); + string spamDirectory = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location); + fileName = Path.Combine(spamDirectory, $"{fileName}.xml"); + + if (fileSystem.FileExists(fileName)) + { + return fileName; + } + } + return configurationFilePath; } protected virtual TContext InitializeConfiguration(string configurationFileName, TContext context) { context.Policy ??= new PropertiesDictionary(); + configurationFileName = GetConfigurationFileName(configurationFileName, context.FileSystem); context.ConfigurationFilePath = configurationFileName; diff --git a/src/Sarif.Multitool.Library/ValidateCommand.cs b/src/Sarif.Multitool.Library/ValidateCommand.cs index 1bede8e0d..4ecd0c1d2 100644 --- a/src/Sarif.Multitool.Library/ValidateCommand.cs +++ b/src/Sarif.Multitool.Library/ValidateCommand.cs @@ -1,7 +1,6 @@ // Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. -using System; using System.Collections.Generic; using System.IO; using System.Reflection; diff --git a/src/Sarif/AnalyzeContextBase.cs b/src/Sarif/AnalyzeContextBase.cs index a2dc87463..fa6cdc8ce 100644 --- a/src/Sarif/AnalyzeContextBase.cs +++ b/src/Sarif/AnalyzeContextBase.cs @@ -29,6 +29,7 @@ public virtual IEnumerable GetOptions() AutomationIdProperty, BaselineFilePathProperty, ChannelSizeProperty, + OutputConfigurationFilePathProperty, DataToInsertProperty, DataToRemoveProperty, EventsFilePathProperty, @@ -112,7 +113,7 @@ public virtual int ChannelSize set => this.Policy.SetProperty(ChannelSizeProperty, value); } - public virtual Guid? AutomationGuid + public virtual Guid AutomationGuid { get => this.Policy.GetProperty(AutomationGuidProperty); set => this.Policy.SetProperty(AutomationGuidProperty, value); @@ -142,10 +143,12 @@ public string OutputFilePath set => this.Policy.SetProperty(OutputFilePathProperty, value); } - public string ConfigurationFilePath + public string ConfigurationFilePath { get; set; } + + public string OutputConfigurationFilePath { - get => this.Policy.GetProperty(ConfigurationFilePathProperty); - set => this.Policy.SetProperty(ConfigurationFilePathProperty, value); + get => this.Policy.GetProperty(OutputConfigurationFilePathProperty); + set => this.Policy.SetProperty(OutputConfigurationFilePathProperty, value); } public string EventsFilePath @@ -272,9 +275,9 @@ public virtual void Dispose() "CoreSettings", nameof(ChannelSize), defaultValue: () => 50000, "The capacity of the channels for analyzing scan targets and logging results."); - public static PerLanguageOption AutomationGuidProperty { get; } = - new PerLanguageOption( - "CoreSettings", nameof(AutomationGuid), defaultValue: () => null, + public static PerLanguageOption AutomationGuidProperty { get; } = + new PerLanguageOption( + "CoreSettings", nameof(AutomationGuid), defaultValue: () => default, "A guid that will be persisted to the 'Run.AutomationDetails.Guid' property. " + "See section '3.17.4' of the SARIF specification for more information."); @@ -304,10 +307,10 @@ public virtual void Dispose() "CoreSettings", nameof(PostUri), defaultValue: () => string.Empty, "A SARIF-accepting endpoint to publish the output log to."); - public static PerLanguageOption ConfigurationFilePathProperty { get; } = + public static PerLanguageOption OutputConfigurationFilePathProperty { get; } = new PerLanguageOption( - "CoreSettings", nameof(ConfigurationFilePath), defaultValue: () => string.Empty, - "The path to write all SARIF log file results to."); + "CoreSettings", nameof(OutputConfigurationFilePath), defaultValue: () => string.Empty, + "The path to write all resolved configuration (by current command-line) to."); public static PerLanguageOption DataToInsertProperty { get; } = new PerLanguageOption( diff --git a/src/Sarif/Core/Run.cs b/src/Sarif/Core/Run.cs index 443291a56..03706e907 100644 --- a/src/Sarif/Core/Run.cs +++ b/src/Sarif/Core/Run.cs @@ -224,8 +224,8 @@ public bool ShouldSerializeAutomationDetails() { return this.AutomationDetails?.Description != null || !string.IsNullOrWhiteSpace(this.AutomationDetails?.Id) || - this.AutomationDetails?.Guid != null || - this.AutomationDetails?.CorrelationGuid != null; + (this.AutomationDetails?.Guid != null && this.AutomationDetails.Guid.Value != Guid.Empty) || + (this.AutomationDetails?.CorrelationGuid != null && this.AutomationDetails.CorrelationGuid != Guid.Empty); } public bool ShouldSerializeInvocations() diff --git a/src/Sarif/IAnalysisContext.cs b/src/Sarif/IAnalysisContext.cs index f569a1ee8..7bbc318b4 100644 --- a/src/Sarif/IAnalysisContext.cs +++ b/src/Sarif/IAnalysisContext.cs @@ -27,7 +27,7 @@ public interface IAnalysisContext : IDisposable public string AutomationId { get; set; } - public Guid? AutomationGuid { get; set; } + public Guid AutomationGuid { get; set; } FilePersistenceOptions OutputFileOptions { get; set; } diff --git a/src/Sarif/PropertiesDictionary.cs b/src/Sarif/PropertiesDictionary.cs index 62623402d..09314b9da 100644 --- a/src/Sarif/PropertiesDictionary.cs +++ b/src/Sarif/PropertiesDictionary.cs @@ -201,6 +201,11 @@ public void LoadFromXml(Stream stream) { this.Clear(); + if (stream.CanSeek) + { + stream.Seek(0, SeekOrigin.Begin); + } + var settings = new XmlReaderSettings { DtdProcessing = DtdProcessing.Ignore, diff --git a/src/Sarif/PropertiesDictionaryExtensionMethods.cs b/src/Sarif/PropertiesDictionaryExtensionMethods.cs index 9c560d0e2..123ea19d3 100644 --- a/src/Sarif/PropertiesDictionaryExtensionMethods.cs +++ b/src/Sarif/PropertiesDictionaryExtensionMethods.cs @@ -45,7 +45,7 @@ public static void SavePropertiesToXmlStream( propertyBagType = propertyBag.GetType(); propertyBagTypeName = propertyBagType.Name; - if (propertyBagTypeName != "PropertyBag") + if (propertyBagTypeName != "PropertiesDictionary") { propertyBagTypeName = NormalizeTypeName(propertyBag.GetType().FullName); } @@ -56,7 +56,7 @@ public static void SavePropertiesToXmlStream( writer.WriteAttributeString(KEY_ID, name); } - if (propertyBagTypeName != "PropertyBag") + if (propertyBagTypeName != "PropertiesDictionary") { writer.WriteAttributeString(TYPE_ID, propertyBagTypeName); } diff --git a/src/Sarif/Schemata/sarif-2.1.0-rtm.6.json b/src/Sarif/Schemata/sarif-2.1.0-rtm.6.json index 0c2c62ed2..fdc969263 100644 --- a/src/Sarif/Schemata/sarif-2.1.0-rtm.6.json +++ b/src/Sarif/Schemata/sarif-2.1.0-rtm.6.json @@ -2354,7 +2354,7 @@ "description": "The language of the messages emitted into the log file during this run (expressed as an ISO 639-1 two-letter lowercase culture code) and an optional region (expressed as an ISO 3166-1 two-letter uppercase subculture code associated with a country or region). The casing is recommended but not required (in order for this data to conform to RFC5646).", "type": "string", "default": "en-US", - "pattern": "^[a-zA-Z]{2}|^[a-zA-Z]{2}-[a-zA-Z]{2}]?$" + "pattern": "^[a-zA-Z]{2}(-[a-zA-Z]{2})?$" }, "versionControlProvenance": { diff --git a/src/Test.UnitTests.Sarif.Converters/TestData/HdfConverter/ExpectedOutputs/ValidResults.sarif b/src/Test.UnitTests.Sarif.Converters/TestData/HdfConverter/ExpectedOutputs/ValidResults.sarif index cc5d0ff2d..68331f901 100644 --- a/src/Test.UnitTests.Sarif.Converters/TestData/HdfConverter/ExpectedOutputs/ValidResults.sarif +++ b/src/Test.UnitTests.Sarif.Converters/TestData/HdfConverter/ExpectedOutputs/ValidResults.sarif @@ -13,7 +13,7 @@ { "physicalLocation": { "artifactLocation": { - "uri": "", + "uri": "file:///", "uriBaseId": "ROOTPATH", "index": 0 }, @@ -40,7 +40,7 @@ { "physicalLocation": { "artifactLocation": { - "uri": "", + "uri": "file:///", "uriBaseId": "ROOTPATH", "index": 0 }, @@ -67,7 +67,7 @@ { "physicalLocation": { "artifactLocation": { - "uri": "", + "uri": "file:///", "uriBaseId": "ROOTPATH", "index": 0 }, @@ -94,7 +94,7 @@ { "physicalLocation": { "artifactLocation": { - "uri": "", + "uri": "file:///", "uriBaseId": "ROOTPATH", "index": 0 }, @@ -121,7 +121,7 @@ { "physicalLocation": { "artifactLocation": { - "uri": "", + "uri": "file:///", "uriBaseId": "ROOTPATH", "index": 0 }, @@ -148,7 +148,7 @@ { "physicalLocation": { "artifactLocation": { - "uri": "", + "uri": "file:///", "uriBaseId": "ROOTPATH", "index": 0 }, @@ -175,7 +175,7 @@ { "physicalLocation": { "artifactLocation": { - "uri": "", + "uri": "file:///", "uriBaseId": "ROOTPATH", "index": 0 }, @@ -202,7 +202,7 @@ { "physicalLocation": { "artifactLocation": { - "uri": "", + "uri": "file:///", "uriBaseId": "ROOTPATH", "index": 0 }, @@ -229,7 +229,7 @@ { "physicalLocation": { "artifactLocation": { - "uri": "", + "uri": "file:///", "uriBaseId": "ROOTPATH", "index": 0 }, @@ -256,7 +256,7 @@ { "physicalLocation": { "artifactLocation": { - "uri": "", + "uri": "file:///", "uriBaseId": "ROOTPATH", "index": 0 }, @@ -283,7 +283,7 @@ { "physicalLocation": { "artifactLocation": { - "uri": "", + "uri": "file:///", "uriBaseId": "ROOTPATH", "index": 0 }, @@ -310,7 +310,7 @@ { "physicalLocation": { "artifactLocation": { - "uri": "", + "uri": "file:///", "uriBaseId": "ROOTPATH", "index": 0 }, @@ -337,7 +337,7 @@ { "physicalLocation": { "artifactLocation": { - "uri": "", + "uri": "file:///", "uriBaseId": "ROOTPATH", "index": 0 }, @@ -364,7 +364,7 @@ { "physicalLocation": { "artifactLocation": { - "uri": "", + "uri": "file:///", "uriBaseId": "ROOTPATH", "index": 0 }, @@ -391,7 +391,7 @@ { "physicalLocation": { "artifactLocation": { - "uri": "", + "uri": "file:///", "uriBaseId": "ROOTPATH", "index": 0 }, @@ -418,7 +418,7 @@ { "physicalLocation": { "artifactLocation": { - "uri": "", + "uri": "file:///", "uriBaseId": "ROOTPATH", "index": 0 }, @@ -445,7 +445,7 @@ { "physicalLocation": { "artifactLocation": { - "uri": "", + "uri": "file:///", "uriBaseId": "ROOTPATH", "index": 0 }, @@ -472,7 +472,7 @@ { "physicalLocation": { "artifactLocation": { - "uri": "", + "uri": "file:///", "uriBaseId": "ROOTPATH", "index": 0 }, @@ -499,7 +499,7 @@ { "physicalLocation": { "artifactLocation": { - "uri": "", + "uri": "file:///", "uriBaseId": "ROOTPATH", "index": 0 }, @@ -526,7 +526,7 @@ { "physicalLocation": { "artifactLocation": { - "uri": "", + "uri": "file:///", "uriBaseId": "ROOTPATH", "index": 0 }, @@ -553,7 +553,7 @@ { "physicalLocation": { "artifactLocation": { - "uri": "", + "uri": "file:///", "uriBaseId": "ROOTPATH", "index": 0 }, @@ -580,7 +580,7 @@ { "physicalLocation": { "artifactLocation": { - "uri": "", + "uri": "file:///", "uriBaseId": "ROOTPATH", "index": 0 }, @@ -607,7 +607,7 @@ { "physicalLocation": { "artifactLocation": { - "uri": "", + "uri": "file:///", "uriBaseId": "ROOTPATH", "index": 0 }, @@ -634,7 +634,7 @@ { "physicalLocation": { "artifactLocation": { - "uri": "", + "uri": "file:///", "uriBaseId": "ROOTPATH", "index": 0 }, @@ -661,7 +661,7 @@ { "physicalLocation": { "artifactLocation": { - "uri": "", + "uri": "file:///", "uriBaseId": "ROOTPATH", "index": 0 }, @@ -688,7 +688,7 @@ { "physicalLocation": { "artifactLocation": { - "uri": "", + "uri": "file:///", "uriBaseId": "ROOTPATH", "index": 0 }, @@ -715,7 +715,7 @@ { "physicalLocation": { "artifactLocation": { - "uri": "", + "uri": "file:///", "uriBaseId": "ROOTPATH", "index": 0 }, @@ -742,7 +742,7 @@ { "physicalLocation": { "artifactLocation": { - "uri": "", + "uri": "file:///", "uriBaseId": "ROOTPATH", "index": 0 }, @@ -769,7 +769,7 @@ { "physicalLocation": { "artifactLocation": { - "uri": "", + "uri": "file:///", "uriBaseId": "ROOTPATH", "index": 0 }, @@ -796,7 +796,7 @@ { "physicalLocation": { "artifactLocation": { - "uri": "", + "uri": "file:///", "uriBaseId": "ROOTPATH", "index": 0 }, @@ -823,7 +823,7 @@ { "physicalLocation": { "artifactLocation": { - "uri": "", + "uri": "file:///", "uriBaseId": "ROOTPATH", "index": 0 }, @@ -850,7 +850,7 @@ { "physicalLocation": { "artifactLocation": { - "uri": "", + "uri": "file:///", "uriBaseId": "ROOTPATH", "index": 0 }, @@ -877,7 +877,7 @@ { "physicalLocation": { "artifactLocation": { - "uri": "", + "uri": "file:///", "uriBaseId": "ROOTPATH", "index": 0 }, @@ -904,7 +904,7 @@ { "physicalLocation": { "artifactLocation": { - "uri": "", + "uri": "file:///", "uriBaseId": "ROOTPATH", "index": 0 }, @@ -931,7 +931,7 @@ { "physicalLocation": { "artifactLocation": { - "uri": "", + "uri": "file:///", "uriBaseId": "ROOTPATH", "index": 0 }, @@ -958,7 +958,7 @@ { "physicalLocation": { "artifactLocation": { - "uri": "", + "uri": "file:///", "uriBaseId": "ROOTPATH", "index": 0 }, @@ -985,7 +985,7 @@ { "physicalLocation": { "artifactLocation": { - "uri": "", + "uri": "file:///", "uriBaseId": "ROOTPATH", "index": 0 }, @@ -1012,7 +1012,7 @@ { "physicalLocation": { "artifactLocation": { - "uri": "", + "uri": "file:///", "uriBaseId": "ROOTPATH", "index": 0 }, @@ -1039,7 +1039,7 @@ { "physicalLocation": { "artifactLocation": { - "uri": "", + "uri": "file:///", "uriBaseId": "ROOTPATH", "index": 0 }, @@ -1066,7 +1066,7 @@ { "physicalLocation": { "artifactLocation": { - "uri": "", + "uri": "file:///", "uriBaseId": "ROOTPATH", "index": 0 }, @@ -1093,7 +1093,7 @@ { "physicalLocation": { "artifactLocation": { - "uri": "", + "uri": "file:///", "uriBaseId": "ROOTPATH", "index": 0 }, @@ -1120,7 +1120,7 @@ { "physicalLocation": { "artifactLocation": { - "uri": "", + "uri": "file:///", "uriBaseId": "ROOTPATH", "index": 0 }, @@ -1147,7 +1147,7 @@ { "physicalLocation": { "artifactLocation": { - "uri": "", + "uri": "file:///", "uriBaseId": "ROOTPATH", "index": 0 }, @@ -1174,7 +1174,7 @@ { "physicalLocation": { "artifactLocation": { - "uri": "", + "uri": "file:///", "uriBaseId": "ROOTPATH", "index": 0 }, @@ -1201,7 +1201,7 @@ { "physicalLocation": { "artifactLocation": { - "uri": "", + "uri": "file:///", "uriBaseId": "ROOTPATH", "index": 0 }, @@ -1228,7 +1228,7 @@ { "physicalLocation": { "artifactLocation": { - "uri": "", + "uri": "file:///", "uriBaseId": "ROOTPATH", "index": 0 }, @@ -1255,7 +1255,7 @@ { "physicalLocation": { "artifactLocation": { - "uri": "", + "uri": "file:///", "uriBaseId": "ROOTPATH", "index": 0 }, @@ -1282,7 +1282,7 @@ { "physicalLocation": { "artifactLocation": { - "uri": "", + "uri": "file:///", "uriBaseId": "ROOTPATH", "index": 0 }, @@ -1309,7 +1309,7 @@ { "physicalLocation": { "artifactLocation": { - "uri": "", + "uri": "file:///", "uriBaseId": "ROOTPATH", "index": 0 }, @@ -1336,7 +1336,7 @@ { "physicalLocation": { "artifactLocation": { - "uri": "", + "uri": "file:///", "uriBaseId": "ROOTPATH", "index": 0 }, @@ -1363,7 +1363,7 @@ { "physicalLocation": { "artifactLocation": { - "uri": "", + "uri": "file:///", "uriBaseId": "ROOTPATH", "index": 0 }, @@ -1390,7 +1390,7 @@ { "physicalLocation": { "artifactLocation": { - "uri": "", + "uri": "file:///", "uriBaseId": "ROOTPATH", "index": 0 }, @@ -1417,7 +1417,7 @@ { "physicalLocation": { "artifactLocation": { - "uri": "", + "uri": "file:///", "uriBaseId": "ROOTPATH", "index": 0 }, @@ -1444,7 +1444,7 @@ { "physicalLocation": { "artifactLocation": { - "uri": "", + "uri": "file:///", "uriBaseId": "ROOTPATH", "index": 0 }, @@ -1471,7 +1471,7 @@ { "physicalLocation": { "artifactLocation": { - "uri": "", + "uri": "file:///", "uriBaseId": "ROOTPATH", "index": 0 }, @@ -1498,7 +1498,7 @@ { "physicalLocation": { "artifactLocation": { - "uri": "", + "uri": "file:///", "uriBaseId": "ROOTPATH", "index": 0 }, @@ -1525,7 +1525,7 @@ { "physicalLocation": { "artifactLocation": { - "uri": "", + "uri": "file:///", "uriBaseId": "ROOTPATH", "index": 0 }, @@ -1552,7 +1552,7 @@ { "physicalLocation": { "artifactLocation": { - "uri": "", + "uri": "file:///", "uriBaseId": "ROOTPATH", "index": 0 }, @@ -1579,7 +1579,7 @@ { "physicalLocation": { "artifactLocation": { - "uri": "", + "uri": "file:///", "uriBaseId": "ROOTPATH", "index": 0 }, @@ -1606,7 +1606,7 @@ { "physicalLocation": { "artifactLocation": { - "uri": "", + "uri": "file:///", "uriBaseId": "ROOTPATH", "index": 0 }, @@ -1633,7 +1633,7 @@ { "physicalLocation": { "artifactLocation": { - "uri": "", + "uri": "file:///", "uriBaseId": "ROOTPATH", "index": 0 }, @@ -1660,7 +1660,7 @@ { "physicalLocation": { "artifactLocation": { - "uri": "", + "uri": "file:///", "uriBaseId": "ROOTPATH", "index": 0 }, @@ -1687,7 +1687,7 @@ { "physicalLocation": { "artifactLocation": { - "uri": "", + "uri": "file:///", "uriBaseId": "ROOTPATH", "index": 0 }, @@ -1714,7 +1714,7 @@ { "physicalLocation": { "artifactLocation": { - "uri": "", + "uri": "file:///", "uriBaseId": "ROOTPATH", "index": 0 }, @@ -1741,7 +1741,7 @@ { "physicalLocation": { "artifactLocation": { - "uri": "", + "uri": "file:///", "uriBaseId": "ROOTPATH", "index": 0 }, @@ -1768,7 +1768,7 @@ { "physicalLocation": { "artifactLocation": { - "uri": "", + "uri": "file:///", "uriBaseId": "ROOTPATH", "index": 0 }, @@ -1795,7 +1795,7 @@ { "physicalLocation": { "artifactLocation": { - "uri": "", + "uri": "file:///", "uriBaseId": "ROOTPATH", "index": 0 }, @@ -1822,7 +1822,7 @@ { "physicalLocation": { "artifactLocation": { - "uri": "", + "uri": "file:///", "uriBaseId": "ROOTPATH", "index": 0 }, @@ -1849,7 +1849,7 @@ { "physicalLocation": { "artifactLocation": { - "uri": "", + "uri": "file:///", "uriBaseId": "ROOTPATH", "index": 0 }, @@ -1876,7 +1876,7 @@ { "physicalLocation": { "artifactLocation": { - "uri": "", + "uri": "file:///", "uriBaseId": "ROOTPATH", "index": 0 }, @@ -1903,7 +1903,7 @@ { "physicalLocation": { "artifactLocation": { - "uri": "", + "uri": "file:///", "uriBaseId": "ROOTPATH", "index": 0 }, @@ -1932,7 +1932,7 @@ { "physicalLocation": { "artifactLocation": { - "uri": "", + "uri": "file:///", "uriBaseId": "ROOTPATH", "index": 0 }, @@ -1960,7 +1960,7 @@ { "physicalLocation": { "artifactLocation": { - "uri": "", + "uri": "file:///", "uriBaseId": "ROOTPATH", "index": 0 }, @@ -1988,7 +1988,7 @@ { "physicalLocation": { "artifactLocation": { - "uri": "", + "uri": "file:///", "uriBaseId": "ROOTPATH", "index": 0 }, @@ -2016,7 +2016,7 @@ { "physicalLocation": { "artifactLocation": { - "uri": "", + "uri": "file:///", "uriBaseId": "ROOTPATH", "index": 0 }, @@ -2044,7 +2044,7 @@ { "physicalLocation": { "artifactLocation": { - "uri": "", + "uri": "file:///", "uriBaseId": "ROOTPATH", "index": 0 }, @@ -2072,7 +2072,7 @@ { "physicalLocation": { "artifactLocation": { - "uri": "", + "uri": "file:///", "uriBaseId": "ROOTPATH", "index": 0 }, @@ -2100,7 +2100,7 @@ { "physicalLocation": { "artifactLocation": { - "uri": "", + "uri": "file:///", "uriBaseId": "ROOTPATH", "index": 0 }, @@ -2128,7 +2128,7 @@ { "physicalLocation": { "artifactLocation": { - "uri": "", + "uri": "file:///", "uriBaseId": "ROOTPATH", "index": 0 }, @@ -2156,7 +2156,7 @@ { "physicalLocation": { "artifactLocation": { - "uri": "", + "uri": "file:///", "uriBaseId": "ROOTPATH", "index": 0 }, @@ -2184,7 +2184,7 @@ { "physicalLocation": { "artifactLocation": { - "uri": "", + "uri": "file:///", "uriBaseId": "ROOTPATH", "index": 0 }, @@ -2212,7 +2212,7 @@ { "physicalLocation": { "artifactLocation": { - "uri": "", + "uri": "file:///", "uriBaseId": "ROOTPATH", "index": 0 }, @@ -2240,7 +2240,7 @@ { "physicalLocation": { "artifactLocation": { - "uri": "", + "uri": "file:///", "uriBaseId": "ROOTPATH", "index": 0 }, @@ -2268,7 +2268,7 @@ { "physicalLocation": { "artifactLocation": { - "uri": "", + "uri": "file:///", "uriBaseId": "ROOTPATH", "index": 0 }, @@ -2296,7 +2296,7 @@ { "physicalLocation": { "artifactLocation": { - "uri": "", + "uri": "file:///", "uriBaseId": "ROOTPATH", "index": 0 }, @@ -2324,7 +2324,7 @@ { "physicalLocation": { "artifactLocation": { - "uri": "", + "uri": "file:///", "uriBaseId": "ROOTPATH", "index": 0 }, @@ -2352,7 +2352,7 @@ { "physicalLocation": { "artifactLocation": { - "uri": "", + "uri": "file:///", "uriBaseId": "ROOTPATH", "index": 0 }, @@ -2380,7 +2380,7 @@ { "physicalLocation": { "artifactLocation": { - "uri": "", + "uri": "file:///", "uriBaseId": "ROOTPATH", "index": 0 }, @@ -2408,7 +2408,7 @@ { "physicalLocation": { "artifactLocation": { - "uri": "", + "uri": "file:///", "uriBaseId": "ROOTPATH", "index": 0 }, @@ -2436,7 +2436,7 @@ { "physicalLocation": { "artifactLocation": { - "uri": "", + "uri": "file:///", "uriBaseId": "ROOTPATH", "index": 0 }, @@ -2463,7 +2463,7 @@ { "physicalLocation": { "artifactLocation": { - "uri": "", + "uri": "file:///", "uriBaseId": "ROOTPATH", "index": 0 }, @@ -2490,7 +2490,7 @@ { "physicalLocation": { "artifactLocation": { - "uri": "", + "uri": "file:///", "uriBaseId": "ROOTPATH", "index": 0 }, @@ -2517,7 +2517,7 @@ { "physicalLocation": { "artifactLocation": { - "uri": "", + "uri": "file:///", "uriBaseId": "ROOTPATH", "index": 0 }, @@ -2544,7 +2544,7 @@ { "physicalLocation": { "artifactLocation": { - "uri": "", + "uri": "file:///", "uriBaseId": "ROOTPATH", "index": 0 }, @@ -2571,7 +2571,7 @@ { "physicalLocation": { "artifactLocation": { - "uri": "", + "uri": "file:///", "uriBaseId": "ROOTPATH", "index": 0 }, @@ -2598,7 +2598,7 @@ { "physicalLocation": { "artifactLocation": { - "uri": "", + "uri": "file:///", "uriBaseId": "ROOTPATH", "index": 0 }, @@ -2625,7 +2625,7 @@ { "physicalLocation": { "artifactLocation": { - "uri": "", + "uri": "file:///", "uriBaseId": "ROOTPATH", "index": 0 }, @@ -2652,7 +2652,7 @@ { "physicalLocation": { "artifactLocation": { - "uri": "", + "uri": "file:///", "uriBaseId": "ROOTPATH", "index": 0 }, @@ -2679,7 +2679,7 @@ { "physicalLocation": { "artifactLocation": { - "uri": "", + "uri": "file:///", "uriBaseId": "ROOTPATH", "index": 0 }, @@ -2706,7 +2706,7 @@ { "physicalLocation": { "artifactLocation": { - "uri": "", + "uri": "file:///", "uriBaseId": "ROOTPATH", "index": 0 }, @@ -2733,7 +2733,7 @@ { "physicalLocation": { "artifactLocation": { - "uri": "", + "uri": "file:///", "uriBaseId": "ROOTPATH", "index": 0 }, @@ -2760,7 +2760,7 @@ { "physicalLocation": { "artifactLocation": { - "uri": "", + "uri": "file:///", "uriBaseId": "ROOTPATH", "index": 0 }, @@ -2787,7 +2787,7 @@ { "physicalLocation": { "artifactLocation": { - "uri": "", + "uri": "file:///", "uriBaseId": "ROOTPATH", "index": 0 }, @@ -2814,7 +2814,7 @@ { "physicalLocation": { "artifactLocation": { - "uri": "", + "uri": "file:///", "uriBaseId": "ROOTPATH", "index": 0 }, @@ -2841,7 +2841,7 @@ { "physicalLocation": { "artifactLocation": { - "uri": "", + "uri": "file:///", "uriBaseId": "ROOTPATH", "index": 0 }, @@ -2868,7 +2868,7 @@ { "physicalLocation": { "artifactLocation": { - "uri": "", + "uri": "file:///", "uriBaseId": "ROOTPATH", "index": 0 }, @@ -2895,7 +2895,7 @@ { "physicalLocation": { "artifactLocation": { - "uri": "", + "uri": "file:///", "uriBaseId": "ROOTPATH", "index": 0 }, @@ -2922,7 +2922,7 @@ { "physicalLocation": { "artifactLocation": { - "uri": "", + "uri": "file:///", "uriBaseId": "ROOTPATH", "index": 0 }, @@ -2949,7 +2949,7 @@ { "physicalLocation": { "artifactLocation": { - "uri": "", + "uri": "file:///", "uriBaseId": "ROOTPATH", "index": 0 }, @@ -2976,7 +2976,7 @@ { "physicalLocation": { "artifactLocation": { - "uri": "", + "uri": "file:///", "uriBaseId": "ROOTPATH", "index": 0 }, @@ -3004,7 +3004,7 @@ { "physicalLocation": { "artifactLocation": { - "uri": "", + "uri": "file:///", "uriBaseId": "ROOTPATH", "index": 0 }, @@ -3032,7 +3032,7 @@ { "physicalLocation": { "artifactLocation": { - "uri": "", + "uri": "file:///", "uriBaseId": "ROOTPATH", "index": 0 }, @@ -3060,7 +3060,7 @@ { "physicalLocation": { "artifactLocation": { - "uri": "", + "uri": "file:///", "uriBaseId": "ROOTPATH", "index": 0 }, @@ -3088,7 +3088,7 @@ { "physicalLocation": { "artifactLocation": { - "uri": "", + "uri": "file:///", "uriBaseId": "ROOTPATH", "index": 0 }, @@ -3116,7 +3116,7 @@ { "physicalLocation": { "artifactLocation": { - "uri": "", + "uri": "file:///", "uriBaseId": "ROOTPATH", "index": 0 }, @@ -3144,7 +3144,7 @@ { "physicalLocation": { "artifactLocation": { - "uri": "", + "uri": "file:///", "uriBaseId": "ROOTPATH", "index": 0 }, @@ -3172,7 +3172,7 @@ { "physicalLocation": { "artifactLocation": { - "uri": "", + "uri": "file:///", "uriBaseId": "ROOTPATH", "index": 0 }, @@ -3200,7 +3200,7 @@ { "physicalLocation": { "artifactLocation": { - "uri": "", + "uri": "file:///", "uriBaseId": "ROOTPATH", "index": 0 }, @@ -3228,7 +3228,7 @@ { "physicalLocation": { "artifactLocation": { - "uri": "", + "uri": "file:///", "uriBaseId": "ROOTPATH", "index": 0 }, @@ -3256,7 +3256,7 @@ { "physicalLocation": { "artifactLocation": { - "uri": "", + "uri": "file:///", "uriBaseId": "ROOTPATH", "index": 0 }, @@ -3284,7 +3284,7 @@ { "physicalLocation": { "artifactLocation": { - "uri": "", + "uri": "file:///", "uriBaseId": "ROOTPATH", "index": 0 }, @@ -3312,7 +3312,7 @@ { "physicalLocation": { "artifactLocation": { - "uri": "", + "uri": "file:///", "uriBaseId": "ROOTPATH", "index": 0 }, @@ -3340,7 +3340,7 @@ { "physicalLocation": { "artifactLocation": { - "uri": "", + "uri": "file:///", "uriBaseId": "ROOTPATH", "index": 0 }, @@ -3368,7 +3368,7 @@ { "physicalLocation": { "artifactLocation": { - "uri": "", + "uri": "file:///", "uriBaseId": "ROOTPATH", "index": 0 }, @@ -3396,7 +3396,7 @@ { "physicalLocation": { "artifactLocation": { - "uri": "", + "uri": "file:///", "uriBaseId": "ROOTPATH", "index": 0 }, @@ -3424,7 +3424,7 @@ { "physicalLocation": { "artifactLocation": { - "uri": "", + "uri": "file:///", "uriBaseId": "ROOTPATH", "index": 0 }, @@ -3452,7 +3452,7 @@ { "physicalLocation": { "artifactLocation": { - "uri": "", + "uri": "file:///", "uriBaseId": "ROOTPATH", "index": 0 }, @@ -3480,7 +3480,7 @@ { "physicalLocation": { "artifactLocation": { - "uri": "", + "uri": "file:///", "uriBaseId": "ROOTPATH", "index": 0 }, @@ -3508,7 +3508,7 @@ { "physicalLocation": { "artifactLocation": { - "uri": "", + "uri": "file:///", "uriBaseId": "ROOTPATH", "index": 0 }, @@ -3536,7 +3536,7 @@ { "physicalLocation": { "artifactLocation": { - "uri": "", + "uri": "file:///", "uriBaseId": "ROOTPATH", "index": 0 }, @@ -3563,7 +3563,7 @@ { "physicalLocation": { "artifactLocation": { - "uri": "", + "uri": "file:///", "uriBaseId": "ROOTPATH", "index": 0 }, @@ -3590,7 +3590,7 @@ { "physicalLocation": { "artifactLocation": { - "uri": "", + "uri": "file:///", "uriBaseId": "ROOTPATH", "index": 0 }, @@ -3617,7 +3617,7 @@ { "physicalLocation": { "artifactLocation": { - "uri": "", + "uri": "file:///", "uriBaseId": "ROOTPATH", "index": 0 }, @@ -3644,7 +3644,7 @@ { "physicalLocation": { "artifactLocation": { - "uri": "", + "uri": "file:///", "uriBaseId": "ROOTPATH", "index": 0 }, @@ -3671,7 +3671,7 @@ { "physicalLocation": { "artifactLocation": { - "uri": "", + "uri": "file:///", "uriBaseId": "ROOTPATH", "index": 0 }, @@ -3698,7 +3698,7 @@ { "physicalLocation": { "artifactLocation": { - "uri": "", + "uri": "file:///", "uriBaseId": "ROOTPATH", "index": 0 }, @@ -3725,7 +3725,7 @@ { "physicalLocation": { "artifactLocation": { - "uri": "", + "uri": "file:///", "uriBaseId": "ROOTPATH", "index": 0 }, @@ -3752,7 +3752,7 @@ { "physicalLocation": { "artifactLocation": { - "uri": "", + "uri": "file:///", "uriBaseId": "ROOTPATH", "index": 0 }, @@ -3779,7 +3779,7 @@ { "physicalLocation": { "artifactLocation": { - "uri": "", + "uri": "file:///", "uriBaseId": "ROOTPATH", "index": 0 }, @@ -3806,7 +3806,7 @@ { "physicalLocation": { "artifactLocation": { - "uri": "", + "uri": "file:///", "uriBaseId": "ROOTPATH", "index": 0 }, @@ -3833,7 +3833,7 @@ { "physicalLocation": { "artifactLocation": { - "uri": "", + "uri": "file:///", "uriBaseId": "ROOTPATH", "index": 0 }, @@ -3860,7 +3860,7 @@ { "physicalLocation": { "artifactLocation": { - "uri": "", + "uri": "file:///", "uriBaseId": "ROOTPATH", "index": 0 }, @@ -3887,7 +3887,7 @@ { "physicalLocation": { "artifactLocation": { - "uri": "", + "uri": "file:///", "uriBaseId": "ROOTPATH", "index": 0 }, @@ -3914,7 +3914,7 @@ { "physicalLocation": { "artifactLocation": { - "uri": "", + "uri": "file:///", "uriBaseId": "ROOTPATH", "index": 0 }, @@ -3941,7 +3941,7 @@ { "physicalLocation": { "artifactLocation": { - "uri": "", + "uri": "file:///", "uriBaseId": "ROOTPATH", "index": 0 }, @@ -3968,7 +3968,7 @@ { "physicalLocation": { "artifactLocation": { - "uri": "", + "uri": "file:///", "uriBaseId": "ROOTPATH", "index": 0 }, @@ -3995,7 +3995,7 @@ { "physicalLocation": { "artifactLocation": { - "uri": "", + "uri": "file:///", "uriBaseId": "ROOTPATH", "index": 0 }, @@ -4022,7 +4022,7 @@ { "physicalLocation": { "artifactLocation": { - "uri": "", + "uri": "file:///", "uriBaseId": "ROOTPATH", "index": 0 }, @@ -4049,7 +4049,7 @@ { "physicalLocation": { "artifactLocation": { - "uri": "", + "uri": "file:///", "uriBaseId": "ROOTPATH", "index": 0 }, @@ -4076,7 +4076,7 @@ { "physicalLocation": { "artifactLocation": { - "uri": "", + "uri": "file:///", "uriBaseId": "ROOTPATH", "index": 0 }, @@ -4103,7 +4103,7 @@ { "physicalLocation": { "artifactLocation": { - "uri": "", + "uri": "file:///", "uriBaseId": "ROOTPATH", "index": 0 }, @@ -4130,7 +4130,7 @@ { "physicalLocation": { "artifactLocation": { - "uri": "", + "uri": "file:///", "uriBaseId": "ROOTPATH", "index": 0 }, @@ -4157,7 +4157,7 @@ { "physicalLocation": { "artifactLocation": { - "uri": "", + "uri": "file:///", "uriBaseId": "ROOTPATH", "index": 0 }, @@ -4184,7 +4184,7 @@ { "physicalLocation": { "artifactLocation": { - "uri": "", + "uri": "file:///", "uriBaseId": "ROOTPATH", "index": 0 }, @@ -4211,7 +4211,7 @@ { "physicalLocation": { "artifactLocation": { - "uri": "", + "uri": "file:///", "uriBaseId": "ROOTPATH", "index": 0 }, @@ -4238,7 +4238,7 @@ { "physicalLocation": { "artifactLocation": { - "uri": "", + "uri": "file:///", "uriBaseId": "ROOTPATH", "index": 0 }, @@ -4265,7 +4265,7 @@ { "physicalLocation": { "artifactLocation": { - "uri": "", + "uri": "file:///", "uriBaseId": "ROOTPATH", "index": 0 }, @@ -4292,7 +4292,7 @@ { "physicalLocation": { "artifactLocation": { - "uri": "", + "uri": "file:///", "uriBaseId": "ROOTPATH", "index": 0 }, @@ -4319,7 +4319,7 @@ { "physicalLocation": { "artifactLocation": { - "uri": "", + "uri": "file:///", "uriBaseId": "ROOTPATH", "index": 0 }, @@ -4346,7 +4346,7 @@ { "physicalLocation": { "artifactLocation": { - "uri": "", + "uri": "file:///", "uriBaseId": "ROOTPATH", "index": 0 }, @@ -4373,7 +4373,7 @@ { "physicalLocation": { "artifactLocation": { - "uri": "", + "uri": "file:///", "uriBaseId": "ROOTPATH", "index": 0 }, @@ -4401,7 +4401,7 @@ { "physicalLocation": { "artifactLocation": { - "uri": "", + "uri": "file:///", "uriBaseId": "ROOTPATH", "index": 0 }, @@ -4429,7 +4429,7 @@ { "physicalLocation": { "artifactLocation": { - "uri": "", + "uri": "file:///", "uriBaseId": "ROOTPATH", "index": 0 }, @@ -4457,7 +4457,7 @@ { "physicalLocation": { "artifactLocation": { - "uri": "", + "uri": "file:///", "uriBaseId": "ROOTPATH", "index": 0 }, @@ -4485,7 +4485,7 @@ { "physicalLocation": { "artifactLocation": { - "uri": "", + "uri": "file:///", "uriBaseId": "ROOTPATH", "index": 0 }, @@ -4512,7 +4512,7 @@ { "physicalLocation": { "artifactLocation": { - "uri": "", + "uri": "file:///", "uriBaseId": "ROOTPATH", "index": 0 }, @@ -4552,7 +4552,7 @@ "id": "RA-5", "toolComponent": { "name": "NIST", - "guid": "AAFBAB93-5201-419E-8443-D4925C542398" + "guid": "aafbab93-5201-419e-8443-d4925c542398" } }, "kinds": [ @@ -4564,7 +4564,7 @@ "id": "SA-11", "toolComponent": { "name": "NIST", - "guid": "AAFBAB93-5201-419E-8443-D4925C542398" + "guid": "aafbab93-5201-419e-8443-d4925c542398" } }, "kinds": [ @@ -4588,7 +4588,7 @@ "id": "RA-5", "toolComponent": { "name": "NIST", - "guid": "AAFBAB93-5201-419E-8443-D4925C542398" + "guid": "aafbab93-5201-419e-8443-d4925c542398" } }, "kinds": [ @@ -4600,7 +4600,7 @@ "id": "SA-11", "toolComponent": { "name": "NIST", - "guid": "AAFBAB93-5201-419E-8443-D4925C542398" + "guid": "aafbab93-5201-419e-8443-d4925c542398" } }, "kinds": [ @@ -4624,7 +4624,7 @@ "id": "Rev_4", "toolComponent": { "name": "NIST", - "guid": "AAFBAB93-5201-419E-8443-D4925C542398" + "guid": "aafbab93-5201-419e-8443-d4925c542398" } }, "kinds": [ @@ -4636,7 +4636,7 @@ "id": "SC-8", "toolComponent": { "name": "NIST", - "guid": "AAFBAB93-5201-419E-8443-D4925C542398" + "guid": "aafbab93-5201-419e-8443-d4925c542398" } }, "kinds": [ @@ -4660,7 +4660,7 @@ "id": "Rev_4", "toolComponent": { "name": "NIST", - "guid": "AAFBAB93-5201-419E-8443-D4925C542398" + "guid": "aafbab93-5201-419e-8443-d4925c542398" } }, "kinds": [ @@ -4672,7 +4672,7 @@ "id": "SC-8", "toolComponent": { "name": "NIST", - "guid": "AAFBAB93-5201-419E-8443-D4925C542398" + "guid": "aafbab93-5201-419e-8443-d4925c542398" } }, "kinds": [ @@ -4699,7 +4699,7 @@ "id": "Rev_4", "toolComponent": { "name": "NIST", - "guid": "AAFBAB93-5201-419E-8443-D4925C542398" + "guid": "aafbab93-5201-419e-8443-d4925c542398" } }, "kinds": [ @@ -4711,7 +4711,7 @@ "id": "SC-8", "toolComponent": { "name": "NIST", - "guid": "AAFBAB93-5201-419E-8443-D4925C542398" + "guid": "aafbab93-5201-419e-8443-d4925c542398" } }, "kinds": [ @@ -4735,7 +4735,7 @@ "id": "RA-5", "toolComponent": { "name": "NIST", - "guid": "AAFBAB93-5201-419E-8443-D4925C542398" + "guid": "aafbab93-5201-419e-8443-d4925c542398" } }, "kinds": [ @@ -4747,7 +4747,7 @@ "id": "SA-11", "toolComponent": { "name": "NIST", - "guid": "AAFBAB93-5201-419E-8443-D4925C542398" + "guid": "aafbab93-5201-419e-8443-d4925c542398" } }, "kinds": [ @@ -4774,7 +4774,7 @@ "id": "Rev_4", "toolComponent": { "name": "NIST", - "guid": "AAFBAB93-5201-419E-8443-D4925C542398" + "guid": "aafbab93-5201-419e-8443-d4925c542398" } }, "kinds": [ @@ -4786,7 +4786,7 @@ "id": "SI-10", "toolComponent": { "name": "NIST", - "guid": "AAFBAB93-5201-419E-8443-D4925C542398" + "guid": "aafbab93-5201-419e-8443-d4925c542398" } }, "kinds": [ @@ -4810,7 +4810,7 @@ "id": "RA-5", "toolComponent": { "name": "NIST", - "guid": "AAFBAB93-5201-419E-8443-D4925C542398" + "guid": "aafbab93-5201-419e-8443-d4925c542398" } }, "kinds": [ @@ -4822,7 +4822,7 @@ "id": "SA-11", "toolComponent": { "name": "NIST", - "guid": "AAFBAB93-5201-419E-8443-D4925C542398" + "guid": "aafbab93-5201-419e-8443-d4925c542398" } }, "kinds": [ @@ -4846,7 +4846,7 @@ "id": "Rev_4", "toolComponent": { "name": "NIST", - "guid": "AAFBAB93-5201-419E-8443-D4925C542398" + "guid": "aafbab93-5201-419e-8443-d4925c542398" } }, "kinds": [ @@ -4858,7 +4858,7 @@ "id": "SC-8", "toolComponent": { "name": "NIST", - "guid": "AAFBAB93-5201-419E-8443-D4925C542398" + "guid": "aafbab93-5201-419e-8443-d4925c542398" } }, "kinds": [ @@ -4885,7 +4885,7 @@ "id": "Rev_4", "toolComponent": { "name": "NIST", - "guid": "AAFBAB93-5201-419E-8443-D4925C542398" + "guid": "aafbab93-5201-419e-8443-d4925c542398" } }, "kinds": [ @@ -4897,7 +4897,7 @@ "id": "SI-10", "toolComponent": { "name": "NIST", - "guid": "AAFBAB93-5201-419E-8443-D4925C542398" + "guid": "aafbab93-5201-419e-8443-d4925c542398" } }, "kinds": [ @@ -4924,7 +4924,7 @@ "id": "Rev_4", "toolComponent": { "name": "NIST", - "guid": "AAFBAB93-5201-419E-8443-D4925C542398" + "guid": "aafbab93-5201-419e-8443-d4925c542398" } }, "kinds": [ @@ -4936,7 +4936,7 @@ "id": "SI-10", "toolComponent": { "name": "NIST", - "guid": "AAFBAB93-5201-419E-8443-D4925C542398" + "guid": "aafbab93-5201-419e-8443-d4925c542398" } }, "kinds": [ @@ -4963,7 +4963,7 @@ "id": "RA-5", "toolComponent": { "name": "NIST", - "guid": "AAFBAB93-5201-419E-8443-D4925C542398" + "guid": "aafbab93-5201-419e-8443-d4925c542398" } }, "kinds": [ @@ -4975,7 +4975,7 @@ "id": "SA-11", "toolComponent": { "name": "NIST", - "guid": "AAFBAB93-5201-419E-8443-D4925C542398" + "guid": "aafbab93-5201-419e-8443-d4925c542398" } }, "kinds": [ @@ -4999,7 +4999,7 @@ "id": "Rev_4", "toolComponent": { "name": "NIST", - "guid": "AAFBAB93-5201-419E-8443-D4925C542398" + "guid": "aafbab93-5201-419e-8443-d4925c542398" } }, "kinds": [ @@ -5011,7 +5011,7 @@ "id": "SI-10", "toolComponent": { "name": "NIST", - "guid": "AAFBAB93-5201-419E-8443-D4925C542398" + "guid": "aafbab93-5201-419e-8443-d4925c542398" } }, "kinds": [ @@ -5024,7 +5024,7 @@ "supportedTaxonomies": [ { "name": "NIST SP800-53 v5", - "guid": "AAFBAB93-5201-419E-8443-D4925C542398" + "guid": "aafbab93-5201-419e-8443-d4925c542398" } ] } @@ -5037,7 +5037,7 @@ "artifacts": [ { "location": { - "uri": "", + "uri": "file:///", "uriBaseId": "ROOTPATH" } }, @@ -5055,7 +5055,7 @@ "uri": "https://raw.githubusercontent.com/sarif-standard/taxonomies/main/NIST_SP800-53_v5.sarif", "index": 1 }, - "guid": "AAFBAB93-5201-419E-8443-D4925C542398" + "guid": "aafbab93-5201-419e-8443-d4925c542398" } ] } diff --git a/src/Test.UnitTests.Sarif.Driver/Sdk/AnalyzeCommandBaseTests.cs b/src/Test.UnitTests.Sarif.Driver/Sdk/AnalyzeCommandBaseTests.cs index dcf5dc5fa..4098bb476 100644 --- a/src/Test.UnitTests.Sarif.Driver/Sdk/AnalyzeCommandBaseTests.cs +++ b/src/Test.UnitTests.Sarif.Driver/Sdk/AnalyzeCommandBaseTests.cs @@ -14,6 +14,8 @@ using Microsoft.CodeAnalysis.Sarif.Converters; using Microsoft.CodeAnalysis.Sarif.Writers; +using Mono.Cecil.Cil; + using Moq; using Newtonsoft.Json; @@ -36,6 +38,60 @@ public AnalyzeCommandBaseTests(ITestOutputHelper output) Output.WriteLine($"The seed that will be used is: {TestRule.s_seed}"); } + [Fact] + public void AnalyzeCommandBase_OptionsSettingsOverrideContextSettings() + { + // For every configuration knob, we choose an explicit, + // non-default value that differs between options and configuration. + // This allows us to be sure that the explicit options setting + // is honored. + + ResultKind optionsKind = ResultKind.Review; + ResultKind contextKind = ResultKind.Open; + + FailureLevel optionsLevel = FailureLevel.Note; + FailureLevel contextLevel = FailureLevel.Error; + + var options = new TestAnalyzeOptions + { + Kind = new[] { optionsKind, ResultKind.Fail }, + Level = new[] { optionsLevel }, + }; + + var context = new TestAnalysisContext() + { + ResultKinds = new ResultKindSet(new[] { contextKind, ResultKind.Fail }), + FailureLevels = new FailureLevelSet(new[] { contextLevel }), + }; + + var multithreadedAnalyzeCommand = new TestMultithreadedAnalyzeCommand(); + multithreadedAnalyzeCommand.InitializeGlobalContextFromOptions(options, ref context); + + context.ResultKinds.Should().BeEquivalentTo(new ResultKindSet(new[] { optionsKind, ResultKind.Fail })); + context.FailureLevels.Should().BeEquivalentTo(new FailureLevelSet(new[] { optionsLevel })); + } + + [Fact] + public void AnalyzeCommandBase_EmptyOptionsSettingsDoNotOverrideContextSettings() + { + var options = new TestAnalyzeOptions + { + }; + + FailureLevel contextLevel = FailureLevel.Error; + var failureLevels = new FailureLevelSet(new[] { contextLevel }); + + var context = new TestAnalysisContext() + { + FailureLevels = failureLevels + }; + + var multithreadedAnalyzeCommand = new TestMultithreadedAnalyzeCommand(); + multithreadedAnalyzeCommand.InitializeGlobalContextFromOptions(options, ref context); + + context.FailureLevels.Should().BeEquivalentTo(failureLevels); + } + [Fact] public void AnalyzeCommandBase_PerTargetAnalyzeEventsAreReceived() { @@ -1190,12 +1246,12 @@ public void AnalyzeCommandBase_EndToEndAnalysisWithExplicitlyDisabledRules() } [Theory] - [InlineData(null, false, "")] - [InlineData("", false, "")] + [InlineData(null, false, null)] + [InlineData("", false, null)] [InlineData(null, true, "default.configuration.xml")] [InlineData("", true, "default.configuration.xml")] - [InlineData("default", false, "")] - [InlineData("default", true, "")] + [InlineData("default", false, null)] + [InlineData("default", true, null)] [InlineData("test-newconfig.xml", false, "test-newconfig.xml")] [InlineData("test-newconfig.xml", true, "test-newconfig.xml")] public void AnalyzeCommandBase_LoadConfigurationFile(string configValue, bool defaultFileExists, string expectedFileName) @@ -1220,7 +1276,7 @@ public void AnalyzeCommandBase_LoadConfigurationFile(string configValue, bool de if (string.IsNullOrEmpty(expectedFileName)) { - context.ConfigurationFilePath.Should().Be(string.Empty); + context.ConfigurationFilePath.Should().Be(null); } else { @@ -1520,7 +1576,7 @@ public void AnalyzeCommandBase_AutomationDetailsTests() new TestAnalyzeOptions { AutomationId = string.Empty, - AutomationGuid = null + AutomationGuid = default }, new TestAnalyzeOptions { @@ -1530,7 +1586,7 @@ public void AnalyzeCommandBase_AutomationDetailsTests() new TestAnalyzeOptions { AutomationId = null, - AutomationGuid = null + AutomationGuid = default }, new TestAnalyzeOptions { @@ -1540,7 +1596,7 @@ public void AnalyzeCommandBase_AutomationDetailsTests() new TestAnalyzeOptions { AutomationId = string.Empty, - AutomationGuid = null + AutomationGuid = default }, new TestAnalyzeOptions { @@ -1823,7 +1879,7 @@ private static void RunResultsCachingTestCase(ResultsCachingTestCase testCase, { runWithCaching.Artifacts.Should().NotBeEmpty(); - if (string.IsNullOrWhiteSpace(options.AutomationId) && options.AutomationGuid == null) + if (string.IsNullOrWhiteSpace(options.AutomationId) && options.AutomationGuid == default) { runWithCaching.AutomationDetails.Should().Be(null); } @@ -1833,7 +1889,7 @@ private static void RunResultsCachingTestCase(ResultsCachingTestCase testCase, runWithCaching.AutomationDetails.Id.Should().Be(options.AutomationId); } - if (options.AutomationGuid != null) + if (options.AutomationGuid != default) { runWithCaching.AutomationDetails.Guid.Should().Be(options.AutomationGuid); } @@ -1852,7 +1908,7 @@ private static void RunResultsCachingTestCase(ResultsCachingTestCase testCase, private static void EnhanceOptions(TestAnalyzeOptions current, TestAnalyzeOptions enhancement) { current.AutomationId ??= enhancement?.AutomationId; - current.AutomationGuid ??= enhancement?.AutomationGuid; + current.AutomationGuid = enhancement == null ? default : enhancement.AutomationGuid; } private static IFileSystem CreateDefaultFileSystemForResultsCaching(IList files, bool generateSameInput = false) diff --git a/src/Test.Utilities.Sarif/DirectoryHelpers.cs b/src/Test.Utilities.Sarif/DirectoryHelpers.cs index 878862f0d..771323073 100644 --- a/src/Test.Utilities.Sarif/DirectoryHelpers.cs +++ b/src/Test.Utilities.Sarif/DirectoryHelpers.cs @@ -1,7 +1,6 @@ // Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. -using System; using System.IO; using System.Reflection;