Container Security Scan tar - podman path exist instead image name fix (AST-123671)#1414
Merged
cx-anurag-dalke merged 6 commits intomainfrom Jan 30, 2026
Merged
Container Security Scan tar - podman path exist instead image name fix (AST-123671)#1414cx-anurag-dalke merged 6 commits intomainfrom
cx-anurag-dalke merged 6 commits intomainfrom
Conversation
|
Great job! No new security vulnerabilities introduced in this pull request |
- Add minWindowsPathLength constant to replace magic number 3 - Update isWindowsAbsolutePath to use the constant - Resolves mnd linter error: Magic number: 3, in <condition> detected
… handle it - File existence checks were too strict and caused integration test failures - Container resolver will handle non-existent files with proper error messages - This allows for more flexible testing scenarios and better separation of concerns - Updated unit tests to reflect the new behavior
…resolver handle it" This reverts commit 35f747e.
Contributor
|
@cx-dmitri-rivin , Please provide summary of the change in the PR , this will help us to review
|
cx-umesh-waghode
previously requested changes
Jan 29, 2026
Contributor
cx-umesh-waghode
left a comment
There was a problem hiding this comment.
Is this actually tested on windows and linux?
Is there any documentation change needed?
Any possibility of windows network file path For ex \stoarge\images\image.tar?
cx-anjali-deore
approved these changes
Jan 29, 2026
Answered the questions
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.

By submitting this pull request, you agree to the terms within the Checkmarx Code of Conduct. Please review the contributing guidelines for guidance on creating high-quality pull requests.
Description
Hi @cx-anjali-deore,
Thank you for the thorough review! I've implemented both of your refactoring suggestions:
Changes Made:
isCompressedTarFile()helper function - This function now checks for compressed tar formats (.tar.gz,.tar.bz2,.tar.xz,.tgz) and is reused in bothlooksLikeFilePath()andvalidateFilePath()methodscontainerImagesFlagErrorconstant - Declared as a constant and replaced all 15 occurrences throughout the codePR Summary:
Impact:
--container-imagesflag with tar file inputsReason for the Change:
validateContainerImageFormat()was treating file paths (especially those with colons in Windows absolute paths likeC:\path\to\file.tar) as image referenceslooksLikeFilePath()) and dedicated file path validation (validateFilePath()) to distinguish between image references and file pathsFeature Flag (FF):
Testing:
Type of Change
Related Issues
Link any related issues or tickets.
Checklist
Screenshots (if applicable)
Add screenshots to help explain your changes.
Additional Notes
Add any other relevant information.