mcp-server-semgrep
Version:
MCP Server for Semgrep Integration - static code analysis with AI
28 lines (27 loc) • 704 B
YAML
rules:
- id: hidden-goroutine
patterns:
- pattern-not: |
func $FUNC(...) {
go func() {
...
}(...)
$MORE
}
- pattern: |
func $FUNC(...) {
go func() {
...
}(...)
}
message: >-
Detected a hidden goroutine. Function invocations are expected to synchronous,
and this function will execute asynchronously because all it does is call a
goroutine. Instead, remove the internal goroutine and call the function using
'go'.
languages: [go]
severity: WARNING
metadata:
category: best-practice
technology:
- go