-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
110 lines (98 loc) · 3.15 KB
/
Copy pathpyproject.toml
File metadata and controls
110 lines (98 loc) · 3.15 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
[project]
name = "pisces-scripts"
version = "1.1.0"
requires-python = ">=3.12"
dependencies = [
"requests>=2.31.0",
"python-dotenv>=1.2.2",
"pyyaml>=6.0.3",
"rich>=15.0.0",
"beautifulsoup4>=4.14.3",
"flask[async]>=3.0",
"orjson>=3.11.8",
"plotext>=5.3.2",
"pygments>=2.20.0",
"python-multipart>=0.0.26",
"httpx>=0.28.1",
]
[project.scripts]
# CLI tools
pisces-query = "src.querier.opensearch_querier:main"
pisces-enrich = "src.enricher.threat_intel:main"
pisces-mantis = "src.mantis.mantis_search:main"
pisces-mantis-index = "src.mantis.mantis_index:main"
pisces-mantis-report = "src.mantis.activity_report:main"
pisces-threat-model = "src.mantis.mantis_threat_model:main"
pisces-fleet-scan = "src.profiler.fleet_scanner:main"
pisces-profile = "src.profiler.device_profiler:main"
pisces-histogram = "src.querier.histogram_cli:main"
# Web servers (standalone)
pisces-all = "run_all:main"
pisces-opensearch = "apps.opensearch_web.run:main"
pisces-dashboard = "apps.dashboard_web.run:main"
pisces-hub = "apps.hub.run:main"
pisces-threat-model-web = "apps.threat_model.run:main"
pisces-mantis-explorer = "apps.mantis_explorer.run:main"
[project.optional-dependencies]
# AI assistant integration via MCP servers (Claude Code, Claude Desktop, kiro-cli)
mcp = ["mcp[cli]>=1.0.0"]
# NLP-enhanced ticket classification (spaCy dependency parsing, NER)
nlp = [
"spacy>=3.7",
]
# Offline ASN/BGP reputation lookup and GeoIP (requires data files)
# ASN: python -m pyasn.scripts.pyasn_util_download → data/asn_table.dat
# GeoIP: download GeoLite2-City.mmdb from MaxMind → data/
offline-enrichment = [
"pyasn>=1.6.2",
"geoip2>=5.2.0",
]
# Everything
all = [
"mcp[cli]>=1.0.0",
"spacy>=3.7",
"pyasn>=1.6.2",
"geoip2>=5.2.0",
]
[dependency-groups]
dev = [
"pyright>=1.1.408",
"pytest>=9.0.3",
"ruff>=0.15.11",
"bandit>=1.8.0",
"pip-audit>=2.10.0",
"pre-commit>=4.6.0",
"djlint>=1.36.4",
]
[tool.ruff]
target-version = "py312"
line-length = 100
[tool.ruff.lint]
select = ["E", "F", "W", "I"]
[tool.ruff.lint.per-file-ignores]
# E402: module-import-not-at-top — intentional in CLI scripts that use sys.path.insert() before imports
"src/mantis/mantis_index.py" = ["E402"]
"src/mantis/mantis_search.py" = ["E402"]
"src/mantis/mantis_threat_model.py" = ["E402"]
"src/querier/opensearch_querier.py" = ["E402"]
"src/enricher/threat_intel.py" = ["E402"]
"run_all.py" = ["E402"]
"*_web_run.py" = ["E402"]
"tests/*" = ["E402"]
"apps/*/run.py" = ["E402"]
"mcp_servers/*/server.py" = ["E402", "I001"]
"src/utils/banner.py" = ["E501"]
[tool.bandit]
exclude_dirs = ["tests", "data"]
skips = ["B101"]
[tool.djlint]
profile = "jinja"
indent = 2
max_line_length = 100
ignore = "H021,H023,H030,H031,J018"
# H021: inline styles are intentional in dashboard/chart templates
# H023: HTML entity references (· etc.) are standard and intentional
# H030/H031: meta description/keywords are false positives on Jinja child templates
# J018: cross-app internal links cannot use url_for() in a multi-app Flask setup
[tool.pytest.ini_options]
testpaths = ["tests"]