Repository navigation
feat(review): golangci-lint runs offline in the review sandbox - #2622
Merged
Merged
Conversation
Owner
Author
Test resultsFail-to-pass (
Local checks on the branch:
Premise checks
Live check: not runThis host has no Go toolchain (
The stderr in the coverage-gap test joins two parts:
It is not a recording of a real run. |
dan-petty
marked this pull request as ready for review
October 29, 2026 04:16
golangci-lint loads packages through the go command. The review sandbox has no network, a read-only tree and a PATH of system directories, so the scan now gives golangci-lint the toolchain and the module cache that `go env` names on the host, read-only, with the toolchain first on the PATH, and keeps the Go build cache and the golangci-lint cache outside the tree. GOPROXY=off and GOTOOLCHAIN=local keep the go command from fetching. A module whose modules are not in the module cache is a coverage gap that tells the person to run `go mod download`. BaseSecurityScanner gets the hooks tool_env and coverage_gap, and tree_cache_dir, which the Ruff cache now uses too. Refs #2129
dan-petty
force-pushed
the
feat/2129-golangci-lint-sandbox
branch
from
October 29, 2026 04:24
f16b787 to
297f9aa
Compare
dan-petty
pushed a commit
that referenced
this pull request
Oct 29, 2026
🤖 I have created a release *beep* *boop* --- ## [0.15.0](v0.14.0...v0.15.0) (2026-10-29) ### Features * **k8s:** derived push entries, Secret types, one stack list ([#2618](#2618)) ([3634c6f](3634c6f)), closes [#2008](#2008) * **k8s:** image-pins refuses an image on the latest tag ([#2617](#2617)) ([548b3ba](548b3ba)), closes [#2093](#2093) * **monitoring:** alert when a noeviction Valkey nears its bound ([#2615](#2615)) ([f452644](f452644)), closes [#2094](#2094) * **review:** golangci-lint runs offline in the review sandbox ([#2622](#2622)) ([20915ce](20915ce)), closes [#2129](#2129) * **review:** the SARIF export writes how each tool run ended ([#2620](#2620)) ([8f8ef44](8f8ef44)), closes [#2100](#2100) ### Bug Fixes * **release:** parse release pull request number safely in urgent merge ([#2621](#2621)) ([262244d](262244d)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: dan-petty-release[bot] <346998822+dan-petty-release[bot]@users.noreply.github.com>
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.
golangci-lint loads packages through the
gocommand. The review sandbox (#2096) has no network, a read-only tree and aPATHof system directories, so golangci-lint could not run there.go env -json GOROOT GOMODCACHEon the host, outside the tree, withGOTOOLCHAIN=local.binof the toolchain first on thePATH, and keepsGOCACHEandGOLANGCI_LINT_CACHEoutside the tree.GOPROXY=offandGOTOOLCHAIN=localstop all fetches. The request sets noGOFLAGS: the-mod=modof the issue ignoresvendor/and writesgo.modin the read-only tree.go mod download.BaseSecurityScannergets the hookstool_envandcoverage_gap, andtree_cache_dir, which the Ruff cache uses too.Closes #2129