Loading...
Loading...
Run gosec SAST scans on Go code. Detects SQL injection, hardcoded credentials, insecure TLS, command injection, and other Go security issues.
npx skill4agent add vchirrav/owasp-secure-coding-md sast-gosecgo install github.com/securego/gosec/v2/cmd/gosec@latestgosec --versiongosec -fmt=json -out=gosec-results.json ./...gosec -fmt=json -out=results.json ./cmd/...gosec -tests=false -fmt=json ./...gosec -include=G101,G201,G304 -fmt=json ./...| # | Severity | Confidence | Rule ID | File:Line | Finding | Remediation |
|---|----------|------------|---------|-----------|---------|-------------|| Rule | Description |
|---|---|
| G101 | Hardcoded credentials |
| G102 | Bind to all interfaces |
| G104 | Errors not checked |
| G107 | URL provided to HTTP request as taint input |
| G108 | Profiling endpoint exposed |
| G201 | SQL query construction via string concatenation |
| G202 | SQL query construction via string formatting |
| G301 | Insecure file permissions on directory creation |
| G304 | File path provided as taint input (path traversal) |
| G401 | Insecure hash (MD5/SHA1) |
| G402 | TLS InsecureSkipVerify enabled |
| G501 | Importing insecure crypto packages |