"X is configured" and tool PASSes from a file's existence: buf.yaml without a lint section, Checkstyle with only NoHttpCheck, golangci `default: none` with staticcheck listed as disabled, gosec excluded for the only path

オープン
#249 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
30/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
活発
技術スタック
go, java, python, yaml
領域
security, tooling

調査の方向性

Start with the four analyzers named in the issue: the staticcheck pattern in ecosystems/go.py (around lines 185-189), the gosec and funlen handling that uses _golangci_enables, the BUF_LINT rule in project_validator/ecosystems/protobuf.py, and the Checkstyle check. Reproduce each false PASS against the small config snippets in the repro lines. Done means each validator reads the relevant section of its config, such as enabled linters or lint rules, and reports the true state, with tests for each case.

索引モデルが issue の本文から書いたものです。

説明

opentelemetry-proto: "buf lint is configured (buf.yaml) but does not run" — buf.yaml has only breaking:; spring-petclinic: static-analysis PASS on a Checkstyle whose only module flags http:// URLs; cli/cli: compiler-warnings PASS "go vet, staticcheck" though .golangci.yml starts from default: none and lists staticcheck under "to enable later"; protovalidate: security-scanning PASS on gosec that is enable-all but excluded for path: tools/, where every Go file lives. A defined_by(files=…) claim should check the relevant section, and linter configs should be read for enabled/disabled sets.

Evidence from the corpus audit

cli/cli / compiler-warnings
  • kind: FALSE_POSITIVE
  • actual: PASS (Go place): strict Go linters are enabled: go vet, staticcheck
  • expected: WARN/FAIL for Go: staticcheck is explicitly not enabled; the config starts from default: none and lists it under "To enable later".
  • evidence: .golangci.yml:3-4: linters: / default: none; :27-30: # To enable later due to too many issues, and confirm we need them: / # - gosec / # - staticcheck / # - errcheck
  • evidence (validator): ecosystems/go.py:185-189: # golangci-lint runs both by default. / pattern("staticcheck", rf"\bstaticcheck\b|{RUNS_GOLANGCI_LINT}"): any golangci-lint run is credited as staticcheck regardless of linters.default/linters.enable (the _golangci_enables logic used for gosec and funlen is not applied here).
  • repro: .golangci.yml with version: "2", linters: {default: none, enable: [govet]}; workflow step uses: golangci/golangci-lint-action@v9. Expect staticcheck missing.
  • confidence: high
spring-projects/spring-petclinic / static-analysis
  • kind: FALSE_POSITIVE
  • actual: JVM: Checkstyle (src/checkstyle/nohttp-checkstyle-suppressions.xml, src/checkstyle/nohttp-checkstyle.xml) runs (JVM part passes)
  • expected: WARN/FAIL for JVM: the Checkstyle configuration's only module is NoHttpCheck (flags http:// URLs), which is not static analysis of the code
  • evidence: src/checkstyle/nohttp-checkstyle.xml:6: <module name="io.spring.nohttp.checkstyle.check.NoHttpCheck"/>; pom.xml:236-242: <id>nohttp-checkstyle-validation</id> ... <goal>check</goal> ... <configLocation>src/checkstyle/nohttp-checkstyle.xml</configLocation>
  • repro: the same two files + run: ./mvnw -B verify
  • confidence: medium (the rule "Checkstyle runs" is met literally; the configuration content decides whether it analyses anything)
bufbuild/protovalidate / security-scanning
  • kind: FALSE_POSITIVE
  • actual: PASS: CI scans the code for security problems with golangci-lint's gosec
  • expected: FAIL/WARN: gosec is enabled by enable-all but excluded for path: tools/, and every Go file in the repository is under tools/ (the only Go module is tools/go.mod), so gosec reports nothing. (Caveat: the file says version: "2" but uses v1 keys linters-settings/issues.exclude-rules; whether v2.13.1 honours them is not verifiable here, but the validator did not consider the exclusion at all.)
  • evidence: .golangci.yml:57-63: issues: / exclude-rules: / - path: tools/ / linters: / - gosec / - forbidigo; go.work:1-3 lists only ./tools; map unit {"directory": "tools", "role": "tooling", "languages": ["Go"]} is the only Go unit.
  • repro: .golangci.yml with enable-all: true and issues.exclude-rules: [{path: ".", linters: [gosec]}].
  • confidence: medium
open-telemetry/opentelemetry-proto / static-analysis
  • kind: MESSAGE
  • actual: FAIL: Protobuf: buf lint is configured (buf.yaml) but does not run
  • expected: FAIL: buf lint does not run — but nothing configures it: buf.yaml has only a breaking: section; the "is configured" wording comes from rules=defined_by(files=("buf.yaml",)), which treats the file's existence as a lint configuration.
  • evidence: buf.yaml:1-6 (entire file): version: v1 / # See https://docs.buf.build/breaking/configuration / breaking: / use: / - WIRE; validator project_validator/ecosystems/protobuf.py BUF_LINT = analyzer(..., rules=defined_by(files=(BUF_SETTINGS.name,))).
  • repro: buf.yaml with only breaking: {use: [WIRE]} and no buf CI step.
  • confidence: medium

Found by the regression-corpus audit (235 real repositories, one or more per ecosystem profile; corpus and expected results in corpus/). Evidence is quoted from the audited checkouts at the commits pinned in corpus/projects.toml; <checkouts>/<owner>__<repo> is such a checkout.

🤖 Generated with Claude Code

https://claude.ai/code/session_01ByTXNqDWdM7HzezrFtEvQt

主要言語
Python
スター
4
フォーク
1
平均マージ
10時間 41分
マージ済み PR(30日)
79

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

cpp-best-practices/project_validator のほかの issue

cpp-best-practices/project_validator の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。