component-detection
component-detection copied to clipboard
Investigate our use of `**` with `Dotnet.Glob`
I believe we are incorrectly using the ** pattern. We rolled back in #200, but would like to upgrade still.
Sources:
- https://github.com/microsoft/component-detection/releases/tag/v1.2.1
- https://github.com/microsoft/component-detection/pull/138
- https://github.com/dazinator/DotNet.Glob/issues/65
- https://github.com/dazinator/DotNet.Glob/commit/f1ee0efcc82c375e8124f08053190509eeb3de45
The issue is here:
https://github.com/microsoft/component-detection/blob/0f3fa8a84488f6f8878532d1e5812580998a045e/src/Microsoft.ComponentDetection.Orchestrator/Services/DetectorProcessingService.cs#L188-L191
If we pass **/samples/** it throws IndexOutOfRangeException
Glob.Parse("**/samples/**").IsMatch("d:\\df\\samples") is a minimal example.
Ideally most of these issues will be resolved after the changes from #1091 are merged.