CheckOps home

Tools directory

G

CheckOps

gosec

gosec is an Apache-2.0 Go security checker that inspects source code for security problems by scanning the Go AST and SSA representation.

Visit website

Latest public signals

Last updated: 11 November 2026 (page expanded from the official README or site).

Visit Website

Introduction

gosec inspects Go source code for security problems by scanning the Go AST and SSA code representation. It ships a set of rules for issues such as hard-coded credentials, SQL string building, weak crypto and unsafe file permissions.

The source code is at securego/gosec on GitHub under the Apache-2.0 licence, with about 9,000 stars; the most recent commit was on 9 November 2026.

gosec inspects Go source code for security problems by scanning the abstract syntax tree and SSA representation. Its README lists pattern-based rules for common issues, SSA-based analysers for type conversions, slice bounds and cryptography, and taint analysis that tracks data from user input to dangerous functions (SQL injection, command injection, path traversal, SSRF and XSS). It offers a GitHub Action and many output formats, including SARIF.

Where it fits: on CheckOps, gosec is listed alongside alternatives such as govulncheck, Semgrep, Opengrep and CodeQL. When comparing them, check licence and hosting model, how results reach developers (pull requests, CI logs or dashboards), how much tuning is needed to keep noise low, and whether the project or vendor is actively maintained.

Features

  1. Go rules: Rules for common Go security issues.
  2. SSA analysis: Uses SSA for some checks.
  3. Rule selection: Include or exclude rules.
  4. Output formats: JSON, SARIF, JUnit and others.
  5. GitHub Action: Run in GitHub workflows.

Pros

  1. Free to use: Open source under Apache-2.0.
  2. Maintained: Commits as recent as 9 November 2026.
  3. Community: About 9,000 GitHub stars.

Cons

  1. Go only: Single language.
  2. False positives: Some rules need tuning with #nosec and reasons.
go install github.com/securego/gosec/v2/cmd/gosec@latest
gosec ./...

Resources:

Getting started tips: run gosec on a recent branch, triage the first report with the developers who own the code, and suppress or tune rules that produce noise before making the scan a blocking CI check. Upload results in SARIF where your platform supports it, so findings appear on pull requests, and gate only on new high-severity findings at first to avoid a backlog that blocks every merge.

Pricing

gosec is free and open source under the Apache-2.0 licence.

  1. Go teams adding SAST to CI.
  2. Reviewers catching common Go mistakes.
  3. Not a fit for dependency vulnerabilities; use govulncheck.

Conclusion

gosec is the standard open-source security linter for Go.

As with any tool in this category, the value of gosec comes from running it consistently and acting on what it finds, so wire it into an existing workflow rather than treating it as an occasional audit.

Alternatives

Other tools on CheckOps that cover similar ground. Open a page, or compare one with gosec side by side.