# Risk map — gotestyourself/gotestsum

> Canonical page: https://codevetter.com/unpack/gotestsum/risk-map

# Risk map — gotestyourself/gotestsum

Scanned commit 3cf14356a16c7931cfeacd7dfee585527618df3d (2026-04-14). Generated by codevetter codevetter 1.15.0 on 2026-10-02.

Source inspection; upstream code and tests were not executed.

Security-sensitive boundaries are primarily local executable invocation and user-selected filesystem paths. Source observations identify report truncation, scanner limits, mutable reporting state, and differences between ordinary and watch execution. Release tooling also downloads external programs or scripts. These are source-level observations and explicitly labeled hypotheses, not confirmed vulnerabilities or runtime reproductions.
- Raw commands, hooks, and Delve execute user-selected or PATH-resolved programs with local process privileges; hooks inherit os.Environ, and commandValue uses shlex.Split without automatically invoking a shell. — [cmd/main.go#L450-L457](https://github.com/gotestyourself/gotestsum/blob/3cf14356a16c7931cfeacd7dfee585527618df3d/cmd/main.go#L450-L457) [cmd/flags.go#L99-L103](https://github.com/gotestyourself/gotestsum/blob/3cf14356a16c7931cfeacd7dfee585527618df3d/cmd/flags.go#L99-L103) [cmd/handler.go#L160-L180](https://github.com/gotestyourself/gotestsum/blob/3cf14356a16c7931cfeacd7dfee585527618df3d/cmd/handler.go#L160-L180) [cmd/watch.go#L125-L138](https://github.com/gotestyourself/gotestsum/blob/3cf14356a16c7931cfeacd7dfee585527618df3d/cmd/watch.go#L125-L138)
- JSON, timing, JUnit, and rerun-report paths are passed to os.Create, which truncates existing files; the inspected writers do not constrain destinations to the repository root. — [cmd/handler.go#L118-L141](https://github.com/gotestyourself/gotestsum/blob/3cf14356a16c7931cfeacd7dfee585527618df3d/cmd/handler.go#L118-L141) [cmd/rerunfails.go#L196-L203](https://github.com/gotestyourself/gotestsum/blob/3cf14356a16c7931cfeacd7dfee585527618df3d/cmd/rerunfails.go#L196-L203)
- --skip-stmt rewrites package-loader source paths directly with os.Create, promotes slow subtests to root functions, and does not add imports; earlier file writes can precede a final missing-test error. — [cmd/tool/slowest/ast.go#L41-L53](https://github.com/gotestyourself/gotestsum/blob/3cf14356a16c7931cfeacd7dfee585527618df3d/cmd/tool/slowest/ast.go#L41-L53) [cmd/tool/slowest/ast.go#L64-L74](https://github.com/gotestyourself/gotestsum/blob/3cf14356a16c7931cfeacd7dfee585527618df3d/cmd/tool/slowest/ast.go#L64-L74) [cmd/tool/slowest/ast.go#L117-L138](https://github.com/gotestyourself/gotestsum/blob/3cf14356a16c7931cfeacd7dfee585527618df3d/cmd/tool/slowest/ast.go#L117-L138) [cmd/tool/slowest/slowest.go#L83-L84](https://github.com/gotestyourself/gotestsum/blob/3cf14356a16c7931cfeacd7dfee585527618df3d/cmd/tool/slowest/slowest.go#L83-L84)
- Both stream readers use bufio.NewScanner without increasing its token buffer; sufficiently large event or diagnostic lines can therefore terminate scanning with the wrapped scanner error. — [testjson/execution.go#L810-L837](https://github.com/gotestyourself/gotestsum/blob/3cf14356a16c7931cfeacd7dfee585527618df3d/testjson/execution.go#L810-L837) [testjson/execution.go#L841-L858](https://github.com/gotestyourself/gotestsum/blob/3cf14356a16c7931cfeacd7dfee585527618df3d/testjson/execution.go#L841-L858)
- JUnit HideSkippedTests mutates each Execution-owned Package by decrementing Total and clearing Skipped; because the hook runs afterward, its TESTS_TOTAL and TESTS_SKIPPED can reflect filtered state rather than the summary printed earlier. — [internal/junitxml/report.go#L124-L133](https://github.com/gotestyourself/gotestsum/blob/3cf14356a16c7931cfeacd7dfee585527618df3d/internal/junitxml/report.go#L124-L133) [testjson/execution.go#L561-L564](https://github.com/gotestyourself/gotestsum/blob/3cf14356a16c7931cfeacd7dfee585527618df3d/testjson/execution.go#L561-L564) [cmd/main.go#L338-L345](https://github.com/gotestyourself/gotestsum/blob/3cf14356a16c7931cfeacd7dfee585527618df3d/cmd/main.go#L338-L345) [cmd/handler.go#L175-L179](https://github.com/gotestyourself/gotestsum/blob/3cf14356a16c7931cfeacd7dfee585527618df3d/cmd/handler.go#L175-L179)
- Hypothesis: handler initialization errors deserve process/resource-cleanup review because run starts the child before creating the handler, returns before Wait on initialization failure, and defers handler.Close only after successful creation. (inferred) — [cmd/main.go#L287-L296](https://github.com/gotestyourself/gotestsum/blob/3cf14356a16c7931cfeacd7dfee585527618df3d/cmd/main.go#L287-L296) [cmd/handler.go#L118-L131](https://github.com/gotestyourself/gotestsum/blob/3cf14356a16c7931cfeacd7dfee585527618df3d/cmd/handler.go#L118-L131)
- Watch runSingle explicitly lacks rerun-fails support and omits IgnoreNonJSONOutputLines and the ordinary signal-derived exit-code branch; Unix Watch tests exclude Windows, whose terminal adapter disables shortcuts. — [cmd/watch.go#L62-L95](https://github.com/gotestyourself/gotestsum/blob/3cf14356a16c7931cfeacd7dfee585527618df3d/cmd/watch.go#L62-L95) [cmd/main.go#L297-L315](https://github.com/gotestyourself/gotestsum/blob/3cf14356a16c7931cfeacd7dfee585527618df3d/cmd/main.go#L297-L315) [internal/filewatcher/watch_unix_test.go#L1-L2](https://github.com/gotestyourself/gotestsum/blob/3cf14356a16c7931cfeacd7dfee585527618df3d/internal/filewatcher/watch_unix_test.go#L1-L2) [internal/filewatcher/term_windows.go#L5-L19](https://github.com/gotestyourself/gotestsum/blob/3cf14356a16c7931cfeacd7dfee585527618df3d/internal/filewatcher/term_windows.go#L5-L19)
- CircleCI verifies the downloaded GoReleaser archive checksum but pipes a remote lint installer into sh; the development Dockerfile also uses a remote installer and defaults to Go 1.18 despite go.mod requiring 1.24.0. — [.circleci/config.yml#L35-L42](https://github.com/gotestyourself/gotestsum/blob/3cf14356a16c7931cfeacd7dfee585527618df3d/.circleci/config.yml#L35-L42) [.circleci/config.yml#L85-L95](https://github.com/gotestyourself/gotestsum/blob/3cf14356a16c7931cfeacd7dfee585527618df3d/.circleci/config.yml#L85-L95) [.project/Dockerfile#L2-L15](https://github.com/gotestyourself/gotestsum/blob/3cf14356a16c7931cfeacd7dfee585527618df3d/.project/Dockerfile#L2-L15) [go.mod#L1-L3](https://github.com/gotestyourself/gotestsum/blob/3cf14356a16c7931cfeacd7dfee585527618df3d/go.mod#L1-L3)

Every claim links to its cited files at the pinned commit. Citations identify source evidence; they do not establish runtime correctness. Independent CodeVetter scan — not reviewed by upstream maintainers.

## Public product links

- [CodeVetter](https://codevetter.com/)
- [Download](https://codevetter.com/download)
- [Documentation](https://codevetter.com/docs/)
- [Source](https://github.com/Codevetter/codevetter)
