Merged
Conversation
- 新增 backend/.gosec.yaml 配置文件,排除 G704 (SSRF) 检查 - 更新 security-scan.yml workflow,使用 gosec 配置文件 - 原因:作为 API 网关平台,需要代理请求到配置的上游服务,所有上游 URL 来自管理员配置而非用户输入
Contributor
There was a problem hiding this comment.
Pull request overview
This PR configures gosec to exclude G704 (SSRF via taint analysis) warnings, which are false positives for this API gateway platform.
Changes:
- Added gosec configuration file to exclude G704 rule with detailed justification comments
- Updated security scan workflow to use the new gosec configuration file
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| backend/.gosec.yaml | New gosec configuration file that excludes G704 (SSRF) checks with explanatory comments about why this is appropriate for an API gateway platform |
| .github/workflows/security-scan.yml | Updated gosec command to reference the new configuration file using the -conf flag |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Changes
backend/.gosec.yaml: 新增 gosec 配置文件,排除 G704 (SSRF) 检查规则,添加详细注释说明排除原因.github/workflows/security-scan.yml: 在 gosec 命令中添加-conf .gosec.yaml参数,使配置文件生效