fix: enforce strict input validation for container scanning when usin… #6461
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.
Pull Request Submission Checklist
are release-note ready, emphasizing
what was changed, not how.
What does this PR do?
Updates snyk-docker-plugin to v9.0.0 to fix issues where the
--nested-jars-depthflag would accept non-numeric inputs and allowed conflicting usage with--shaded-jars-depthforsnyk container testWhere should the reviewer start?
package.jsonandpackage-lock.json- single dependency version updateHow should this be manually tested?
If you want to verify this locally, here are the commands to reproduce:
For invalid inputs you should expect the following error message to manifest
--nested-jars-depth accepts only numbers bigger than or equal to 0For conflicting flags you should expect the following error message to manifest
Cannot use --shaded-jars-depth together with --nested-jars-depth, please use the latterFor valid inputs you should expect the container scan to produce a complete scan
What's the product update that needs to be communicated to CLI users?
Container Scanning
We have improved the reliability of the
--nested-jars-depthflag to help you avoid ambiguous configurations in your container scanning pipelines. Previously, illogical inputs (liketrueorInfinity) were silently accepted, potentially leading to scans running with unintended depth settings.--nested-jars-depth--nested-jars-depthand--shaded-jars-depth--nested-jars-depthand--shaded-jars-depthby fixing an issue where inputs were processed inconsistently across the two flagsRisk assessment (Low | Medium | High)?
Medium
Any background context you want to provide?
What are the relevant tickets?
Screenshots (if appropriate)
You can find screenshots of my manual tests in this comment and this comment on the JIRA ticket.