|
| 1 | +[project] |
| 2 | +name = "http" |
| 3 | +version = "4.0.0" |
| 4 | +description = "This App facilitates making HTTP requests as actions" |
| 5 | +license = "Copyright (c) 2025 Splunk Inc." |
| 6 | +requires-python = ">=3.9, <3.14" |
| 7 | +authors = [ |
| 8 | +] |
| 9 | +dependencies = [ |
| 10 | + "splunk-soar-sdk==1.6.0", |
| 11 | + "validators", |
| 12 | + "xmltodict", |
| 13 | +] |
| 14 | + |
| 15 | +[dependency-groups] |
| 16 | +dev = [ |
| 17 | + "coverage>=7.6.7,<8", |
| 18 | + "mypy>=1.2.0,<2", |
| 19 | + "pre-commit>=4.2.0,<5", |
| 20 | + "pytest>=7.4.2,<8", |
| 21 | + "pytest-mock>=3.14.0,<4", |
| 22 | + "pytest-watch>=4.2.0,<5", |
| 23 | + "ruff>=0.11.6,<1", |
| 24 | +] |
| 25 | + |
| 26 | +[tool.soar.app] |
| 27 | +main_module = "src.app:app" |
| 28 | + |
| 29 | +[[tool.uv.index]] |
| 30 | +url = "https://pypi.python.org/simple" |
| 31 | + |
| 32 | +[tool.uv] |
| 33 | +environments = [ |
| 34 | + "sys_platform == 'linux' and platform_machine == 'x86_64' and python_version == '3.9'", |
| 35 | + "sys_platform == 'linux' and platform_machine == 'aarch64' and python_version == '3.9'", |
| 36 | + "sys_platform == 'darwin' and platform_machine == 'x86_64' and python_version == '3.9'", |
| 37 | + "sys_platform == 'darwin' and platform_machine == 'arm64' and python_version == '3.9'", |
| 38 | + "sys_platform == 'linux' and platform_machine == 'x86_64' and python_version == '3.13'", |
| 39 | + "sys_platform == 'linux' and platform_machine == 'aarch64' and python_version == '3.13'", |
| 40 | + "sys_platform == 'darwin' and platform_machine == 'x86_64' and python_version == '3.13'", |
| 41 | + "sys_platform == 'darwin' and platform_machine == 'arm64' and python_version == '3.13'", |
| 42 | +] |
| 43 | +required-environments = [ |
| 44 | + "sys_platform == 'linux' and platform_machine == 'x86_64' and python_version == '3.9'", |
| 45 | + "sys_platform == 'linux' and platform_machine == 'x86_64' and python_version == '3.13'", |
| 46 | +] |
| 47 | + |
| 48 | +[tool.ruff] |
| 49 | +output-format = "full" # <full|concise> |
| 50 | +fix = true |
| 51 | +target-version = "py39" |
| 52 | + |
| 53 | +[tool.ruff.lint] |
| 54 | +select = [ |
| 55 | + "ERA", # commented out code |
| 56 | + "YTT", # bad use of sys.version_info |
| 57 | + "S", # security issues |
| 58 | + "B", # bugbear |
| 59 | + "A", # builtins |
| 60 | + "DTZ", # datetime footguns |
| 61 | + "T10", # breakpoints |
| 62 | + "ISC", # implicit string concatenation |
| 63 | + "PT", # pytest style |
| 64 | + "SIM", # simplify |
| 65 | + "PTH", # use pathlib |
| 66 | + "E", # pycodestyle errors |
| 67 | + "F", # pyflakes |
| 68 | + "W", # pycodestyle warnings |
| 69 | + "PL", # pylint |
| 70 | + "UP", # pyupgrade |
| 71 | + "RUF", # ruff's own rules |
| 72 | +] |
| 73 | +ignore = [ |
| 74 | + "E402", # Module level import not at top of file. |
| 75 | + "E501", # Line too long. Format covers this. |
| 76 | + "PT006", # Opinions about types for pytest.parametrize |
| 77 | + "PT007", # Opinions about types for pytest.parametrize |
| 78 | + "PTH123", # Allow builtin open() |
| 79 | + "PLR", # pylint refactors |
| 80 | +] |
| 81 | + |
| 82 | +# Allow unused variables when underscore-prefixed. |
| 83 | +dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$" |
| 84 | + |
| 85 | +[tool.ruff.lint.per-file-ignores] |
| 86 | +"tests/**/*" = [ |
| 87 | + "ANN", # Disable flake8-annotations rules for test files |
| 88 | + "S", # Disable flake8-bandit rules for test files |
| 89 | +] |
| 90 | +"src/**/*" = [ |
| 91 | + "PT", # Disable pytest rules for src files |
| 92 | +] |
| 93 | + |
| 94 | +[tool.ruff.lint.pyupgrade] |
| 95 | +# Preserve types, even if a file imports `from __future__ import annotations`. |
| 96 | +# This is necessary since we rely on runtime type annotations in our code and in pydantic |
| 97 | +keep-runtime-typing = true |
| 98 | + |
| 99 | +[tool.ruff.format] |
| 100 | +docstring-code-format = true |
| 101 | + |
| 102 | +# HTML linting |
| 103 | +[tool.djlint] |
| 104 | +profile = "django" |
| 105 | +extension = "html" |
| 106 | +indent = 2 |
| 107 | + |
| 108 | +# Auto-fixable rules only |
| 109 | +include = "H008,H009,H010,H014,H024,H026,H033,T028,T034" |
| 110 | + |
| 111 | +# Ignore troublesome rules that aren't auto-fixable or causing issues |
| 112 | +ignore = "D004,D018,H005,H006,H007,H011,H012,H013,H015,H016,H017,H019,H020,H021,H022,H023,H025,H029,H030,H031,H035,H036,H037,J004,J018,T001,T002,T003,T027,T032" |
| 113 | + |
| 114 | +# Markdown linting |
| 115 | +[tool.mdformat] |
| 116 | +wrap = true |
| 117 | +number = true |
| 118 | + |
| 119 | +# Semgrep configuration |
| 120 | +[tool.semgrep] |
| 121 | +config = [ |
| 122 | + "p/python", # Built-in Python rules |
| 123 | + "semgrep", # Look for our other rules |
| 124 | + "r/typescript.react.security.audit.react-dangerouslysetinnerhtml.react-dangerouslysetinnerhtml" # TypeScript React security rule |
| 125 | +] |
| 126 | +ignore-patterns = [ |
| 127 | + "dist/", |
| 128 | + "vendor/", |
| 129 | + "env/", |
| 130 | + ".env/", |
| 131 | + "venv/", |
| 132 | + ".venv/", |
| 133 | + "test/", |
| 134 | + "tests/", |
| 135 | + ".semgrep", |
| 136 | + "wheels/", |
| 137 | + ".html", |
| 138 | + ".md", |
| 139 | + ".svg" |
| 140 | +] |
| 141 | + |
1 | 142 | [tool.black] |
2 | 143 | line-length = 145 |
3 | 144 | target-version = ['py39'] |
|
0 commit comments