Commit Graph
1 Commits
Author SHA1 Message Date
Lie Ryan d677c08a07 Avoid using shell when spawning subprocess for git
This avoids security shenanigans that can come if your `git-commit-id`
may come from potentially untrusted source (e.g. an API), an attacker
could trick you to run shell commands like:

    ./manage.py lintmigrations --git-commit-id '; rm -rf dangerous'

or a malicious project may set a config like:

    [tool.django_migration_linter]
    git_commit_id = "; rm -rf dangerous"
2024-02-04 19:53:48 +01:00