Repository navigation
Description
Problem or Motivation
The tools lock pins golangci-lint 1.64.8, the last v1 release (#5065 takes 1.64.6 to 1.64.8). The newest release is 2.15.0. Renovate (#4893) will offer the major, and the review fails with it:
- v2 removes
--out-format(use--output.sarif.path=stdout) and--disable-all(use--default=none). - The config needs
version: "2",linters.default: none, andlinters.settingsin place oflinters-settings. - The adapter (
src/devops_cli/security/golangci_lint.py,build_command) passes--out-format sarifand--disable-all. The review config (CONST_REVIEW_SCAN_GOLANGCI_LINT_CONFIGinsrc/devops_cli/config/constants.py) usesdisable-allandlinters-settings. - golangci-lint 1.64.8 refuses a config with
version: "2", so the config and the pin move together.
Research of 2026-11-12 (research-ci, record tool:golangci-lint (v2)).
Proposed Solution & Architectural Design
tools.lockand the.devcontainer/Dockerfiletools stage: golangci-lint 2.15.0. Each sha256 below was computed from a download and equals the release asset digest:- linux-amd64
golangci-lint-2.15.0-linux-amd64.tar.gzmembergolangci-lint-2.15.0-linux-amd64/golangci-lint, sha2569b7fe6a6bf6334b98decf8d86b11415ea7889afdabdd1959fdce23af2a9ebcea - linux-arm64
golangci-lint-2.15.0-linux-arm64.tar.gz, sha256b4d8f17068b35ee6060cc2f69a16fb48740d706fbba81661c318649c114a6998 - darwin-amd64
golangci-lint-2.15.0-darwin-amd64.tar.gz, sha256767b899a28285e88ded2823d5dcc4bc5ef681173eb2d80f029a7b17ee4ece3b8 - darwin-arm64
golangci-lint-2.15.0-darwin-arm64.tar.gz, sha256d1e409481a8ca846c4bc97e781eb5cb1bd5c23353a0b3977a1cbda1b1b6447d5 - URL prefix:
https://github.com/golangci/golangci-lint/releases/download/v2.15.0/
- linux-amd64
build_command:--output.sarif.path=stdoutand--default=none.- The review config in the v2 form (
golangci-lint migratewrites it). - Tests:
tests/security/test_golangci_lint_scanner.py,tests/security/test_review_pipeline_go.py, and the recorded run of the review canary if one exists.
Done when the review of a Go tree gives the same SARIF findings with 2.15.0 as with 1.64.8.
Target Subsystem
Security & Vulnerability Scanners
Existing Tool Considered
golangci-lint itself: golangci-lint migrate converts the v1 config. No new code.
Source: #4893
Alternatives check of 2026-11-25: in-use.
The repository already uses this tool.
Tool: golangci/golangci-lint (https://github.com/golangci/golangci-lint), GPL-3.0, last activity 2026-11-24, maintained.
Reason: Searches found golangci-lint 2.15.0 itself, already the repository's Go linter, and its v2 release supplies the replacement flags, SARIF output and a migrate command for the config, so no other tool covers the need.
Covers:
- v2 flags --output.sarif.path=stdout and --default=none
- SARIF report written to stdout
golangci-lint migrateconverts the v1 YAML config- YAML config with version 2, linters.default and linters.settings
Lacks:
- No automated v1-to-v2 findings comparison
- No recorded Go canary output in the repository
- v2 binary refuses a v1 config, so pin and config move together
- Adapter flag edits in build_command stay manual
Proposed design
Problem statement
The review adapter still passes golangci-lint v1 flags (--out-format sarif, --disable-all) at src/devops_cli/security/golangci_lint.py:226 and :234, and CONST_REVIEW_SCAN_GOLANGCI_LINT_CONFIG still holds v1 YAML at src/devops_cli/config/constants.py:691. The golangci-lint 2.15.0 of the devtools image refuses both, so a Go review stops instead of giving findings. This change moves build_command and the review config to v2 and updates the Go scanner tests. No pin moves: tools.lock was deleted by #6555 and the devtools image gives the scanner version. A live Go scan waits on a go toolchain that the image lacks, and #7091 records the v2 canary.
Acceptance criteria
Requirement: Scan command uses v2 flags
GolangciLintScanner.build_command SHALL pass --output.sarif.path=stdout for every scan and --default=none before the --enable of each named linter, and MUST NOT pass --out-format or --disable-all.
Scenario: Default scan command
- WHEN the test
test_golangci_lint_build_commandrunsGolangciLintScanner.build_commandwith the default linters - THEN the command holds
run,--output.sarif.path=stdout,--default=noneand one--enablefor each oferrcheck,govetandstaticcheck, and holds no--out-formatand no--disable-all.
Requirement: Review config is v2
CONST_REVIEW_SCAN_GOLANGCI_LINT_CONFIG SHALL hold the v2 form of the v1 review config, with version: "2" and linters.default: none, and MUST hold no linters-settings key, no disable-all key and no linters.enable list.
Scenario: Review config keys
- WHEN a test parses the
CONST_REVIEW_SCAN_GOLANGCI_LINT_CONFIGconstant as YAML - THEN
versionis the string2,linters.defaultisnone,linters.settingsis a mapping,lintersholds noenablekey and nodisable-allkey, and the document holds nolinters-settingskey.
Requirement: Devtools binary verifies the review config
The golangci-lint 2.15.0 of the devtools image SHALL accept the review config, and golangci-lint config verify MUST exit 0 on it.
Scenario: Config verify on the review config
- WHEN the live test marked
@pytest.mark.live("golangci-lint")writesCONST_REVIEW_SCAN_GOLANGCI_LINT_CONFIGto a temporary.golangci.ymland runsgolangci-lint config verify -c <file> - THEN the command exits 0 and prints no error.
Requirement: Parse a v2 SARIF document
GolangciLintScanner.parse_output SHALL return the findings of a SARIF 2.1.0 document that golangci-lint 2.15.0 writes.
Scenario: Parse a v2 SARIF document
- WHEN a test hands
parse_outputa SARIF 2.1.0 document whose driver version is2.15.0and holds one result - THEN it returns one
Findingfor that result, with the result's file, line and message, and no parse error.
Requirement: Go scanner tests cover v2
The Go scanner tests SHALL assert the v2 command and parse a v2 SARIF document, and MUST NOT assert --out-format or --disable-all.
Scenario: Go scanner test suite
- WHEN
uv run pytest tests/security/test_golangci_lint_scanner.pyruns - THEN the suite passes, and
test_golangci_lint_build_commandholds--output.sarif.path=stdoutand--default=noneand holds no--out-formatand no--disable-all.
Existing Tool Considered
golangci/golangci-lint (https://github.com/golangci/golangci-lint, maintained), the Go linter the repository already runs. The alternatives check of 2026-11-25 in the issue body gives the verdict in-use, and its block records what the tool lacks. This change uses the tool's v2 flags, golangci-lint migrate and golangci-lint config verify, edits build_command and the review config by hand, and adds no new tool or library code. The gaps that the block records stay with #7091.
Key questions
- Which v2 flags replace
--out-format sarifand--disable-all?:--output.sarif.path=stdoutreplaces--out-format sarif, and--default=nonereplaces--disable-all. The v2 release supplies both flags, andparse_outputreads the SARIF document from stdout. The reviewer's run ofgolangci-lint run --output.sarif.path=stdout --default=noneon the 2.15.0 binary accepted the flags and stopped only on the missinggobinary. (best practice) [sources: src/devops_cli/security/golangci_lint.py:226, src/devops_cli/security/golangci_lint.py:234, https://github.com/golangci/golangci-lint]- Chosen:
--output.sarif.path=stdoutand--default=none. The v2 release supplies both replacements, andparse_outputreads the SARIF document from stdout. - Rejected: Keep
--out-formatand--disable-all. golangci-lint 2.x removed both flags, so the scan stops at argument parsing. - Rejected:
--output.sarif.path=<file>.parse_outputreads stdout, so a file path loses the findings. - Rejected: Add
--output.text.path=to disable a text format. The issue's research record and the reviewer's verified command name only--output.sarif.path=stdout, so the change adds no flag that no source records.
- Chosen:
- How does the review config reach the v2 form?: Run
golangci-lint migrateon the v1 config with 2.15.0, then remove thelinters.enablelist that migrate copies fromdisable-allandenable, becausebuild_commandnames the linter set. The result holdsversion: "2",linters.default: noneandlinters.settingswithgovet.enable: [lostcancel]. (best practice) [sources: src/devops_cli/config/constants.py:691, https://github.com/golangci/golangci-lint]- Chosen:
golangci-lint migrateoutput, with thelinters.enablelist removed. The tool writes the v2 key names, and the command line stays the only source of the linter set. - Rejected:
golangci-lint migrateoutput as it is. The copiedlinters.enablelist would add errcheck, govet and staticcheck to a scan that names another set. - Rejected: A hand-written v2 config. A missed key rename gives a config that the binary refuses or that drops a setting.
- Rejected: Keep the v1 config and stay on 1.64.8. The devtools image ships 2.15.0, and a v2 binary refuses the v1 config.
- Chosen:
- Does the linter list stay on the command line?: Yes.
build_commandpasses--default=noneand one--enablefor each linter of itslintersargument. The review config holds nolinters.enablelist. (best practice) [sources: src/devops_cli/security/golangci_lint.py:229, src/devops_cli/security/golangci_lint.py:233]- Chosen:
--default=noneand--enableon the command line. The linter list comes from the call, and the review config adds no linter to it. - Rejected:
linters.enablein the review config. It fixes one list for every scan and adds linters to a call that names another set.
- Chosen:
- Where is the golangci-lint version set now?: In the devtools image, not in this repository.
.devcontainer/Dockerfileand the rootDockerfilebuild FROMghcr.io/dan-petty/devtools:1.1.12pinned by digest, and ADR 0031 records that the project's Dockerfile pins no scanner and that a scanner version changes in the devtools image. The reply of 2026-11-20 reports that image's/usr/local/bin/golangci-lintas 2.15.0.tools.lockno longer exists: refactor(deps): delete install-tools and the tools lock #6555 deleted it andinstall-tools(CHANGELOG.md:840). [sources: docs/adr/0031-review-scanners-run-in-the-runner-pod.md:29, docs/adr/0031-review-scanners-run-in-the-runner-pod.md:35, CHANGELOG.md:840] - How does the change check the v2 scan when the runner image holds no
gobinary?: The devtools 1.1.12 image holds golangci-lint 2.15.0 but nogobinary; the reviewer's check of the image found none.GolangciLintScanner._executereturnsScanOutcome("failed", [], "Binary 'go' not found on PATH")whengois absent.gois in neitherRUNNER_TOOLSnorNOT_IN_RUNNER, so a test marked@pytest.mark.live("golangci-lint", "go")failstest_each_binary_of_a_live_marked_test_is_held_or_left_out_with_a_reason. This change checks the command and the SARIF parsing with offline tests, and checks the config with the livegolangci-lint config verifyof the image. The live Go scan and the v1 comparison go to test(security): record a Go review canary for golangci-lint v2 #7091. (best practice) [sources: src/devops_cli/security/golangci_lint.py:161, src/devops_cli/roadmap/runner_tools.py:168, src/devops_cli/roadmap/runner_tools.py:245, tests/roadmap/test_roadmap_runner_tools.py:158]- Chosen: Offline command and SARIF tests and a live
golangci-lint config verify. Both run today: the offline tests need no toolchain, and the 2.15.0 binary of the image verifies the config. - Rejected: A live scan of a Go fixture. The image holds no
gobinary, so the scan returnsBinary 'go' not found on PATHand writes no SARIF. - Rejected: Add
gotoRUNNER_TOOLSorNOT_IN_RUNNER.RUNNER_TOOLSwould name a binary that the image lacks, andNOT_IN_RUNNERstill leaves the live Go scan out.
- Chosen: Offline command and SARIF tests and a live
- Does a pin move with the config?: No pin moves in this repository.
tools.lockwas deleted by refactor(deps): delete install-tools and the tools lock #6555, and the scanner version comes from the devtools image, which already holds golangci-lint 2.15.0. This change moves the config and the command together. (best practice) [sources: CHANGELOG.md:840, docs/adr/0031-review-scanners-run-in-the-runner-pod.md:35]- Chosen: Move the config and the command, and leave the image pin. ADR 0031 puts the scanner version in the devtools image, and that image already holds 2.15.0.
- Rejected: Move
tools.lockand the.devcontainer/Dockerfiletools stage to 2.15.0. The file and the stage no longer exist: refactor(deps): delete install-tools and the tools lock #6555 deletedtools.lockandinstall-tools, and the Dockerfile copies no golangci-lint binary.
- Does
tools.lockhold a golangci-lint pin that must move with the config?: No. The commit holds notools.lockand nosrc/devops_cli/tools_lock/directory: refactor(deps): delete install-tools and the tools lock #6555 deletedinstall-toolsand the tools lock (CHANGELOG.md:840). The 1.64.8 pin that the issue body names is stale, so no pin moves with the config. [sources: CHANGELOG.md:840]
Fit
Fits in one pull request.
Suspected block
None.
Dependencies
None.
Activity
dan-petty commentedon Nov 12, 2026
Both items work on the golangci-lint SARIF adapter in the review pipeline, but #603 adds the adapter while this candidate upgrades it from v1 flags and config to v2.build(deps): take every safe version update before Renovate (#5102)
devops-cli-service commentedon Nov 16, 2026
Waiting for the alternatives check to run. The next refine round looks at the item again after the check records a verdict.
devops-cli-service commentedon Nov 18, 2026
The result in the alternatives block of the issue body changed. Before this check: no check. A person decides what the new result means for the item.
Searches (7)
Tools considered:
Searches run:
Sources:
devops-cli-service commentedon Nov 18, 2026
Status set to Ready at 4624bc7 (see proposed design in issue body).
7 remaining items
dan-petty commentedon Nov 25, 2026
Returning #5072 for re-scoping because the live Go module scan requirement cannot run in
ghcr.io/dan-petty/devtools:1.1.12or the runner image:.devcontainer/Dockerfile:10and container binaries (find /usr /opt /home -maxdepth 4 -type f -name goreturned nothing):/usr/local/bin/golangci-lintis2.15.0, but nogotoolchain binary is installed indevtools:1.1.12.src/devops_cli/security/golangci_lint.py:161:GolangciLintScanner._executecheckscheck_binary(BIN_GO)and returnsScanOutcome("failed", [], "Binary 'go' not found on PATH")whenevergois absent./usr/local/bin/golangci-lint run --output.sarif.path=stdout --default=none --enable=errcheck --enable=govet --enable=staticcheck: whilegolangci-lint config verifyexits0on the migrated v2 YAML config,golangci-lint runexits3withexec: "go": executable file not found in $PATHand writes no SARIF document on stdout.src/devops_cli/roadmap/runner_tools.pyandtests/roadmap/test_roadmap_runner_tools.py:158:golangci-lintis inRUNNER_TOOLS, whilegois in neitherRUNNER_TOOLSnorNOT_IN_RUNNER, so marking a test@pytest.mark.live("golangci-lint", "go")failstest_each_binary_of_a_live_marked_test_is_held_or_left_out_with_a_reason.Please re-scope the
SARIF on stdoutacceptance criterion to either rely on offlineToolExecutorFake/parse_outputtests (keeping onlygolangci-lint config verifyas thedevtools:1.1.12live check) or addgotodevtools/NOT_IN_RUNNER.devops-cli-service commentedon Nov 25, 2026
Next step: the stage job writes the plan of the item. See Moved to new items in the section Proposed design of the body.
chore(main): release 0.219.0 (#7177)
devops-cli-service commentedon Nov 25, 2026
Released in v0.219.0: https://github.com/dan-petty/devops-cli/releases/tag/v0.219.0
devops-cli-service commentedon Nov 25, 2026
Live since 2026-11-25 17:09 UTC