chore: SHA-pin pre-commit hook revisions#86
Conversation
Pin ruff-pre-commit, actionlint, pre-commit-hooks, and detect-secrets to full commit SHAs instead of mutable version tags.
📝 WalkthroughWalkthroughThe Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
.pre-commit-config.yaml (1)
8-8: Ruff version bump (v0.14.3 → v0.15.9) may introduce new behavior.While the explicit rule selection in
pyproject.toml(lines 107-119) mitigates risk from newly promoted rules, a minor version jump of this magnitude could still include:
- Changes to existing rule behavior or severity
- Formatter output differences
- New deprecation warnings
If CI passes cleanly, this is likely fine. If you encounter unexpected lint failures or formatting changes, this upgrade is the likely cause.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In @.pre-commit-config.yaml at line 8, The pre-commit hook was bumped to Ruff rev c60c980e561ed3e73101667fe8365c609d19a438 (v0.15.9) which can introduce behavioral changes; verify and pin or adjust accordingly by running Ruff locally and in CI with the repo's current pyproject.toml rule set (the explicit rule selection in pyproject.toml lines ~107-119) to surface any new lint/format differences, and if you see unexpected failures either revert the rev to the previous stable commit, add a pinned version constraint in .pre-commit-config.yaml, or update pyproject.toml to explicitly disable/adjust any newly problematic rules before merging.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In @.pre-commit-config.yaml:
- Line 8: The pre-commit hook was bumped to Ruff rev
c60c980e561ed3e73101667fe8365c609d19a438 (v0.15.9) which can introduce
behavioral changes; verify and pin or adjust accordingly by running Ruff locally
and in CI with the repo's current pyproject.toml rule set (the explicit rule
selection in pyproject.toml lines ~107-119) to surface any new lint/format
differences, and if you see unexpected failures either revert the rev to the
previous stable commit, add a pinned version constraint in
.pre-commit-config.yaml, or update pyproject.toml to explicitly disable/adjust
any newly problematic rules before merging.
Summary
rev:values to full commit SHAs instead of mutable version tagspragma: allowlist secretto prevent detect-secrets false positives on SHA stringsWhy
Mutable tags are a supply chain attack vector — anyone with write access to the hook repo can move a tag to point at malicious code. SHA pins are immutable.
Test plan
Summary by CodeRabbit