默认运行项目测试会执行仓库中的代码
原文依据:1 处工作流要求运行 `go test ./...`,而不只是静态读取源码。Go 测试及其初始化代码会在用户机器上执行;若审查的是不可信或刚拉取的仓库,这超出了纯代码扫描。
恶意或有副作用的测试代码可能读取环境变量和本地文件、启动进程,或在允许网络时发送数据。
这是活跃工作流,不是示例:Skill 要求运行 `go test ./...`。该命令会编译并执行仓库中的测试、包初始化代码及测试进程调用的程序。对不可信仓库,这可能在用户权限下读取文件、使用凭据或访问网络。用户可要求仅做静态扫描,或在无凭据、无网络、受限文件系统的沙箱中测试。
4. **Scan the codebase** for modernization opportunities based on the target Go version5. **Run `golangci-lint`** with the `modernize` linter if available, and `go test ./...` — Go 1.27+ runs the `stdversion` vet check by default, flagging APIs newer than the module's `go` directive; bump the directive or revert the suggestion, don't ignore the hit6. **Suggest improvements contextually**: