Add --skip-default-filter flag to scan create command(AST-154378) - #1532
Open
cx-atish-jadhav wants to merge 3 commits into
Open
Add --skip-default-filter flag to scan create command(AST-154378)#1532cx-atish-jadhav wants to merge 3 commits into
cx-atish-jadhav wants to merge 3 commits into
Conversation
Introduce a new --skip-default-filter flag to bypass the CLI's base include/exclude file filters. Changes: - Add flag constant and usage (internal/params/flags.go). - Wire the flag into scan create command and log when set (internal/commands/scan.go). - Extend compressFolder and related helpers to accept skipDefaultFilter and honor it when building include/exclude filters; callers updated accordingly. Also adjust unzip condition to preserve container-local-resolution behavior when skipping defaults. - Add unit tests covering filter behavior and zip compression permutations (internal/commands/scan_test.go). - Add integration tests to verify the flag path and log output (test/integration/scan_test.go). This preserves existing behavior by default and enables users to include files normally excluded by base filters (e.g., node_modules, binaries) when explicitly requested.
cx-atish-jadhav
requested review from
cx-anurag-dalke and
cx-umesh-waghode
as code owners
July 31, 2026 06:34
Introduce executeCommandWithTimeout in test/integration/util_command.go and update TestRunScaRealtimeScan in test/integration/scan_test.go to use it with a 15-minute timeout. This avoids flaky failures/timeouts during SCA resolver downloads by allowing longer execution time while preserving the existing error+output buffer behavior.
This reverts commit da1f4cd.
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.
Introduce a new --skip-default-filter flag to bypass the CLI's base include/exclude file filters. Changes:
This preserves existing behavior by default and enables users to include files normally excluded by base filters (e.g., node_modules, binaries) when explicitly requested.
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
Introduce --skip-default-filter flag for cx scan create command to skip applying default base-included and base-excluded file filters. When this flag is NOT passed, the command behaves exactly as today (backward compatible). When passed, only user-provided filters apply — no base filters are appended.
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.