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.
Latest public signals
Last updated: 11 November 2026 (page expanded from the official README or site).
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
- Go rules: Rules for common Go security issues.
- SSA analysis: Uses SSA for some checks.
- Rule selection: Include or exclude rules.
- Output formats: JSON, SARIF, JUnit and others.
- GitHub Action: Run in GitHub workflows.
Pros
- Free to use: Open source under Apache-2.0.
- Maintained: Commits as recent as 9 November 2026.
- Community: About 9,000 GitHub stars.
Cons
- Go only: Single language.
- False positives: Some rules need tuning with
#nosecand reasons.
Usage and Links (Example)
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.
Recommended for?
- Go teams adding SAST to CI.
- Reviewers catching common Go mistakes.
- 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.
Ggovulncheckgovulncheck is the Go team's BSD-licensed vulnerability scanner that reports known vulnerabilities from the Go vulnerability database only when your code actually calls the affected functions.Compare with gosec
SSemgrepSemgrep is a fast static-analysis engine with a free open-source CLI and a paid platform for cross-file rules, supply chain, and secrets.Compare with gosec
OOpengrepOpengrep is an LGPL-2.1 open-source SAST engine, a fork of Semgrep backed by a consortium of AppSec companies including Aikido, Endor Labs and others.Compare with gosec
CCodeQLCodeQL is GitHub's semantic code analysis engine: it builds a queryable database from source code and runs security queries (MIT-licensed standard library) to find vulnerabilities, powering GitHub code scanning.Compare with gosec
BBearer CLIBearer CLI is a SAST tool that scans source code and analyses data flows to find, filter and prioritise security and privacy risks, with a commercial Bearer Pro from Cycode.Compare with gosec
SSonarQubeModernize your AI workflows with code verification for the agentic era.Compare with gosec