go-security-vulnerability
Identify, assess, and fix security vulnerabilities in Go modules using govulncheck. Handle common vulnerabilities like JWT issues and ensure application stability during fixes.
- License 许可
- MIT
- 最近更新
- 2026-08-23
- Stars
- ★ 1
- Forks
- 0
01 前言 Front Matter
- name
- go-security-vulnerability
- metadata
- { "openclaw": { "emoji": "?", "install": [ { "id": "golang", "bins": [ "go" ], "kind": "script", "label": "Install Go", "script": "curl -L https://golang.org/dl/go1.21.5.linux-amd64.tar.gz | tar -C /usr/local -xzf -" } ], "requires": { "bins": [ "go" ] } } }
- description
- Identify, assess, and fix security vulnerabilities in Go modules using govulncheck. Handle common vulnerabilities like JWT issues and ensure application stability during fixes.
02 资源文件 1
- 参考文档_meta.json304 B
03 SKILL.md 正文
Go Security Vulnerability Skill
Use Go tooling to identify, assess, and fix security vulnerabilities in Go modules. This skill helps detect and remediate vulnerabilities while maintaining application functionality.
Vulnerability Detection
Scan for vulnerabilities in your Go project:
go install golang.org/x/vuln/cmd/govulncheck@latest
govulncheck ./...
Check specific modules for known vulnerabilities:
govulncheck -show verbose ./...
Assessment Process
- Identify Affected Packages: Determine which dependencies contain vulnerabilities
- Check Severity: Review the CVE details and potential impact
- Verify Usage: Confirm if the vulnerable functions are actually used in your code
- Plan Remediation: Choose the appropriate fix strategy
Common Fix Strategies
Direct Dependency Update
Update vulnerable packages to secure versions:
go get -u vulnerable/package@latest
go mod tidy
Transitive Dependency Handling
For vulnerabilities in transitive dependencies:
go mod why vulnerable/package # Understand why it's included
go mod edit -replace vulnerable/package=newer-version # Replace if needed
go mod tidy
Removal Strategy
If a dependency is unused or can be replaced:
- Remove direct imports of the vulnerable code
- Run
go mod tidyto clean up unused dependencies - Verify application functionality remains intact
Verification Steps
After applying fixes:
# Verify no vulnerabilities remain
govulncheck ./...
# Ensure application still builds
go build ./...
# Run tests to verify functionality
go test ./...
Common Vulnerabilities
JWT Libraries
- Issue:
github.com/golang-jwt/jwtGO-2025-3553 (excessive memory allocation) - Fix: Update to newer version or switch to
golang.org/x/oauth2alternatives
Standard Library Updates
- Keep Go version updated for security patches
- Run
go vulnto check for stdlib vulnerabilities
Best Practices
- Regularly scan dependencies with
govulncheck - Keep dependencies updated with
go get -u - Use
go mod tidyto remove unused dependencies - Test thoroughly after vulnerability fixes
- Monitor for new vulnerabilities with automated tools
04 同仓库更多 Skills
crowd-prompting
A marketplace where AI agents improve prompts, system instructions, tool descriptions, and other text-based content with domain expertise from real-world operations — and earn tokens for valuable contributions.
dilemm-ai
Compete in DilemmAI, the prisoner's dilemma AI arena at dilemm.ai. Use when an OpenClaw agent wants to create an account, design and submit strategy prompts for their bot, enter matchmaking, analyze historical matches and leaderboards, and iterate on bot strategy. Requires headless browser automation (no API available yet).
arxiv-paper-reviews
Interact with arXiv Crawler API to fetch papers, read reviews, and submit comments. Use when working with arXiv papers, fetching paper lists by date/category/interest, viewing paper details with comments, or submitting paper reviews via API at http://150.158.152.82:8000.
arxiv-paper-reviews
Interact with arXiv Crawler API to fetch papers, read reviews, and submit comments. Use when working with arXiv papers, fetching paper lists by date/category/interest, viewing paper details with comments, or submitting paper reviews via API at http://150.158.152.82:8000.
git-summary
Get a quick summary of the current Git repository including status, recent commits, branches, and contributors.
agent-constitution
Interact with AgentConstitution governance contracts on Base Sepolia. Check compliance, read rules, log actions, query governance state.