You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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, IEnumerable1 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)
Consider the following HDF file.
example.hdf.json.zip
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.SelectArrayIterator
2.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.
The text was updated successfully, but these errors were encountered: