Skip to content

Ecliipse Plugin | Feature | Vuln Detection - Setting State - MCP - Problem Winodw - #263

Merged
cx-aniket-shinde merged 22 commits into
feature/devassist_integrationfrom
feature/preferences
Aug 18, 2026
Merged

Ecliipse Plugin | Feature | Vuln Detection - Setting State - MCP - Problem Winodw#263
cx-aniket-shinde merged 22 commits into
feature/devassist_integrationfrom
feature/preferences

Conversation

@cx-aniket-shinde

Copy link
Copy Markdown
Collaborator

By submitting a PR to this repository, you agree to the terms within the Checkmarx Code of Conduct. Please see the contributing guidelines for how to create and submit a high-quality PR for this repo.

Description

Describe the purpose of this PR along with any background information and the impacts of the proposed change.

References

Include supporting link to GitHub Issue/PR number

Testing

Describe how this change was tested. Be specific about anything not tested and reasons why. If this solution has unit and/or integration testing, tests should be added for new functionality and existing tests should complete without errors.

Please include any manual steps for testing end-to-end or functionality not covered by unit/integration tests.

Checklist

  • I have added documentation for new/changed functionality in this PR (if applicable).
  • All active GitHub checks for tests, formatting, and security are passing
  • The correct base branch is being used

- Remove McpInstallService from PreferencesPage (common-lib)
- Create AuthenticationListener in devassist-lib configuration
- Register listener in McpInstallService static block
- Create IProjectLifecycleListener interface in common-lib
- ProjectLifecycleListener implements interface
- Update PluginStartup.getProjectListener() to return interface
- MCP auto-install now triggered by authentication event (devassist-lib)
- Workspace scan triggered after login via interface

Architecture: common-lib has no devassist imports, clean separation.
- Create IAuthenticationSuccessHandler interface in common-lib
- Move welcome dialog logic to AuthenticationSuccessHandler in devassist-lib
- PreferencesPage delegates to handler via Preferences registry
- Removes WelcomeDialog import from common-lib PreferencesPage
- Handlers registered in McpInstallService static block

Architecture: common-lib has NO devassist imports, clean separation.
- Create ISettingsChangeNotifier interface in common-lib
- Create SettingsChangeNotifier implementation in main plugin
- Register notifier in PluginStartup static block
- Remove PluginStartup and PluginUtils imports from common-lib PreferencesPage
- Use notifier instead of direct event broker calls

Architecture: common-lib has NO main plugin imports, clean separation.
devassist-lib should depend on common-lib for JAR access, not duplicate them.
- Remove lib/ references from devassist-lib MANIFEST.MF and build.properties
- Remove lib/ references from devassist-lib .classpath
- devassist-lib Require-Bundle: common-lib provides JAR access
- Revert .gitignore to only track main plugin lib/
@stepsecurity-app

stepsecurity-app Bot commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

Resolved — a later workflow run passed this policy check.

Original alert (resolved)

Security Policy Alert: Actions Policy Violation

This workflow run has been blocked by StepSecurity's actions policy.

Disallowed Actions:

  • timonvs/pr-labeler-action@8b99f404a073744885d8021d1de4e40c6eaf38e2

To fix this issue, please modify the workflow to use only allowed actions. Contact your organization administrator to request changes to the allowed actions list if needed.

For more information, see StepSecurity's Actions Policy documentation.

@cx-aniket-shinde
cx-aniket-shinde changed the base branch from main to feature/devassist_integration August 12, 2026 05:12
Comment thread .gitignore
Comment thread JETBRAINS_SCANNER_STATE_MANAGEMENT.md Outdated
Comment thread checkmarx-ast-eclipse-plugin/src/com/checkmarx/eclipse/utils/PluginUtils.java Outdated
Comment thread common-lib/src/com/checkmarx/eclipse/common/enums/Severity.java
return IMarker.SEVERITY_WARNING;
}

switch (severity.toLowerCase()) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: No "Malicious" case in severity-to-marker mapping downgrades the most severe findings to Warning

