Skip to content

Fix DetectorCategories documentation - replace Pip with Python and add missing categories #1446

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

Copilot
Copy link
Contributor

@Copilot Copilot AI commented Jul 2, 2025

The documentation for --DetectorCategories contained incorrect possible values. Specifically, it listed Pip as a valid category, but Python ecosystem detectors actually use Python as their category.

Issue

The current documentation states:

--DetectorCategories: Npm, NuGet, Maven, RubyGems, Cargo, Pip, GoMod, CocoaPods, Linux

However, when examining the actual detector implementations:

  • PipComponentDetector uses ["Python"] as its category
  • SimplePipComponentDetector uses ["Python"] as its category
  • PipReportComponentDetector uses ["Python"] as its category
  • All other Python ecosystem detectors (Poetry, Uv, CondaLock) also use ["Python"]

This means users trying to filter Python dependencies with --DetectorCategories Pip would get no results.

Solution

Updated both documentation locations to:

  1. Replace Pip with Python in the categories list
  2. Add missing categories that are actually used by detectors but not documented
  3. Provide complete alphabetized list for better usability

Updated documentation

--DetectorCategories: Cargo, CocoaPods, Conan, Conda, DotNet, DockerReference, GoMod, Linux, Maven, Npm, NuGet, Python, RubyGems, Rust, Spdx, Swift, Vcpkg

Usage examples

# To scan only Python dependencies (now works correctly):
--DetectorCategories Python

# To scan Python and .NET dependencies:
--DetectorCategories Python,DotNet

Files changed

  • docs/detector-arguments.md - Updated help documentation
  • src/Microsoft.ComponentDetection.Orchestrator/Commands/ScanSettings.cs - Updated command-line description

Fixes #1435.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

@Copilot Copilot AI changed the title [WIP] DetectorCategories Argument Documentation Incorrect Fix DetectorCategories documentation - replace Pip with Python and add missing categories Jul 2, 2025
@Copilot Copilot AI requested a review from jcfiorenzano July 2, 2025 17:20
Copilot finished work on behalf of jcfiorenzano July 2, 2025 17:20
global.json Outdated
@@ -1,6 +1,6 @@
{
"sdk": {
"version": "8.0.411",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot revert this change

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reverted the global.json change in commit 7c8603b.

@Copilot Copilot AI requested a review from jcfiorenzano July 2, 2025 17:23
Copilot finished work on behalf of jcfiorenzano July 2, 2025 17:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

DetectorCategories Argument Documentation Incorrect
2 participants