macOS
brew install goseclocal Homebrew formula metadata
sudo port install gosecMacPorts ports tree · security/gosec/Portfile · 来源: api.github.com
安装
brew install goseclocal Homebrew formula metadata
sudo port install gosecMacPorts ports tree · security/gosec/Portfile · 来源: api.github.com
sudo apk add gosecAlpine Linux edge package indexes · gosec · 来源: dl-cdn.alpinelinux.org
sudo dnf install gosecFedora Rawhide package metadata · gosec · 来源: dl.fedoraproject.org
nix profile install nixpkgs#gosecnixpkgs package indexes · pkgs/by-name/go/gosec/package.nix · 来源: api.github.com
sudo zypper install gosecopenSUSE Tumbleweed package metadata · gosec · 来源: download.opensuse.org
scoop install main/gosecScoop official bucket manifest trees · bucket/gosec.json · 来源: api.github.com
概览
Golang security checker
历史
gosec is the SecureGo project's static security scanner for Go source code, using AST, SSA, and taint-analysis rules to find common vulnerability patterns before code ships.
The GitHub repository was created on July 18, 2016. Its README describes gosec as a Go security checker that inspects source code by scanning Go AST and SSA representations, while SecureGo's tools page frames the project as a way to programmatically enforce Secure Go guidelines.
Over time the project expanded from pattern-style checks into a broader rule catalog. Official rule documentation groups findings by general secure coding, injection, filesystem permissions, crypto and protocol security, import blocklists, language/runtime safety, and taint analysis. The README also documents CWE mapping, SARIF output, GitHub Action usage, Go analysis integration, and configurable global and per-rule settings.
gosec became a standard Go security linter because it fits normal Go and CI workflows: go install for local use, a GitHub Action for repository scanning, SARIF output for GitHub code scanning, and package-manager distribution through apk, Homebrew, dnf, MacPorts, Nix, Scoop, and zypper according to the input package facts.
The project sits in the same practical lane as go vet and staticcheck but focuses on security-sensitive APIs and data flows. Its CII Best Practices badge, GitHub Action, Go analysis package, and package-manager coverage made it accessible both to individual Go developers and to teams wiring security checks into CI.
The basic local workflow is gosec ./..., with options for JSON or SARIF reports, selected rule inclusion or exclusion, and a config.json file passed through -conf. CI workflows often run securego/gosec as an action and upload SARIF to GitHub code scanning.
gosec rules include hardcoded credentials, unchecked errors, unsafe usage, SQL and command injection patterns, archive/path traversal risks, TLS and crypto weaknesses, blocklisted imports, integer/slice issues, and taint-analysis checks for SQL injection, command injection, SSRF, XSS, log injection, SMTP injection, server-side template injection, unsafe deserialization, and open redirects.
For package maintainers, gosec is important because it is easy to add as a single CLI check across Go packages without adopting a SaaS scanner. It gives distro and CI users a reproducible local executable, machine-readable output, CWE mappings, and a documented config file.
Its package-manager footprint also matters: a security scanner being available from Homebrew, Linux distro channels, Nix, Scoop, and container/GitHub Action paths means the same scanner can be used by laptop developers, CI jobs, and release pipelines.
安全态势
narrow executable package without higher-risk signals.
绿色 风险 · 低 置信度 · appliance
在无人值守的代理使用前,请检查该工具是否读取明文凭据、写入远程状态、发布制品或调用插件。
local files
These source-backed paths show where this package keeps local settings or durable credentials. Automic Vault can use them as review targets for secret scanning, migration, and command approval.
Config paths the tool may read or write during local use.
config.json可执行文件
| 命令 | 类型 | 暴露范围 | 备注 |
|---|---|---|---|
gosec | cli | 全局可执行文件 |
新鲜度
这些信号区分页生成时间、软件包管理器活动和上游发布比较。只有存在证据 URL 和可比较版本时,才会提示版本落后。
https://github.com/securego/gosec
安装元数据
| 软件包键 | brew:gosec |
|---|---|
| 版本 | 2.28.0 |
| 软件包管理器 | Homebrew |
| 软件包管理器页面 | https://formulae.brew.sh/formula/gosec |
| 主页 | https://securego.io/ |
| 仓库 | https://github.com/securego/gosec |
| 上游文档 | https://github.com/securego/gosec#readme |
| 许可证 | Apache-2.0 |
| 源码归档 | https://github.com/securego/gosec/archive/refs/tags/v2.28.0.tar.gz |
| 最后更新 | 2026-07-14T12:15:33Z |
| Pulse | updated |
| 依赖 | go |
| Bottle | 可用 (于 arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, sonoma, x86_64_linux) |
| Homebrew post-install | 未定义 |
| 服务 | 未声明 |
注册表事实
| Source Database | Homebrew formula API |
|---|---|
| Tap | homebrew/core |
| Full Name | gosec |
| Version Scheme | 0 |
| Revision | 0 |
| Head Version | HEAD |
| Bottle Stable Root URL | https://ghcr.io/v2/homebrew/core |
| Deprecated | no |
| Disabled | no |
| Keg Only | no |
| URL Keys |
|
源数据库匹配
匹配项来自外部软件包管理器索引,并与本地 Automic Vault 软件包链接分开显示。
gosec
nix profile install nixpkgs#gosecgosec 2.23.0-r3
Go source code static analyzer, focusing on security
https://github.com/securego/gosec
sudo apk add gosecgosec 2.27.1-1.fc45
Go security checker
https://github.com/securego/gosec
sudo dnf install gosecgosec 2.27.1-1.1
CLI tool to scan the Go AST and SSA code representations for security problems
https://github.com/securego/gosec
sudo zypper install gosecgosec
sudo port install gosecmain/gosec
scoop install main/gosec来源线索
此页面由 av-web 从 scripts/generate-pkg-sqlite.py 生成的私有软件包 SQLite 工件提供。
View the package source record on GitHub.