-
Notifications
You must be signed in to change notification settings - Fork 152
Expand file tree
/
Copy pathpyproject.toml
More file actions
181 lines (161 loc) · 3.85 KB
/
pyproject.toml
File metadata and controls
181 lines (161 loc) · 3.85 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
[project]
name = "policy_sentry"
dynamic = ["version"]
description = "Generate locked-down AWS IAM Policies"
authors = [
{ name = "Kinnaird McQuade", email = "kinnairdm@gmail.com" }
]
license = "MIT"
license-files = ["LICENSE"]
keywords = ["aws", "iam", "roles", "policy", "policies", "privileges", "security"]
classifiers = [
"Operating System :: OS Independent",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
"Typing :: Typed"
]
readme = "README.md"
requires-python = ">=3.10"
dependencies = [
"beautifulsoup4>=4.14.0,<5.0.0",
"click>=8.1.0,<9.0.0",
"requests>=2.33.0,<3.0.0",
"schema>=0.7.0,<0.8.0",
"PyYAML>=6.0.0,<7.0.0",
"orjson>=3.11.0,<4.0.0",
]
[project.scripts]
policy_sentry = "policy_sentry.bin.cli:main"
[project.urls]
Homepage = "https://github.com/salesforce/policy_sentry"
Repository = "https://github.com/salesforce/policy_sentry"
Code = "https://github.com/salesforce/policy_sentry/"
Documentation = "https://policy-sentry.readthedocs.io/"
"Red Team Report" = "https://opensource.salesforce.com/policy_sentry"
Twitter = "https://twitter.com/kmcquade3"
[dependency-groups]
dev = [
"coverage>=7.13.0,<8.0.0",
"prek>=0.3.8,<0.4.0",
"pytest>=9.0.0,<10.0.0",
"rust-just>=1.48.0,<2.0.0",
"ty>=0.0.28,<0.1.0",
"types-beautifulsoup4>=4.12.0,<5.0.0",
"types-pyyaml>=6.0.12,<7.0.0",
"types-requests>=2.33.0,<3.0.0",
]
docs = [
# unique to ReadTheDocs
"atomicwrites>=1.4.0,<2.0.0",
"distlib>=0.4.0,<0.5.0",
"docutils>=0.22.0,<0.23.0",
"filelock>=3.25.0,<4.0.0",
"mkdocs>=1.6.0,<2.0.0",
"mkdocs-material>=9.7.0,<10.0.0",
"mkdocs-material-extensions>=1.3.0,<2.0.0",
"mkdocstrings>=1.0.0,<2.0.0",
"mkdocstrings-python>=2.0.0,<3.0.0",
"mkdocstrings-python-legacy>=0.2.0,<0.3.0",
"pygments>=2.19.0,<3.0.0",
"pymdown-extensions>=10.17.0,<11.0.0",
"pytkdocs>=0.16.0,<0.17.0",
# Trying to see if RTFD needs these
"markdown>=3.10.0,<4.0.0",
"markupsafe>=3.0.0,<4.0.0",
"jinja2>=3.1.0,<4.0.0",
"typed-ast>=1.5.0,<2.0.0",
]
[build-system]
# `uv_build` backend doesn't support build hooks yet https://github.com/astral-sh/uv/issues/14561
requires = ["hatchling"]
build-backend = "hatchling.build"
[tool.hatch.build.hooks.custom]
path = "hooks/minify_iam_data.py"
[tool.hatch.build.targets.sdist]
include = [
"/hooks",
"/policy_sentry",
"/test",
]
exclude = [
"/policy_sentry/shared/data/docs",
]
[tool.hatch.build.targets.wheel]
packages = ["policy_sentry"]
[tool.hatch.version]
path = "policy_sentry/bin/version.py"
[tool.ruff]
line-length = 120
target-version = "py310"
[tool.ruff.lint]
preview = true
select = [
"A",
"ANN",
"ARG",
"B",
"C4",
"E",
"F",
"FURB",
"I",
"ISC",
"LOG",
"N",
"PERF",
"PIE",
"PLE",
"PLW",
"PTH",
"PYI",
"RET",
"RUF",
"S",
"SIM",
"T10",
"TC",
"UP",
"W",
"YTT",
]
ignore = ["E501"] # ruff fromat takes care of it
fixable = ["I001"]
[tool.pytest]
strict = true
testpaths = [
"test",
"test/analysis",
"test/command",
"test/querying",
"test/util",
"test/writing",
]
norecursedirs = [
"_build",
"tmp*",
"__pycache__",
]
[tool.coverage.report]
omit = [
"policy_sentry/shared/awsdocs.py",
# omit anything in a .local directory anywhere
"*/.local/*",
"*/virtualenv/*",
"*/venv/*",
"*/.venv/*",
"*/docs/*",
"*/examples/*",
"utils/*",
]
[tool.uv]
required-version = "~=0.11.0"
[tool.ty.environment]
python-version = "3.10"
[tool.ty.src]
include = ["examples", "policy_sentry", "utils"]
[tool.ty.rules]
unused-ignore-comment = "error"