Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -182,10 +182,22 @@ func (c *ConfigType) Tools() map[string]*plugins.ToolInfo {
return c.tools
}

// toolNameAliases maps legacy tool names to their current equivalents
var toolNameAliases = map[string]string{
"semgrep": "opengrep",
}

func (c *ConfigType) AddTools(configs []plugins.ToolConfig) error {
Comment thread
lventura-codacy marked this conversation as resolved.
// Get the plugin manager to access tool configurations
pluginManager := plugins.GetPluginManager()

// Resolve any legacy tool name aliases
for i := range configs {
if alias, ok := toolNameAliases[configs[i].Name]; ok {
configs[i].Name = alias
}
Comment thread
lventura-codacy marked this conversation as resolved.
}
Comment thread
lventura-codacy marked this conversation as resolved.
Outdated

// Ensure all required runtimes are present before processing tools
for _, toolConfig := range configs {
// Get the tool's plugin configuration to access runtime info
Expand Down
Loading