feat: add Snyk Remediation Agent code action provider [IDE-2052]#1327
feat: add Snyk Remediation Agent code action provider [IDE-2052]#1327bastiandoetsch wants to merge 2 commits into
Conversation
✅ 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. |
PR Reviewer Guide 🔍
|
|
/describe |
|
PR Description updated to latest commit (58ce900) |
|
/describe |
|
/describe |
|
PR Description updated to latest commit (99f2243) |
1 similar comment
|
PR Description updated to latest commit (99f2243) |
4af253c to
c674073
Compare
|
/describe |
99f2243 to
a2330ca
Compare
|
PR Description updated to latest commit (a2330ca) |
c674073 to
4370e34
Compare
a2330ca to
c50ae83
Compare
…E-2052]
Add RemediationProvider interface (domain/snyk/remediation) and wire it into
CodeActionsService. When a provider is configured, GetCodeActions attaches a
deferred "Fix with Snyk Remediation Agent" action to each fixable finding that
has a stable FindingId. The action resolves lazily via codeAction/resolve so fix
computation does not block the action list.
Production DI passes nil, so no Remy actions appear until a real provider is
wired. The nil guard suppresses action generation entirely, keeping the current
IDE behaviour unchanged.
The RemediationAgentQuickFix kind ("quickfix.snyk.remediationAgent") lets
clients identify the action by kind rather than by localised title.
Remy remediation is now offered for Snyk Code (HasAIFix), Snyk Open Source (upgradable), and Snyk IaC findings. Secrets are excluded because automated secret remediation requires credential rotation outside remy's scope. IaC bypasses the IsFixable guard (which always returns false for IaC) so remy can be offered. Code and OSS retain the IsFixable check to ensure a fixability signal exists before invoking the agent. Add tests for Secrets (excluded), ProductUnknown (excluded), and IaC (offered) product filter branches.
4370e34 to
7c5801a
Compare
c50ae83 to
0ea7ea9
Compare
User description
Summary
RemediationProviderinterface andNoopProviderCodeActionsService.remediationCodeActions— offersRemediationAgentQuickFixfor Code issues withHasAIFix=trueand non-emptyFindingIdcodeAction/resolveRemediationProviderintodi/init.go(nil when feature flag off)PR Stack — Merge Order
flowchart LR main(["main"]) PR1["#1326 PR-1\nfindingId + kind"] PR2["#? PR-2 ← YOU ARE HERE\nCA provider"] PR3["#? PR-3\nremy initial"] PR4["#? PR-4\nworktree impl"] PR5["#? PR-5\nunit tests"] PR6["#? PR-6\ninteg+smoke tests"] main --> PR1 --> PR2 --> PR3 --> PR4 --> PR5 --> PR6 style PR2 fill:#ffd700,color:#000Depends on: #1326
Test plan
make testpassesPR Type
Enhancement, Tests
Description
Introduce the
RemediationProviderinterface andNoopProvider.Integrate the Remediation Agent into the
CodeActionsService.Offer deferred "Fix with Snyk Remediation Agent" code actions for fixable findings.
Add comprehensive tests for the new remediation functionality.
Diagram Walkthrough
File Walkthrough
4 files
Integrate remediation provider into code actions serviceInitialize code action service with nil remediation providerAdd Noop remediation provider implementationDefine remediation provider interface and request4 files
Update code action tests for new constructorAdd remediation agent code action testsTest DI initialization with nil remediation providerTest Noop remediation provider