SeverityLevel.MALICIOUS is defined as strictly more severe than CRITICAL, and ProblemDecorator already special-cases it — but calculateMarkerSeverity()'s switch has no "malicious" case and falls through to IMarker.SEVERITY_WARNING, understating the single most dangerous finding class (e.g. malicious packages/secrets).

Suggested fix: Add an explicit "malicious" → SEVERITY_ERROR case.
Evidence: MarkerIssueMapper.java:156-172; SeverityLevel.java:8; ProblemDecorator.java:205-206.

return new Object[0];
}

private Image getFileIcon(String fileName) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

New native Image created per file node on every tree refresh, never disposed

getElements() calls imageDescriptor.createImage() fresh for every file on every setInput() call; CxFindingsView.refreshTreeWithFilter() calls setInput() repeatedly (including from an async real-time-scan trigger), and dispose() is a no-op. SWT Images are OS handles, not GC'd — this leaks one handle per distinct file per refresh, eventually causing "no more handles" crashes in long-running sessions given how often real-time scanning refreshes the tree.

Suggested fix: Cache file-type icons by extension (like SeverityImageComposer's cache) and dispose superseded ones in dispose().
Evidence: FindingsContentProvider.java:36,58,108-111; CxFindingsView.java:1417,1422,1514.

}

@Override
public Object getParent(Object element) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

getParent() always returns null, breaking the ITreeContentProvider contract implied by getChildren()/hasChildren()

A real two-level hierarchy exists, but getParent() unconditionally returns null ("would need to track in the model"). Any future targeted-viewer operation (reveal, update) on a leaf will fail to locate the tree item. Latent today because the view always does full setInput() refreshes.
Suggested fix: Track the owning FileNodeLabel on each child, or maintain a child→parent map.
Evidence: FindingsContentProvider.java:70-95,81-86.

@@ -0,0 +1,106 @@
//package com.checkmarx.eclipse.devassist.ui.findings.realtime;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(CheckmarxDocumentListener.java, CheckmarxEditorListener.java, RealTimeScanJob.java)

Entire package is a ~750-line, fully-unreferenced duplicate of the live real-time-scan implementation

devassist.ui.findings.realtime duplicates devassist.backend.listener (same class names, same purpose) but is imported by nothing (confirmed by grep), not exported in MANIFEST.MF, and every line of all three files is literally commented out including the package declaration itself. The canonical, wired implementation is backend.listener (held via a static strong reference in PluginStartup). Shipping ~750 lines of orphaned, plausible-looking duplicate source risks a future maintainer "fixing" the wrong, disconnected copy.

Suggested fix: Delete the three files under ui/findings/realtime/ entirely.
Evidence: grep for the package returns only its own files; every line begins with //; PluginStartup.java:12,48 imports the backend.listener version instead.

* - IAC: Represents scanning for Infrastructure as Code issues and misconfigurations.
* - ASCA: Represents scanning for Application Security Code Analysis.
*/
public enum ScanEngine {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

duplicate of model/ScanEngine.java

utils.ScanEngine (used only by BaseScannerCommand/AscaScannerService) and model.ScanEngine (used by everything else — adaptors, ProblemDecorator, markers, remediation) are structurally different types for the same concept. BaseScannerCommand.getScannerType() bridges them via ScanEngine.valueOf(config.getEngineName().toUpperCase()) — a string round-trip with no compiler-enforced link. A future rename or new engine applied to only one enum breaks the bridge at runtime (IllegalArgumentException), not compile time.

Suggested fix: Consolidate to model.ScanEngine (the more complete, more widely used type) and delete utils.ScanEngine.
Evidence: utils/ScanEngine.java:14-21 vs model/ScanEngine.java:6-11; BaseScannerCommand.java:4,87-88; AscaScannerService.java:9,45.

@cx-aniket-shinde
cx-aniket-shinde merged commit 0e10be5 into feature/devassist_integration Aug 18, 2026
3 checks passed
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.

2 participants