Unexpected version picked by pre-commit autoupdate
See original GitHub issuedescribe your issue
Hello! I’m setting up pre-commit
for a terraform repo I’m working on, and I want to integrate https://github.com/bridgecrewio/checkov as a hook. This tool already has a pre-commit
config file, so this should be pretty straightforward.
The strange behavior I seem to be running into is that when I run pre-commit autoupdate
instead of updating to what seems to be the latest tagged release - https://github.com/bridgecrewio/checkov/releases/tag/2.0.780 - it’s instead updating to an older tagged release - https://github.com/bridgecrewio/checkov/releases/tag/1.0.505 - and I don’t quite understand why.
For example, if I manually set a newer tag and then run autoupdate:
pre-commit autoupdate
Updating https://github.com/pre-commit/pre-commit-hooks ... [INFO] Initializing environment for https://github.com/pre-commit/pre-commit-hooks.
updating v3.2.0 -> v4.1.0.
Updating https://github.com/oasys/checkov ... [INFO] Initializing environment for https://github.com/oasys/checkov.
updating 2.0.780 -> 1.0.505.
This just seems odd, though of course it’s possible (or likely) that I’m simply not understanding something, or using the tool incorrectly. Thank you for taking a look!
pre-commit --version
pre-commit 2.17.0
.pre-commit-config.yaml
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.1.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
- id: check-added-large-files
- repo: https://github.com/oasys/checkov
rev: 1.0.505
hooks:
- id: checkov
verbose: true
~/.cache/pre-commit/pre-commit.log (if present)
<not present>Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (2 by maintainers)
Top GitHub Comments
Confirmed that was the issue:
So I’m all set. Oops.
Oh, wow. Definitely a facepalm moment, I grabbed the config from the example in the original PR at https://github.com/bridgecrewio/checkov/pull/522 which must have been based on the author’s fork. Which totally explains the tag discrepancy. Thanks so much, I totally missed that.