feat(version-scanner): support target list inputs via --targets#17478
Merged
Conversation
Contributor
There was a problem hiding this comment.
Code Review
This pull request introduces support for scanning multiple dependency targets simultaneously via a new --targets CLI argument, which accepts either a YAML/JSON file path or an inline string. It updates the scanning, rule resolution, and CSV reporting logic to handle multiple targets, and adds comprehensive unit tests. The review feedback highlights two critical issues where calling os.path.exists() on inline JSON/YAML strings containing invalid path characters can cause the script to crash on Windows. Additionally, the reviewer recommends improving error handling for non-existent target files and validating parsed version types to prevent unexpected scanning behavior.
92f86a0 to
3c0b8fe
Compare
ohmayr
approved these changes
Jun 17, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request adds support for scanning multiple target dependencies and versions concurrently via a YAML file containing targets, while consolidating file handling and error logging.
Key changes:
--targets-fileCLI argument to read and resolve multiple target dependency-version tuples from a configuration file._safe_read_file) with uniform stderr printing and exit codes.