fix-gosec-bug-from-issue
Analyze, reproduce, and fix a gosec bug reported in a GitHub issue with a confirmation-gated workflow.
来源信息
- 仓库
- securego/gosec
- 最近来源活动
- 2026年2月28日 09:08
- 检测到的 SKILL.md 语言
- 英语
- 星标
- 8,963
- 分支
- 718
安装方式
默认使用会先检查来源的 Prompt;你也可以切换为直接命令,或下载本地副本。
检查来源文件
决定是否安装前,请先阅读 SKILL.md,以及 SkillsMP 当前展示的配套文件。
正在显示 SKILL.md
SKILL.md
来源说明 · 只读预览- name
- Fix Gosec Bug From Issue
- description
- Analyze, reproduce, and fix a gosec bug reported in a GitHub issue with a confirmation-gated workflow.
# Fix a gosec bug from a GitHub issue
Use this skill when you want to fix a bug described in a GitHub issue.
## Required input
Provide at least:
- GitHub issue URL
Optional but useful:
- gosec version
- Go version (`go version` output)
- OS and environment details
- extra reproduction notes
## Execution workflow
1. Review the GitHub issue thoroughly and extract the problem statement, reproduction hints, expected behavior, and actual behavior.
2. Try to reproduce the issue against the current `master` version of gosec.
3. Analyze the codebase and isolate the root cause.
4. Produce a detailed, minimal fix plan and stop. Ask for confirmation before changing code.
After confirmation, implement end-to-end:
1. Keep the fix small and isolated to the issue scope.
2. Follow good design principles and idiomatic Go.
3. Add tests for both positive and negative cases.
4. When a code sample is appropriate, add or update a sample in `testutils/` in the relevant rule sample file.
5. Validate the result:
- Build succeeds
- Relevant tests pass
- `golangci-lint` has no warnings in changed code
- `gosec` CLI run on a sample confirms the issue is fixed
## Output requirements
- First response must only contain:
- Reproduction status on `master` (or clear blocker)
- Root cause analysis
- Detailed fix plan
- Confirmation request
- Do not implement any code changes until confirmation is provided.
在 GitHub 查看