Skip to content

Conversation

@ShawkyZ
Copy link
Collaborator

@ShawkyZ ShawkyZ commented Nov 5, 2025

Description

Waiting on: snyk/studio-mcp#7

Checklist

  • Tests added and all succeed
  • Regenerated mocks, etc. (make generate)
  • Linted (make lint-fix)
  • README.md updated, if user-facing
  • License file updated, if new 3rd-party dependency is introduced

@ShawkyZ ShawkyZ changed the title Chore/move security at inception ls refactor: move security at inception ls Nov 5, 2025
@snyk-io
Copy link

snyk-io bot commented Nov 5, 2025

⚠️ Snyk checks are incomplete.

Status Scanner Critical High Medium Low Total (0)
⚠️ Open Source Security 0 0 0 0 See details
⚠️ Licenses 0 0 0 0 See details
Code Security 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

# Conflicts:
#	application/config/config.go
#	application/server/configuration_test.go
c.engine = engine
}

c.engine.SetUserInterface(util.NewLsUserInterface(c.logger))
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

this is needed, since LS will use CLI UserInterface by default, which will always output to stdout which will break LS stdio stream

# Conflicts:
#	application/config/config.go
#	application/server/configuration.go
#	internal/types/lsp.go
isLSPInitialized bool
cachedOriginalPath string
userSettingsPath string
autoConfigureMcpEnabled bool
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

make sure it's the same name

mcpConfig.Set(mcp.ToolNameParam, c.IdeName())
mcpConfig.Set(mcp.IdeConfigPathParam, c.IdeName())
mcpConfig.Set(mcp.TrustedFoldersParam, trustedFoldersStr)
if c.GetSecureAtInceptionExecutionFrequency() == "Smart Scan" {
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

make const

mcp "github.com/snyk/studio-mcp/shared"
)

func CallMcpConfigWorkflow(c *config.Config, notifier notification.Notifier, configureMcp bool, configureRules bool) {
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

this all must be a go routine

RequiredProtocolVersion string `json:"requiredProtocolVersion,omitempty"`
HoverVerbosity *int `json:"hoverVerbosity,omitempty"`
OutputFormat *string `json:"outputFormat,omitempty"`
AutoConfigureSnykMcpServer string `json:"autoConfigureSnykMcpServer,omitempty"`
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

double check the name here

}

func NewLsUserInterface(logger *zerolog.Logger) *LsUserInterface {
return &LsUserInterface{
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

add handlers + options functions for output handler + input handler, error handler, progress handler, etc

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

⚠️ DONT MERGE Not ready to be merged yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants