Go security checker
open sourceApache-2.0free
gosec is a static analysis security checker for Go code: it inspects the Go AST and SSA representation for security problems. Pattern-based rules catch common issues, SSA analyzers check type conversions, slice bounds and cryptography, and taint analysis tracks data from user input to dangerous functions to find SQL and command injection, path traversal, SSRF, XSS, log and SMTP injection, template injection, unsafe deserialization and open redirects. You can select rules, and it reports as text, JSON, YAML, CSV, JUnit XML, HTML, SonarQube, golint or SARIF, which uploads to GitHub code scanning from its GitHub Action.
Ways to install
Package managers
Problems it solves
- scan my Go code for security vulnerabilities
- find SQL injection and command injection in a Go codebase
- add a Go security check to CI with SARIF results in GitHub
- static analysis security testing for Go
Features
- AST and SSA analysis
- taint analysis for injection flaws
- rule selection
- SARIF, JSON, JUnit and more outputs
- GitHub Action
Capabilities
| Has a command line tool | plan not known |
|---|
Alternatives
The same job
These do what gosec does.
- Semgrep Code security: SAST, supply chain and secrets scanning with rules that look like code
- Brakeman A static analysis security vulnerability scanner for Ruby on Rails applications
- CodeQL GitHub's semantic code analysis engine for finding vulnerabilities
- Checkov Prevent cloud misconfigurations and find vulnerabilities during build-time in infrastructure as code, container images and open source packages
- Snyk Find, fix and prevent vulnerabilities in code, open source dependencies, container images and cloud configurations
- SonarQube Code confidence for the agentic software factory
