Docker: hadolint run through the `hadolint-docker` pre-commit hook is not credited

オープン 初心者向け
#260 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

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

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

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
62/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
docker, python, shell
領域
devtools

調査の方向性

project_validator/ecosystems/docker/tools.py の hadolint パターン(30行目付近の _HADOLINT_RUNS マッチャー)と、project_validator/tools/pre_commit.py の48行目付近にある、(hook id, *words) を組み立てる argv の構築から始めてください。フック ID の hadolint-docker は hadolint として認識される必要があるため、マッチャーは既存の hadolint プログラムに加えてこれを受け入れなければなりません。jupyter/docker-stacks のコーパスケースで hadolint が実行中と報告され、テストスイートが引き続き通ったら完了です。

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

説明

jupyter/docker-stacks runs hadolint on every Dockerfile via the hadolint/hadolint repo's hadolint-docker hook, and CI runs pre-commit (the validator credits shellcheck, shfmt, black, ruff, flake8, mypy, basedpyright and markdownlint from the same file), yet static-analysis FAILs "hadolint is configured (.hadolint.yaml) but does not run" and security-scanning WARNs. The hook's expansion yields an argv (a docker run hadolint/hadolint … entry) that the hadolint pattern does not match.

Evidence from the corpus audit

jupyter/docker-stacks / static-analysis (Docker), security-scanning (Docker)
  • kind: FALSE_NEGATIVE
  • actual: FAIL: Docker: hadolint is configured (.hadolint.yaml) but does not run; WARN security-scanning: Docker: no
    code security scanning found in CI configuration
  • expected: PASS: hadolint runs on every Dockerfile through the hadolint-docker pre-commit hook, and CI runs
    pre-commit (the validator credits shellcheck, shfmt, black, ruff, flake8, mypy, basedpyright, markdownlint from the
    same file). The hook expansion yields argv ("hadolint-docker",), which does not match the hadolint program.
  • evidence: .pre-commit-config.yaml:113: - repo: https://github.com/hadolint/hadolint; :116:
    - id: hadolint-docker (and again at :122-125); .github/workflows/pre-commit.yml runs pre-commit;
    validator project_validator/tools/pre_commit.py:48: Invocation(argv=(str(hook["id"]), *words), ...);
    project_validator/ecosystems/docker/tools.py:30: _HADOLINT_RUNS = starts(("hadolint",)).
  • repro: .pre-commit-config.yaml with repo https://github.com/hadolint/hadolint, hook hadolint-docker;
    .hadolint.yaml; a step uses: pre-commit/action@<sha>; a Dockerfile.
  • confidence: high

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 を短くまとめたダイジェスト。