The full-project go test command executes repository code
Source references: 2The Skill explicitly recommends `go test -race ./...` and permits all `go` subcommands. This compiles and executes initialization logic, TestMain, and tests in every matching package; Go may also download missing modules according to the environment configuration.
In an untrusted or side-effect-heavy repository, tests could modify files, contact services, use local credentials, or consume substantial resources.
This command is an active checklist recommendation, not merely an evaluation example, and the tool declaration permits every `go` subcommand. If the agent runs `go test -race ./...`, it compiles and executes tests, `TestMain`, and relevant initialization code across matching packages, and Go may fetch dependencies according to its environment. Untrusted repository code could therefore run with the agent process's permissions. Users can require prior review of test entry points and restrict network, credentials, and filesystem writes.
install: []allowed-tools: Read Edit Write Glob Grep Bash(go:*) Bash(golangci-lint:*) Bash(git:*) Agent AskUserQuestionpaths:Show 1 other places
| `wg.Add` inside goroutine | Call `Add` before `go` — `Wait` may return early otherwise || Forgetting `-race` in CI | Always run `go test -race ./...` || Mutex held across I/O | Keep critical sections short |