Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.vscode/
.DS_Store
.idea
40 changes: 40 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
---

fail_fast: false
minimum_pre_commit_version: "3.0.0"

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: f71fa2c1f9cf5cb705f73dffe4b21f7c61470ba9 # frozen: v4.4.0
hooks:
- id: check-added-large-files
- id: check-case-conflict
- id: check-merge-conflict
- id: check-executables-have-shebangs
- id: check-json
- id: check-symlinks
- id: check-vcs-permalinks
- id: check-xml
- id: check-yaml
- id: mixed-line-ending
- id: trailing-whitespace

- repo: https://github.com/PyCQA/bandit
rev: ca4faf2f82a7c68a088100f8ba2b8e56f9bdcfe3 # frozen: 1.7.5
hooks:
- id: bandit
description: 'Bandit is a tool for finding common security issues in Python code'
additional_dependencies: [ "bandit[toml]" ]
args: ["-c", "pyproject.toml"]

- repo: https://github.com/psf/black
rev: bf7a16254ec96b084a6caf3d435ec18f0f245cc7 # frozen: 23.3.0
hooks:
- id: black
language_version: python3.10

- repo: https://github.com/pycqa/isort
rev: dbf82f2dd09ae41d9355bcd7ab69187a19e6bf2f # frozen: 5.12.0
hooks:
- id: isort
name: isort
20 changes: 19 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,32 @@ include = [
[tool.poetry.scripts]
tf-policy-validator = "iam_check.iam_check:main"

[tool.bandit]
exclude_dirs = ["iam_check/test"]

# Styling and linting Configurations
[tool.isort]
profile = "black"
line_length = 120

[tool.black]
line-length = 120
target-version = ["py310"]

[tool.poetry.dependencies]
python = "^3.8"
boto3 = "^1.26.77"
pyyaml = "^6.0"

[tool.poetry.test.group.test.dependencies]
pytest = "^7.2.1"

[tool.poetry.group.dev.dependencies]
pytest = "^7.2.1"
isort = {extras = ["toml"], version = "^5.12.0"}
black = "^22.12.0"

[tool.poetry.group.security.dependencies]
bandit = {extras = ["toml"], version = "^1.7.5"}

[build-system]
requires = ["poetry-core"]
Expand Down