Skip to content

AST-195853: Add severity threshold support to realtime scan commands - #1055

Open
cx-anand-nandeshwar wants to merge 2 commits into
mainfrom
feature/AST-195853_severity_threshold
Open

cx-anand-nandeshwar wants to merge 2 commits into
mainfrom
feature/AST-195853_severity_threshold

Conversation

@cx-anand-nandeshwar

Copy link
Copy Markdown

Summary

  • Adds an optional severityThreshold parameter to scanAsca, ossScanResults, containersRealtimeScanResults, iacRealtimeScanResults, and secretsScanResults, forwarding it to the CLI as --severity-threshold (mirrors the flag already added in ast-cli, AST-193900/AST-195213).
  • Adds CxConstants.SEVERITY_THRESHOLD = "--severity-threshold".
  • Extracts a shared appendFlagIfPresent helper to deduplicate the repeated ignoredFilePath/severityThreshold flag-push logic across all five scan methods.
  • Adds a describe.skip integration-test block per scanner for the new parameter; skipped because the currently bundled cx.exe (pinned via checkmarx-ast-cli.version) predates the --severity-threshold flag. Unskip once the pinned CLI version is bumped to a release that includes it.

Test plan

  • npm run build (tsc) passes
  • npm run lint (eslint) passes
  • Unskip and run the new severity-threshold integration tests once checkmarx-ast-cli.version is bumped past AST-193900/AST-195213

🤖 Generated with Claude Code

@cx-anand-nandeshwar
cx-anand-nandeshwar requested a review from a team November 30, 2026 12:18
- De-nest the skipped Severity threshold integration describe block
  from ScanCreate cases so it's a sibling, not accidentally nested.
- Add SeverityThresholdArgsTest.test.ts: fast unit tests asserting the
  exact argv built for all five scan methods (with and without a
  threshold), using the repo's existing ExecutionService spy pattern.
  These run without a CLI binary that supports --severity-threshold,
  closing the gap left by the still-skipped integration tests.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
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.

1 participant