talira

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 toolplan not known

Alternatives

The same job

These do what gosec does.

  1. Semgrep Code security: SAST, supply chain and secrets scanning with rules that look like code
  2. Brakeman A static analysis security vulnerability scanner for Ruby on Rails applications
  3. CodeQL GitHub's semantic code analysis engine for finding vulnerabilities
  4. Checkov Prevent cloud misconfigurations and find vulnerabilities during build-time in infrastructure as code, container images and open source packages
  5. Snyk Find, fix and prevent vulnerabilities in code, open source dependencies, container images and cloud configurations
  6. SonarQube Code confidence for the agentic software factory

Compare gosec with the top 3