Go Vulnerability Scanner

VerifiedSafe

Runs a vulnerability scan for Go projects using govulncheck, detecting known vulnerabilities (CVEs) in both direct and indirect dependencies. Helps with regular security checks or CI/CD integration by reporting severity levels and suggesting update actions.

Sby Skills Guide Bot
SecurityIntermediate
1106/2/2026
Claude Code
#go#vulnerability-scanning#govulncheck#security

Recommended for

Our review

Scans a Go project for known vulnerabilities using govulncheck, reporting severity and suggested fixes.

Strengths

  • Uses govulncheck which only reports vulnerabilities in actually called code paths, reducing false positives.
  • Provides clear severity levels and recommended upgrade commands.
  • Integrates easily into CI/CD pipelines.

Limitations

  • Only detects vulnerabilities in Go dependencies, not other languages or custom code.
  • Requires govulncheck to be installed (automated but requires internet access).
  • May not cover all CVEs if the vulnerability database is not fully updated.
When to use it

Use when you need to identify and fix known security vulnerabilities in Go dependencies before deployment or as part of regular maintenance.

When not to use it

Do not use for non-Go projects or when you need a comprehensive static analysis beyond dependency vulnerabilities.

Security analysis

Safe
Quality score92/100

The skill runs standard govulncheck commands to scan for vulnerabilities; no destructive or exfiltrating actions.

No concerns found

Examples

Scan Go project vulnerabilities
Run a vulnerability scan on this Go project using govulncheck
Check for CVEs
Check for any known vulnerabilities in my Go dependencies
Security audit of Go code
Perform a security scan on this Go project and suggest fixes

name: scan-vuln description: Go プロジェクトの脆弱性スキャンを実行する。「脆弱性スキャン」「govulncheck」「セキュリティチェック」「脆弱性確認」「vuln」「CVE チェック」「セキュリティスキャン」などで起動。govulncheck を使用して既知の脆弱性を検出。 allowed-tools: [Read, Bash, Glob, Grep]

Scan-Vuln

Go プロジェクトの脆弱性スキャンを実行します。govulncheck を使用して既知の脆弱性を検出。

引数

  • --json: JSON 形式で出力
  • --help: ヘルプを表示

実行手順

1. govulncheck のインストール確認

which govulncheck || go install golang.org/x/vuln/cmd/govulncheck@latest

2. 脆弱性スキャン実行

# 基本的なスキャン
govulncheck ./...

# JSON 形式で出力
govulncheck -json ./...

# バイナリのスキャン
govulncheck -mode=binary ./bin/app

3. 結果レポート

## 脆弱性スキャン結果

### 検出された脆弱性: {N} 件

#### GO-2024-XXXX (Critical)
- **パッケージ**: github.com/xxx/yyy
- **バージョン**: v1.2.3
- **説明**: {脆弱性の説明}
- **影響を受けるコード**: {ファイル:行}
- **修正バージョン**: v1.2.4

#### GO-2024-YYYY (High)
- **パッケージ**: github.com/aaa/bbb
- **バージョン**: v2.0.0
- **説明**: {脆弱性の説明}
- **修正バージョン**: v2.0.1

### 推奨アクション
1. `go get -u github.com/xxx/yyy@v1.2.4`
2. `go get -u github.com/aaa/bbb@v2.0.1`
3. `go mod tidy`
4. `go test ./...` で動作確認

脆弱性の深刻度

| レベル | 説明 | |--------|------| | Critical | 即座に対応が必要、リモートコード実行など | | High | 早急に対応が必要、データ漏洩など | | Medium | 計画的に対応、DoS など | | Low | 時間があるときに対応 |

脆弱性対応フロー

  1. 検出: govulncheck ./... で脆弱性を検出
  2. 評価: 実際にコードで使用されているか確認
  3. 更新: 修正バージョンへ更新
  4. テスト: 更新後の動作確認
  5. デプロイ: 本番環境へ反映

CI/CD への統合

# GitHub Actions の例
- name: Run govulncheck
  run: |
    go install golang.org/x/vuln/cmd/govulncheck@latest
    govulncheck ./...

重要な注意事項

  • ✅ 定期的に govulncheck を実行して新しい脆弱性を検出
  • ✅ 脆弱性修正のための更新後は、必ずテストを実行
  • ✅ govulncheck は実際に呼び出されるコードパスのみを報告するため、誤検知が少ない
  • ✅ 間接依存の脆弱性も検出される
Related skills