Converting HDF to Sarif using sarif-multitool@4.5.4 results in System.IndexOutOfRangeException
RLI-Rdeaton opened this issue · 1 comments
Consider the following HDF file.
Performing the following command on this data:
DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=1 sarif-multitool convert -t Hdf -o openscap-report.sarif openscap-report.hdf.json
Results in the following error:
System.IndexOutOfRangeException: Index was outside the bounds of the array.
at System.String.get_Chars(Int32 index)
at Microsoft.CodeAnalysis.Sarif.Converters.HdfConverter.<>c.b__6_0(String s)
at System.Linq.Enumerable.SelectArrayIterator2.MoveNext() at System.String.Join(String separator, IEnumerable
1 values)
at Microsoft.CodeAnalysis.Sarif.Converters.HdfConverter.SarifRuleAndResultFromHdfControl(ExecJsonControl execJsonControl)
at Microsoft.CodeAnalysis.Sarif.Converters.HdfConverter.ExtractRulesAndResults(HdfFile hdfFile)
at Microsoft.CodeAnalysis.Sarif.Converters.HdfConverter.Convert(Stream input, IResultLogWriter output, OptionallyEmittedData dataToInsert)
at Microsoft.CodeAnalysis.Sarif.Converters.ToolFormatConverter.ConvertToStandardFormat(String toolFormat, Stream inputStream, IResultLogWriter outputStream, OptionallyEmittedData dataToInsert, String pluginAssemblyPath)
at Microsoft.CodeAnalysis.Sarif.Converters.ToolFormatConverter.ConvertToStandardFormat(String toolFormat, String inputFileName, String outputFileName, FilePersistenceOptions logFilePersistenceOptions, OptionallyEmittedData dataToInsert, String pluginAssemblyPath)
at Microsoft.CodeAnalysis.Sarif.Multitool.ConvertCommand.Run(ConvertOptions convertOptions, IFileSystem fileSystem)
The HDF in question was generated from a valid openscap XCCDF , using a profile available at https://github.com/chainguard-dev/stigs .
I'm pretty flummoxed as to what the issue could be, as I'm able to generate SARIF files from this otherwise.