forked from GreedyBear-Project/GreedyBear
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
150 lines (142 loc) · 4.02 KB
/
Copy pathpyproject.toml
File metadata and controls
150 lines (142 loc) · 4.02 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
[project]
name = "greedybear"
version = "3.5.1"
description = "Threat intelligence platform that extracts attack data from a T-Pot or a cluster of them and generates actionable live feeds."
readme = "README.md"
license = "MIT"
license-files = ["LICENSE"]
requires-python = ">=3.13,<3.14"
dependencies = [
# Django core
"Django~=5.2.13",
"djangorestframework~=3.17.1",
"django-rest-email-auth==5.0.0",
"django-ses~=4.7",
"django-q2~=1.10",
"croniter~=6.2",
"certego-saas==0.7.12",
# Server Gateway Interface
"gunicorn~=26.0",
# Data stores
# For ES compatibility, check https://github.com/elastic/elasticsearch-py#compatibility
"elasticsearch==9.4.0",
"psycopg[c]~=3.3",
# ML / data science
"scikit-learn~=1.8.0",
"pandas~=3.0",
"numpy~=2.4",
"joblib~=1.5",
"datasketch~=1.10",
# File Format Support
"feedparser~=6.0",
"stix2~=3.0",
# Utilities
"requests~=2.34",
"slack-sdk~=3.41",
]
[project.urls]
Repository = "https://github.com/GreedyBear-Project/GreedyBear"
Documentation = "https://github.com/GreedyBear-Project/GreedyBear/wiki"
Blog = "https://greedybear-project.github.io/"
[dependency-groups]
dev = [
"django-watchfiles~=1.4",
]
test = [
"coverage==7.14.0",
"django-test-migrations==1.5.0",
]
lint = [
"ruff==0.15.13",
]
[tool.uv]
# necessary because certego-saas transitively depends on djangorestframework-filters 1.0.0.dev2 (dev prerelease)
prerelease = "allow"
# necessary because certego-saas pins Markdown <3.4, but we want a current release for security fixes
override-dependencies = ["markdown==3.10.2"]
[tool.ruff]
extend-exclude = [
".github",
".idea",
".vscode",
".venv",
"venv",
"**/migrations/*",
]
include = ["*.py"]
indent-width = 4
line-length = 160
output-format = "full"
respect-gitignore = false
show-fixes = true
target-version = "py313"
[tool.ruff.format]
docstring-code-format = true
indent-style = "space"
line-ending = "lf"
quote-style = "double"
skip-magic-trailing-comma = false
[tool.ruff.lint]
select = [
"A", # flake8-builtins
"B", # flake8-bugbear
"C4", # flake8-comprehensions
"DJ", # flake8-django
"E", # pycodestyle errors
"F", # pyflakes
"FA", # flake8-future-annotations
"FLY", # flynt
"FURB",# refurb
"G", # flake8-logging-format
"I", # isort
"ICN", # flake8-import-conventions
"ISC", # flake8-implicit-str-concat
"LOG", # flake8-logging
"N", # pep8-naming
"NPY", # NumPy-specific rules
"PD", # pandas-vet
"PERF",# Perflint
"PGH", # pygrep-hooks
"PIE", # flake8-pie
"PTH", # flake8-use-pathlib
"RET", # flake8-return
"RUF", # Ruff-specific rules
"S", # flake8-bandit
"SIM", # flake8-simplify
"SLOT",# flake8-slots
"T20", # flake8-print
"TC", # flake8-type-checking
"TD", # flake8-todos
"TID", # flake8-tidy-imports
"TRY", # tryceratops
"UP", # pyupgrade
"W", # pycodestyle warnings
]
ignore = [
"G004", # allow use of f-strings in log messages for better readability
"RUF012", # allow mutable-class-defaults (Django convention)
"SIM108", # do not enforce use of ternary operator instead of if-else-block
"TRY003", # allow exception messages that are not defined in the exception class itself
]
[tool.ruff.lint.per-file-ignores]
# Re-exporting submodules with wildcard imports is intentional in package __init__.py files
"**/__init__.py" = ["F403"]
# Long parameter documentation lines in API view docstrings
"api/views/*" = ["E501"]
# Exclude tests from security checks
"tests/*" = ["S"]
# Misinterpreted regex
"greedybear/consts.py" = ["S105"]
# Dummy key for certego-saas compatibility and useful print statements
"greedybear/settings.py" = ["S105", "T201"]
# String-based query (no equvalent ORM call exists)
"greedybear/cronjobs/repositories/trending_bucket.py" = ["S608"]
# Print statements
"tests/test_runner.py" = ["T201"]
[tool.ruff.lint.isort]
known-first-party = [
"api",
"authentication",
"configuration",
"greedybear",
]