feat(secrets): persist and run Secrets with other scanners [IDE-1747]#791
Merged
feat(secrets): persist and run Secrets with other scanners [IDE-1747]#791
Conversation
- Add activateSnykSecrets to SaveConfigRequest and apply in SaveConfigHandler - Add activateSnykSecrets to LanguageServerSettings and getSettings() - Add secretsResults to TreeFiltering and matchFilteringWithEnablement - Add Secrets scan action to SnykTreeScanTypeFilterActionGroup Co-authored-by: Cursor <cursoragent@cursor.com>
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
Contributor
Code Coverage
|
…-1747] - Add RootSecretsIssuesTreeNode and SECRETS_ROOT_TEXT; tree shows four roots (OSS, Code Security, IaC, Secrets) before and after any scan. - Include Secrets root in removeAllChildren and updateTreeRootNodesPresentation so Clean all results keeps all four roots with labels reset. - Wire Secrets in SnykToolWindowSnykScanListener: scanningStarted/scanningError clear Secrets node; displaySecretsResults and filter refresh populate it. - Map ScanIssue.SECRETS in description panel and flushPendingTreeRefreshes. - Tests: expect four roots, pass rootSecretsIssuesTreeNode, assert no null on Secrets node after clean. Co-authored-by: Cursor <cursoragent@cursor.com>
Add Secrets product node to TreeViewInit.html so the initial HTML tree view displays all four products (OSS, Code Security, IaC, Secrets) from plugin load instead of showing Secrets only after the LS sends a tree view update. Co-authored-by: Cursor <cursoragent@cursor.com>
bastiandoetsch
requested changes
Feb 27, 2026
Collaborator
bastiandoetsch
left a comment
There was a problem hiding this comment.
Before I review more, could you please remove all the changes related to the native tree? We don't use it when secrets is enabled, so it's unnecessary code.
src/main/kotlin/io/snyk/plugin/services/SnykApplicationSettingsStateService.kt
Outdated
Show resolved
Hide resolved
src/main/kotlin/io/snyk/plugin/services/SnykApplicationSettingsStateService.kt
Outdated
Show resolved
Hide resolved
src/main/kotlin/io/snyk/plugin/ui/actions/SnykTreeScanTypeFilterActionGroup.kt
Outdated
Show resolved
Hide resolved
src/main/kotlin/io/snyk/plugin/ui/actions/SnykTreeScanTypeFilterActionGroup.kt
Outdated
Show resolved
Hide resolved
src/main/kotlin/io/snyk/plugin/ui/toolwindow/SnykToolWindowPanel.kt
Outdated
Show resolved
Hide resolved
src/main/kotlin/io/snyk/plugin/ui/toolwindow/SnykToolWindowPanel.kt
Outdated
Show resolved
Hide resolved
- Remove RootSecretsIssuesTreeNode and delete its class file; Secrets are shown only in the LS-driven HTML tree view (snykTreeView), not in the native Swing tree. - SnykToolWindowSnykScanListener now takes three roots (OSS, Code, IaC); remove all LsProduct.Secrets handling (scanningStarted, scanningError, displaySecretsResults, SECRETS branch in displayResults/displayIssues). - Panel: stop creating/passing Secrets root, drop Secrets from filtering callback and from flushPendingTreeRefreshes. - Update tests for 3-root native tree. Made-with: Cursor
…handlers [IDE-1747] - Remove unused SECRETS_ROOT_TEXT from SnykToolWindowPanel companion object. - Add ScanIssue.SECRETS branch in SuggestionDescriptionPanel.initializeBrowser() with SubmitIgnoreRequestHandler so Secrets issue detail HTML can trigger ignore requests (parity with VS Code submitIgnoreRequest). Made-with: Cursor
…IDE-1747] - Drop treeFiltering.secretsResults and matchFiltering sync (native tree not used for Secrets) - Remove createSecretsScanAction and Secrets from scan-type filter menu - Remove product-secrets node from TreeViewInit.html - Test: use 3-param updateTreeRootNodesPresentation call and comment Made-with: Cursor
…ion [IDE-1747] - Drop secretsResultsCount param from displayIssues and updateTreeRootNodesPresentation - Restore Secrets cache clear and comments in scan listener (scan started / scan error) - Call sites: use 3 counts + addHMLPostfix only; test keeps positional updateTreeRootNodesPresentation(0, 0, 0, "") Made-with: Cursor
src/main/kotlin/io/snyk/plugin/ui/toolwindow/SnykToolWindowPanel.kt
Outdated
Show resolved
Hide resolved
src/main/kotlin/io/snyk/plugin/ui/toolwindow/panels/SuggestionDescriptionPanel.kt
Outdated
Show resolved
Hide resolved
bastiandoetsch
approved these changes
Feb 27, 2026
Collaborator
bastiandoetsch
left a comment
There was a problem hiding this comment.
I think there may still be more than needed, but please have a look.
… [IDE-1747] - Panel: drop SECRETS branch in productIssues when; Secrets only in HTML tree - SuggestionDescriptionPanel: remove SECRETS SubmitIgnoreRequestHandler block Made-with: Cursor
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.
Summary
activateSnykSecretsin SaveConfigRequest/LanguageServerSettings, Secrets scan in SnykTreeScanTypeFilterActionGroup.Description
Provide description of this PR and changes, if linked Jira ticket doesn't cover it in full.
Checklist
Screenshots / GIFs
Visuals that may help the reviewer. Please add screenshots for any UI change. GIFs are most welcome!