Skip to content
SPECIFICTION
Get listed

gosec vs Infer

gosec

github.com

Infer

fbinfer.com

Side by side

FiguregosecInfer
Price fromFreeFree
Free planYesYes
Free trial——
Open sourceYes—
Web—Yes
macOSYesYes
LinuxYesYes
APIYes—
Self-hostedYesYes
Plans published11
Spec score · Static Analysis Tools8.6 (#6)8.6 (#7)
LicenseThe repository states that gosec is licensed under Apache License 2.0.The Infer repository states that Infer is MIT-licensed, while noting that enabling Java support may require GPL-licensed components.
Purposegosec inspects Go source code for security problems by scanning its AST and SSA code representation.Infer is a static analysis tool that produces a list of potential bugs from Java or C/C++/Objective-C code.
What it doesgosec scans Go source code by analyzing Go abstract syntax trees and static single-assignment representations for security problems.Infer is a static analyzer that reports potential bugs in source code before it ships.

Plans

gosec

  • gosecFree

gosec pricing →

Infer

  • Infer (free)Free

Infer pricing →

In their own words

gosec

gosec is a free Go source-code security checker that analyzes abstract syntax trees and static single assignment representations. It applies pattern rules, SSA analyzers, and taint analysis to detect issues including injection, path traversal, SSRF, unsafe deserialization, cryptography and TLS problems, blocklisted imports, and Go-specific risks. Findings map to Common Weakness Enumeration entries. Users can select or exclude rules, define path-based exclusions, and change settings such as audit mode. Reports are available as text, JSON, YAML, CSV, JUnit XML, HTML, SonarQube, golint, and SARIF. The project documents GitHub Actions and SARIF uploads to GitHub code scanning; its goanalysis package supports tools such as Bazel nogo. Local installation requires Go 1.25 or newer, with dependencies loaded through Go modules. An optional AI feature suggests fixes through Atlas Cloud, Gemini, Claude, OpenAI, or custom OpenAI-compatible APIs. Automated detection can produce false positives, which annotations can suppress. It is licensed under Apache License 2.0.

Visit github.com

Infer

Infer is a static analysis tool that examines compiled Java, C, C++, Objective-C, and Erlang code and reports potential bugs before release. Its checks include null pointer problems, resource or memory leaks, coding conventions, unavailable APIs, and concurrency issues such as data races. Some analyses can follow an issue across multiple functions or methods and files. Pulse provides memory-safety analysis, while RacerD checks thread safety. Cost analysis estimates asymptotic function complexity for Java and C-family languages; Hack support is experimental, and Python, Rust, and Swift are not supported by that analysis. Infer captures compilation commands, analyzes the captured files, and writes reports that can be reviewed with `infer explore`; files that are not compiled are not analyzed. Integrations are documented for build tools including Buck, CMake, Gradle, Make, Maven, Xcodebuild, and xctool. It can be installed from binary releases, built from source, or run in Docker. The free plan costs nothing. Infer runs on Linux and macOS, with web and self-hosted options; Windows is not supported.

Visit fbinfer.com