this post was submitted on 16 Aug 2024
20 points (100.0% liked)
VS Code
784 readers
1 users here now
founded 1 year ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
100%
I know a guy that considers git pre-commit hooks a form of code injection and thus a security risk. So he disables them on repos he works with. And to be fair, it’s absolutely a viable vector for attacking developer machines. I think a tasks.json fits into that exact same bucket.
These kinds of automations are suuuper useful and I do like to use them. But also review a code base before cloning!
Pre-commit hooks aren't committed to the repo though. What's to disable? Unless it's something like python's precommit module I guess
The configuration is often committed to the repo. And some repos heavily rely on the precommit actions running before you can push or have pipelines function correctly
You'd still need to manually install the git hooks though, the .git folder isn't part of the repo