Malicious repositories could configure their pre-commit for shell injection [here](pre_commit_sphinx/build_docs.py). Use either validation of paths or (preferably) avoid os.system altogether and call sphinx directly. When complete, report back in at [https://github.com/pre-commit/pre-commit.com/pull/362](https://github.com/pre-commit/pre-commit.com/pull/362)