diff options
author | 2024-07-30 19:18:25 +0200 | |
---|---|---|
committer | 2024-07-30 19:18:25 +0200 | |
commit | 38032a201a53d651fc6bf6313fcca33e3f1335b6 (patch) | |
tree | cea6af3a8acfe573c446ab1ab48f8922393cb250 | |
parent | Allow access to /usr/include for compiled dependencies (diff) |
Allow access to gitconfig for pre-commit
-rw-r--r-- | poetry_restrict_plugin/plugin.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/poetry_restrict_plugin/plugin.py b/poetry_restrict_plugin/plugin.py index 4077a46..fb4d509 100644 --- a/poetry_restrict_plugin/plugin.py +++ b/poetry_restrict_plugin/plugin.py @@ -85,6 +85,10 @@ class RestrictPlugin(Plugin): pre_commit_cache = os.path.expanduser("~/.cache/pre-commit") if os.path.exists(pre_commit_cache): ruleset.allow(pre_commit_cache) + ruleset.allow( + *existing_paths((".gitconfig", os.path.expanduser("~/.config/git/config"))), + rules=FSAccess.READ_FILE, + ) # Allow manipulation of files in our projects, e.g. for linters. # We might need to check this more thoroughly. For instance, configuring custom |