-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
167 lines (151 loc) · 4.45 KB
/
Copy pathpyproject.toml
File metadata and controls
167 lines (151 loc) · 4.45 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
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[project]
name = "scanipy-oss"
dynamic = ["version"]
description = "Local, private, taint-tracking SAST for your code — the open-source edition of scanipy."
readme = "README.md"
requires-python = ">=3.10"
license = "Apache-2.0"
license-files = ["LICENSE", "NOTICE"]
authors = [{ name = "The scanipy contributors" }]
keywords = [
"sast",
"security",
"static-analysis",
"taint-analysis",
"vulnerability",
"scanner",
"python",
"appsec",
]
classifiers = [
"Development Status :: 3 - Alpha",
"Environment :: Console",
"Intended Audience :: Developers",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Topic :: Security",
"Topic :: Software Development :: Quality Assurance",
"Typing :: Typed",
]
dependencies = [
"click>=8.2",
"rich>=13.7",
"pyyaml>=6.0",
]
[project.optional-dependencies]
dev = [
"pytest>=8",
"pytest-cov>=5",
"ruff>=0.5",
"mypy>=1.10",
"types-PyYAML",
"pre-commit>=3.7",
"build>=1.2",
]
[project.urls]
Homepage = "https://github.com/scanipy/scanipy-oss"
Repository = "https://github.com/scanipy/scanipy-oss"
Documentation = "https://github.com/scanipy/scanipy-oss/tree/main/docs"
Issues = "https://github.com/scanipy/scanipy-oss/issues"
"scanipy Cloud" = "https://scanipy.com"
[project.scripts]
scanipy = "scanipy.cli:main"
# ---------------------------------------------------------------------------
# Hatchling — build backend (src layout)
# ---------------------------------------------------------------------------
[tool.hatch.version]
path = "src/scanipy/__init__.py"
[tool.hatch.build.targets.wheel]
packages = ["src/scanipy"]
[tool.hatch.build.targets.sdist]
include = [
"/src",
"/docs",
"/tests",
"/README.md",
"/LICENSE",
"/NOTICE",
"/CHANGELOG.md",
]
# ---------------------------------------------------------------------------
# Ruff — linter + formatter
# ---------------------------------------------------------------------------
[tool.ruff]
line-length = 100
target-version = "py310"
src = ["src", "tests"]
# tests/fixtures holds intentionally-vulnerable sample programs (the true/false
# positive corpus). They are analysis DATA, not project code — never lint them.
extend-exclude = ["tests/fixtures"]
[tool.ruff.lint]
select = [
"E", # pycodestyle errors
"W", # pycodestyle warnings
"F", # pyflakes
"I", # isort
"N", # pep8-naming
"UP", # pyupgrade
"B", # flake8-bugbear
"S", # flake8-bandit (we are a security tool — eat our own dog food)
"C4", # flake8-comprehensions
"PTH", # flake8-use-pathlib
"RUF", # ruff-specific
]
[tool.ruff.lint.per-file-ignores]
# Tests use asserts (S101) and don't need the bandit suite.
"tests/**" = ["S"]
[tool.ruff.lint.isort]
known-first-party = ["scanipy"]
[tool.ruff.format]
quote-style = "double"
indent-style = "space"
line-ending = "lf"
# ---------------------------------------------------------------------------
# Mypy — strict type checking on the package source
# ---------------------------------------------------------------------------
[tool.mypy]
python_version = "3.10"
strict = true
mypy_path = "src"
explicit_package_bases = true
warn_unused_ignores = true
warn_redundant_casts = true
show_error_codes = true
pretty = true
# click/rich decorators are not fully typed; don't fail the build on them.
disallow_untyped_decorators = false
# ---------------------------------------------------------------------------
# Pytest
# ---------------------------------------------------------------------------
[tool.pytest.ini_options]
pythonpath = ["."]
minversion = "8.0"
testpaths = ["tests"]
addopts = ["--strict-markers", "-q"]
markers = [
"unit: fast unit tests (no I/O)",
"integration: integration tests (real components, slower)",
]
# ---------------------------------------------------------------------------
# Coverage
# ---------------------------------------------------------------------------
[tool.coverage.run]
source = ["scanipy"]
branch = true
omit = ["*/tests/*"]
[tool.coverage.report]
show_missing = true
fail_under = 90
exclude_lines = [
"pragma: no cover",
"if TYPE_CHECKING:",
"raise NotImplementedError",
"@abstractmethod",
]