From c85f8865c4014e900901d3b0e0e655223c12f7c2 Mon Sep 17 00:00:00 2001 From: Devasy Patel <110348311+Devasy23@users.noreply.github.com> Date: Sun, 24 Mar 2024 11:14:06 +0530 Subject: [PATCH] Exclude testing directory from flake8 hook --- .pre-commit-config.yaml | 1 + .pre-commit-security.yaml | 17 +++++++++++++++++ 2 files changed, 18 insertions(+) create mode 100644 .pre-commit-security.yaml diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 6d6d291..fe7d9a0 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -35,6 +35,7 @@ repos: rev: 7.0.0 hooks: - id: flake8 + exclude: testing/* - repo: https://github.com/pre-commit/mirrors-mypy rev: v1.9.0 hooks: diff --git a/.pre-commit-security.yaml b/.pre-commit-security.yaml new file mode 100644 index 0000000..64242b4 --- /dev/null +++ b/.pre-commit-security.yaml @@ -0,0 +1,17 @@ +repos: + - repo: https://github.com/PyCQA/bandit + rev: 1.7.0 + hooks: + - id: bandit + files: \.py$ # Run Bandit only on Python files + additional_dependencies: [toml] # Additional dependencies required by Bandit + args: [--skip, B101] # Skip Bandit test B101 (assert statements) + - repo: https://github.com/safepass-dev/safepass-pre-commit + rev: v0.1.0 + hooks: + - id: safepass + files: \.(py|yaml|yml|json)$ # Run Safepass on Python, YAML, and JSON files + - repo: https://github.com/pyupio/safety-hooks + rev: v2.0.3 + hooks: + - id: safety