diff --git a/src/Microsoft.ComponentDetection.Detectors/poetry/PoetryComponentDetector.cs b/src/Microsoft.ComponentDetection.Detectors/poetry/PoetryComponentDetector.cs index 779ccd778..c7842f9aa 100644 --- a/src/Microsoft.ComponentDetection.Detectors/poetry/PoetryComponentDetector.cs +++ b/src/Microsoft.ComponentDetection.Detectors/poetry/PoetryComponentDetector.cs @@ -30,7 +30,7 @@ public PoetryComponentDetector( public override IEnumerable SupportedComponentTypes => new[] { ComponentType.Pip }; - public override int Version { get; } = 2; + public override int Version { get; } = 3; public override IEnumerable Categories => new List { "Python" }; @@ -53,12 +53,12 @@ protected override async Task OnFileFoundAsync(ProcessRequest processRequest, ID if (package.Source != null && package.Source.Type == "git") { var component = new DetectedComponent(new GitComponent(new Uri(package.Source.Url), package.Source.ResolvedReference)); - singleFileComponentRecorder.RegisterUsage(component, isDevelopmentDependency: isDevelopmentDependency); + singleFileComponentRecorder.RegisterUsage(component, isExplicitReferencedDependency: true, isDevelopmentDependency: isDevelopmentDependency); } else { var component = new DetectedComponent(new PipComponent(package.Name, package.Version)); - singleFileComponentRecorder.RegisterUsage(component, isDevelopmentDependency: isDevelopmentDependency); + singleFileComponentRecorder.RegisterUsage(component, isExplicitReferencedDependency: true, isDevelopmentDependency: isDevelopmentDependency); } }); await Task.CompletedTask;