Skip to content

Fix: Results are not loaded on re-install plugin(AST-107449)#1499

Open
cx-sumit-morchhale wants to merge 1 commit into
other/integration-branchfrom
bug/AST-107449-scanResultNotFetched
Open

Fix: Results are not loaded on re-install plugin(AST-107449)#1499
cx-sumit-morchhale wants to merge 1 commit into
other/integration-branchfrom
bug/AST-107449-scanResultNotFetched

Conversation

@cx-sumit-morchhale
Copy link
Copy Markdown
Contributor

Summary

  • Fixes issue where "Scan found no vulnerability" message was displayed prematurely while results were loading
  • Changes readResultsFromFile() to return undefined when file doesn't exist (semantic distinction: undefined = not loaded, [] = loaded but empty)
  • Updates loadedResults type annotation to CxResult[] | undefined to match actual usage
  • Fixes scanId retrieval to use .id instead of .name for correct UUID

Testing

  • ✅ Results load correctly and display after file is created
  • ✅ No premature "No vulnerability" message shown during loading
  • ✅ Triage operations work without regression
  • ✅ Filtering and grouping work correctly
  • ✅ Risk management view handles undefined safely
  • ✅ Both Checkmarx and Project Ignite plugins safe
  • ✅ Zero regressions in existing functionality

Type Safety

  • Improves type safety by making optional nature of loadedResults explicit
  • Pre-existing type inconsistency fixed (code was assigning undefined but type didn't allow it)

🤖 Generated with Claude Code

…oading (AST-107449)

- Change readResultsFromFile() to return undefined when file doesn't exist
  instead of returning empty array, creating semantic distinction between
  "not yet loaded" (undefined) vs "loaded with 0 items" ([])
- Update loadedResults type annotation to CxResult[] | undefined to match actual usage
- Fix scanId retrieval to use .id instead of .name for correct UUID

This prevents the tree from showing "No vulnerability" prematurely while
results are still being fetched. The message now only shows after results
are actually loaded and are empty.

Tested and verified:
- ✅ No regressions in triage operations
- ✅ No regressions in filtering/grouping
- ✅ Risk management view safely handles undefined
- ✅ All existing functionality preserved
- ✅ Both Checkmarx and Project Ignite plugins safe

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
@cx-bot-ghpublic cx-bot-ghpublic added the bug Something isn't working label Apr 20, 2026
@cx-sumit-morchhale cx-sumit-morchhale changed the title Fix: Results are not loaded on re-install plugin'(AST-107449) Fix: Results are not loaded on re-install plugin(AST-107449) Apr 20, 2026
@github-actions
Copy link
Copy Markdown
Contributor

Logo
Checkmarx One – Scan Summary & Detailsd0f8a22a-6c9a-4a88-b563-78e4d2170fb1

Great job! No new security vulnerabilities introduced in this pull request

@cx-rahul-pidde cx-rahul-pidde changed the base branch from main to other/integration-branch April 21, 2026 09:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants