How is #precommit even a thing?

pre-commit.com/

There's apparently _no_ security whatsoever. It just downloads random code from the internet and runs it on your machine.

And everyone with write access to the repo can just tell it to download _more_ code.

Compare this to direnv (direnv.net), which will ask you for permission every time someone changes its config.

#Python #security

Als Antwort auf scy

I don't even get why somebody wants to run these things as pre-commit. This means that every developer has to configure the same pre-commit hooks locally and nothing is enforced.

What is the advantage over having a shell-script or Makefile that has a check (and fix) target, that is part of the repository, runs in CI to enforce it and can be run locally.