This is an automated email from the ASF dual-hosted git repository.

jiayu pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sedona.git


The following commit(s) were added to refs/heads/master by this push:
     new 0646cefcc [CI] Add pre-commit hook `bandit` to find Python security 
issues (#1634)
0646cefcc is described below

commit 0646cefcc448cd3d2fede199ce4f34b342a1b448
Author: John Bampton <[email protected]>
AuthorDate: Tue Oct 15 02:15:51 2024 +1000

    [CI] Add pre-commit hook `bandit` to find Python security issues (#1634)
    
    https://github.com/PyCQA/bandit
    
    
https://bandit.readthedocs.io/en/latest/start.html#version-control-integration
    
    https://bandit.readthedocs.io/en/latest/config.html
    
    This PR is skipping four bandit tests.
    
    
https://bandit.readthedocs.io/en/latest/plugins/index.html#complete-test-plugin-listing
---
 .pre-commit-config.yaml | 5 +++++
 pyproject.toml          | 3 +++
 2 files changed, 8 insertions(+)

diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index d4e9edbe8..f84f612d5 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -19,6 +19,11 @@ repos:
     hooks:
       - id: isort
         name: isort (python)
+  - repo: https://github.com/PyCQA/bandit
+    rev: 1.7.10
+    hooks:
+      - id: bandit
+        args: ["-c=pyproject.toml", "-r"]
   - repo: https://github.com/codespell-project/codespell
     rev: v2.3.0
     hooks:
diff --git a/pyproject.toml b/pyproject.toml
index 5d7bf33d9..70bf8ffed 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -1,2 +1,5 @@
+[tool.bandit]
+skips = ["B101", "B403", "B405", "B608"]
+
 [tool.isort]
 profile = "black"

Reply via email to