Gin Debug Mode in Production
Description
Gin debug mode exposes routing info and verbose errors in production.
How to fix
Set release mode before creating the router. ```go gin.SetMode(gin.ReleaseMode) r := gin.Default() ``` Learn more: https://shoulder.dev/learn/go/cwe-489/debug-mode
Applies to
Languages
Frameworks
gin
References
Scan for this issue
Detect with Shoulder CLI
npx @shoulderdev/cli trust --rule=go-gin-debug-mode-production .