UNPKG

mcp-server-semgrep

Version:

MCP Server for Semgrep Integration - static code analysis with AI

40 lines (39 loc) 1.3 kB
rules: - id: integer-overflow-int16 message: Detected conversion of the result of a strconv.Atoi command to an int16. This could lead to an integer overflow, which could possibly result in unexpected behavior and even privilege escalation. Instead, use `strconv.ParseInt`. languages: [go] severity: WARNING patterns: - pattern: | $F, $ERR := strconv.Atoi($NUM) ... int16($F) - metavariable-comparison: metavariable: $NUM comparison: $NUM > 32767 or $NUM < -32768 strip: true metadata: category: correctness technology: - go - id: integer-overflow-int32 message: Detected conversion of the result of a strconv.Atoi command to an int32. This could lead to an integer overflow, which could possibly result in unexpected behavior and even privilege escalation. Instead, use `strconv.ParseInt`. languages: [go] severity: WARNING patterns: - pattern: | $F, $ERR := strconv.Atoi($NUM) ... int32($F) - metavariable-comparison: metavariable: $NUM comparison: $NUM > 2147483647 or $NUM < -2147483648 strip: true metadata: category: correctness technology: - go