suriharvest 0.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- suriharvest-0.1.0/LICENSE +21 -0
- suriharvest-0.1.0/NOTICE +46 -0
- suriharvest-0.1.0/PKG-INFO +139 -0
- suriharvest-0.1.0/README.md +95 -0
- suriharvest-0.1.0/pyproject.toml +126 -0
- suriharvest-0.1.0/pyproject.toml.orig +96 -0
- suriharvest-0.1.0/src/suriharvest/__init__.py +3 -0
- suriharvest-0.1.0/src/suriharvest/__main__.py +8 -0
- suriharvest-0.1.0/src/suriharvest/catalog/health.yaml +185 -0
- suriharvest-0.1.0/src/suriharvest/catalog/sid-allocation.tsv +32 -0
- suriharvest-0.1.0/src/suriharvest/catalog/sources.yaml +1041 -0
- suriharvest-0.1.0/src/suriharvest/catalog_check.py +240 -0
- suriharvest-0.1.0/src/suriharvest/cli.py +1887 -0
- suriharvest-0.1.0/src/suriharvest/cli_help.py +107 -0
- suriharvest-0.1.0/src/suriharvest/config.py +440 -0
- suriharvest-0.1.0/src/suriharvest/dataset_files.py +171 -0
- suriharvest-0.1.0/src/suriharvest/db.py +144 -0
- suriharvest-0.1.0/src/suriharvest/export.py +599 -0
- suriharvest-0.1.0/src/suriharvest/export_formats.py +180 -0
- suriharvest-0.1.0/src/suriharvest/identity.py +817 -0
- suriharvest-0.1.0/src/suriharvest/index.py +648 -0
- suriharvest-0.1.0/src/suriharvest/ingest.py +223 -0
- suriharvest-0.1.0/src/suriharvest/licences/0BSD.txt +5 -0
- suriharvest-0.1.0/src/suriharvest/licences/AGPL-3.0-only.txt +235 -0
- suriharvest-0.1.0/src/suriharvest/licences/Apache-2.0.txt +73 -0
- suriharvest-0.1.0/src/suriharvest/licences/BSD-2-Clause.txt +9 -0
- suriharvest-0.1.0/src/suriharvest/licences/BSD-3-Clause.txt +11 -0
- suriharvest-0.1.0/src/suriharvest/licences/BSD-4-Clause.txt +14 -0
- suriharvest-0.1.0/src/suriharvest/licences/CC-BY-3.0.txt +319 -0
- suriharvest-0.1.0/src/suriharvest/licences/CC-BY-4.0.txt +156 -0
- suriharvest-0.1.0/src/suriharvest/licences/CC-BY-NC-SA-4.0.txt +170 -0
- suriharvest-0.1.0/src/suriharvest/licences/CC-BY-SA-3.0.txt +359 -0
- suriharvest-0.1.0/src/suriharvest/licences/CC-BY-SA-4.0.txt +170 -0
- suriharvest-0.1.0/src/suriharvest/licences/CC0-1.0.txt +121 -0
- suriharvest-0.1.0/src/suriharvest/licences/EPL-1.0.txt +73 -0
- suriharvest-0.1.0/src/suriharvest/licences/EPL-2.0.txt +80 -0
- suriharvest-0.1.0/src/suriharvest/licences/EUPL-1.1.txt +157 -0
- suriharvest-0.1.0/src/suriharvest/licences/EUPL-1.2.txt +190 -0
- suriharvest-0.1.0/src/suriharvest/licences/GPL-2.0-only.txt +117 -0
- suriharvest-0.1.0/src/suriharvest/licences/GPL-3.0-only.txt +232 -0
- suriharvest-0.1.0/src/suriharvest/licences/ISC.txt +8 -0
- suriharvest-0.1.0/src/suriharvest/licences/LGPL-2.1-only.txt +176 -0
- suriharvest-0.1.0/src/suriharvest/licences/LGPL-3.0-only.txt +304 -0
- suriharvest-0.1.0/src/suriharvest/licences/MIT.txt +9 -0
- suriharvest-0.1.0/src/suriharvest/licences/MPL-2.0.txt +373 -0
- suriharvest-0.1.0/src/suriharvest/licences/Python-2.0.txt +72 -0
- suriharvest-0.1.0/src/suriharvest/licences/Unlicense.txt +10 -0
- suriharvest-0.1.0/src/suriharvest/licences/Zlib.txt +11 -0
- suriharvest-0.1.0/src/suriharvest/lock.py +88 -0
- suriharvest-0.1.0/src/suriharvest/majors.py +257 -0
- suriharvest-0.1.0/src/suriharvest/migrations/env.py +26 -0
- suriharvest-0.1.0/src/suriharvest/migrations/script.py.mako +23 -0
- suriharvest-0.1.0/src/suriharvest/migrations/versions/0001_baseline_schema.py +361 -0
- suriharvest-0.1.0/src/suriharvest/migrations/versions/0002_logic_group_values.py +46 -0
- suriharvest-0.1.0/src/suriharvest/models.py +304 -0
- suriharvest-0.1.0/src/suriharvest/overrides.py +409 -0
- suriharvest-0.1.0/src/suriharvest/parser.py +456 -0
- suriharvest-0.1.0/src/suriharvest/pipeline.py +325 -0
- suriharvest-0.1.0/src/suriharvest/portable.py +74 -0
- suriharvest-0.1.0/src/suriharvest/profiles.py +1076 -0
- suriharvest-0.1.0/src/suriharvest/project.py +50 -0
- suriharvest-0.1.0/src/suriharvest/release.py +1136 -0
- suriharvest-0.1.0/src/suriharvest/release_extras.py +219 -0
- suriharvest-0.1.0/src/suriharvest/ruleopts.py +89 -0
- suriharvest-0.1.0/src/suriharvest/runs.py +369 -0
- suriharvest-0.1.0/src/suriharvest/search.py +292 -0
- suriharvest-0.1.0/src/suriharvest/sidalloc.py +113 -0
- suriharvest-0.1.0/src/suriharvest/sidmap.py +307 -0
- suriharvest-0.1.0/src/suriharvest/sidmap_check.py +314 -0
- suriharvest-0.1.0/src/suriharvest/site/__init__.py +222 -0
- suriharvest-0.1.0/src/suriharvest/site/static/site.js +125 -0
- suriharvest-0.1.0/src/suriharvest/site/templates/site_404.html +5 -0
- suriharvest-0.1.0/src/suriharvest/site/templates/site_base.html +53 -0
- suriharvest-0.1.0/src/suriharvest/site/templates/site_changes.html +21 -0
- suriharvest-0.1.0/src/suriharvest/site/templates/site_index.html +48 -0
- suriharvest-0.1.0/src/suriharvest/site/templates/site_notice.html +6 -0
- suriharvest-0.1.0/src/suriharvest/site/templates/site_search.html +14 -0
- suriharvest-0.1.0/src/suriharvest/site/templates/site_sources.html +18 -0
- suriharvest-0.1.0/src/suriharvest/site/templates/site_validation.html +12 -0
- suriharvest-0.1.0/src/suriharvest/summary.py +692 -0
- suriharvest-0.1.0/src/suriharvest/suricata_update_conf.py +160 -0
- suriharvest-0.1.0/src/suriharvest/sync.py +852 -0
- suriharvest-0.1.0/src/suriharvest/triage.py +32 -0
- suriharvest-0.1.0/src/suriharvest/urls.py +60 -0
- suriharvest-0.1.0/src/suriharvest/userregex.py +61 -0
- suriharvest-0.1.0/src/suriharvest/validate.py +756 -0
- suriharvest-0.1.0/src/suriharvest/web/__init__.py +0 -0
- suriharvest-0.1.0/src/suriharvest/web/app.py +2301 -0
- suriharvest-0.1.0/src/suriharvest/web/downloads.py +123 -0
- suriharvest-0.1.0/src/suriharvest/web/jobs.py +102 -0
- suriharvest-0.1.0/src/suriharvest/web/static/app.js +198 -0
- suriharvest-0.1.0/src/suriharvest/web/static/favicon.svg +1 -0
- suriharvest-0.1.0/src/suriharvest/web/static/fonts/Archivo-Display.woff2 +0 -0
- suriharvest-0.1.0/src/suriharvest/web/static/fonts/Archivo-OFL.txt +93 -0
- suriharvest-0.1.0/src/suriharvest/web/static/fonts/AtkinsonHyperlegibleMono-OFL.txt +93 -0
- suriharvest-0.1.0/src/suriharvest/web/static/fonts/AtkinsonHyperlegibleMono.woff2 +0 -0
- suriharvest-0.1.0/src/suriharvest/web/static/fonts/AtkinsonHyperlegibleNext-OFL.txt +93 -0
- suriharvest-0.1.0/src/suriharvest/web/static/fonts/AtkinsonHyperlegibleNext.woff2 +0 -0
- suriharvest-0.1.0/src/suriharvest/web/static/fonts/README.md +14 -0
- suriharvest-0.1.0/src/suriharvest/web/static/harvest-base.css +493 -0
- suriharvest-0.1.0/src/suriharvest/web/static/icons.svg +33 -0
- suriharvest-0.1.0/src/suriharvest/web/static/style.css +396 -0
- suriharvest-0.1.0/src/suriharvest/web/static/theme.js +10 -0
- suriharvest-0.1.0/src/suriharvest/web/templates/_ui.html +79 -0
- suriharvest-0.1.0/src/suriharvest/web/templates/about.html +104 -0
- suriharvest-0.1.0/src/suriharvest/web/templates/base.html +79 -0
- suriharvest-0.1.0/src/suriharvest/web/templates/builds.html +67 -0
- suriharvest-0.1.0/src/suriharvest/web/templates/error.html +23 -0
- suriharvest-0.1.0/src/suriharvest/web/templates/exclusions.html +89 -0
- suriharvest-0.1.0/src/suriharvest/web/templates/export.html +120 -0
- suriharvest-0.1.0/src/suriharvest/web/templates/job.html +12 -0
- suriharvest-0.1.0/src/suriharvest/web/templates/jobs.html +26 -0
- suriharvest-0.1.0/src/suriharvest/web/templates/onboarding.html +15 -0
- suriharvest-0.1.0/src/suriharvest/web/templates/overview.html +133 -0
- suriharvest-0.1.0/src/suriharvest/web/templates/profiles.html +37 -0
- suriharvest-0.1.0/src/suriharvest/web/templates/rule.html +147 -0
- suriharvest-0.1.0/src/suriharvest/web/templates/run.html +31 -0
- suriharvest-0.1.0/src/suriharvest/web/templates/search.html +148 -0
- suriharvest-0.1.0/src/suriharvest/web/templates/source.html +61 -0
- suriharvest-0.1.0/src/suriharvest/web/templates/sources.html +34 -0
- suriharvest-0.1.0/src/suriharvest/web/ui.py +636 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 suriharvest contributors
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
suriharvest-0.1.0/NOTICE
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
suriharvest
|
|
2
|
+
Copyright (c) 2026 suriharvest contributors
|
|
3
|
+
|
|
4
|
+
The suriharvest source code (src/, scripts/, tests/, docs/) is released under the MIT License; see LICENSE.
|
|
5
|
+
|
|
6
|
+
Third-party rules
|
|
7
|
+
-----------------
|
|
8
|
+
suriharvest does not include third-party Suricata rules in this repository. It downloads them from the sources
|
|
9
|
+
listed in src/suriharvest/catalog/sources.yaml, each under its publisher's own licence (recorded per source in
|
|
10
|
+
that file and shown on the Sources page of `suriharvest serve`). Rules keep their publisher's licence; they are not relicensed
|
|
11
|
+
under MIT.
|
|
12
|
+
|
|
13
|
+
Release archives built by suriharvest (`suriharvest release build`, the nightly GitHub release) redistribute
|
|
14
|
+
only sources whose licence allows it, and ship with:
|
|
15
|
+
- NOTICE.md the sources in that build, their licences, and the publishers' copyright notices verbatim
|
|
16
|
+
(for example Emerging Threats Open and OISF rules);
|
|
17
|
+
- LICENSES/ the full licence texts that apply to those sources.
|
|
18
|
+
|
|
19
|
+
Licence texts bundled with the package
|
|
20
|
+
--------------------------------------
|
|
21
|
+
src/suriharvest/licences/ holds unmodified copies of the standard licence texts (SPDX license-list-data: 0BSD,
|
|
22
|
+
AGPL-3.0-only, Apache-2.0, BSD-2-Clause, BSD-3-Clause, BSD-4-Clause, CC-BY-3.0, CC-BY-4.0, CC-BY-SA-3.0,
|
|
23
|
+
CC-BY-SA-4.0, CC-BY-NC-SA-4.0, CC0-1.0, EPL-1.0, EPL-2.0, EUPL-1.1, EUPL-1.2, GPL-2.0-only, GPL-3.0-only, ISC,
|
|
24
|
+
LGPL-2.1-only, LGPL-3.0-only, MIT, MPL-2.0, Python-2.0, Unlicense, Zlib) so that release archives can carry
|
|
25
|
+
them. Each text remains under its own terms. `release build` stops when a published source names a licence whose
|
|
26
|
+
text is not bundled here.
|
|
27
|
+
|
|
28
|
+
Bundled third-party material
|
|
29
|
+
----------------------------
|
|
30
|
+
src/suriharvest/web/static/fonts/: the fonts of the web UI and the static site, under the SIL Open Font License
|
|
31
|
+
1.1 (the licence texts ship next to them):
|
|
32
|
+
- Atkinson Hyperlegible Next, Copyright 2020-2024 The Atkinson Hyperlegible Next Project Authors
|
|
33
|
+
(AtkinsonHyperlegibleNext-OFL.txt);
|
|
34
|
+
- Atkinson Hyperlegible Mono, Copyright 2020-2024 The Atkinson Hyperlegible Mono Project Authors
|
|
35
|
+
(AtkinsonHyperlegibleMono-OFL.txt);
|
|
36
|
+
- Archivo, Copyright 2020 The Archivo Project Authors (Archivo-OFL.txt).
|
|
37
|
+
src/suriharvest/catalog/sid-allocation.tsv: a copy of the sid allocation table of https://sidallocation.org/
|
|
38
|
+
(https://github.com/sidallocation/sidallocation.org, which states no licence), fetched 2026-11-14. It records
|
|
39
|
+
facts (sid ranges and the publishers they are allocated to), used to keep a publisher's sids with it; the file's
|
|
40
|
+
first line names the source.
|
|
41
|
+
src/suriharvest/release_extras.py: the default reference.config entries (URL prefixes such as "bugtraq",
|
|
42
|
+
"cve", "url") as Suricata ships them (GPL-2.0, https://github.com/OISF/suricata), a short factual list.
|
|
43
|
+
|
|
44
|
+
Test fixtures: tests/acceptance/fixtures/ holds small synthetic rules written for the tests (licence
|
|
45
|
+
noted in each fixture);
|
|
46
|
+
tests/fixtures/oisf-index.yaml is an excerpt of the public OISF suricata-update source index (free entries only).
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: suriharvest
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Public Suricata rule aggregator: collect free rulesets, deduplicate, validate with suricata -T and build merged rulesets
|
|
5
|
+
Keywords: suricata,ids,rules,threat-detection,aggregator
|
|
6
|
+
Author: suriharvest contributors
|
|
7
|
+
License-Expression: MIT AND OFL-1.1
|
|
8
|
+
License-File: LICENSE
|
|
9
|
+
License-File: NOTICE
|
|
10
|
+
License-File: src/suriharvest/web/static/fonts/Archivo-OFL.txt
|
|
11
|
+
License-File: src/suriharvest/web/static/fonts/AtkinsonHyperlegibleMono-OFL.txt
|
|
12
|
+
License-File: src/suriharvest/web/static/fonts/AtkinsonHyperlegibleNext-OFL.txt
|
|
13
|
+
Classifier: Development Status :: 4 - Beta
|
|
14
|
+
Classifier: Environment :: Console
|
|
15
|
+
Classifier: Environment :: Web Environment
|
|
16
|
+
Classifier: Intended Audience :: Information Technology
|
|
17
|
+
Classifier: Intended Audience :: System Administrators
|
|
18
|
+
Classifier: Natural Language :: English
|
|
19
|
+
Classifier: Operating System :: POSIX :: Linux
|
|
20
|
+
Classifier: Operating System :: MacOS
|
|
21
|
+
Classifier: Operating System :: Microsoft :: Windows
|
|
22
|
+
Classifier: Programming Language :: Python :: 3
|
|
23
|
+
Classifier: Programming Language :: Python :: 3 :: Only
|
|
24
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
25
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
26
|
+
Classifier: Topic :: Security
|
|
27
|
+
Classifier: Topic :: System :: Networking :: Monitoring
|
|
28
|
+
Requires-Dist: alembic>=1.13
|
|
29
|
+
Requires-Dist: fastapi>=0.162.0
|
|
30
|
+
Requires-Dist: httpcore>=1.0
|
|
31
|
+
Requires-Dist: httpx>=0.27
|
|
32
|
+
Requires-Dist: jinja2>=3.1.6
|
|
33
|
+
Requires-Dist: python-multipart>=0.0.33
|
|
34
|
+
Requires-Dist: pyyaml>=6.0
|
|
35
|
+
Requires-Dist: rich>=13
|
|
36
|
+
Requires-Dist: sqlalchemy>=2.0
|
|
37
|
+
Requires-Dist: typer>=0.12
|
|
38
|
+
Requires-Dist: uvicorn>=0.54.0
|
|
39
|
+
Requires-Python: >=3.12
|
|
40
|
+
Project-URL: Homepage, https://github.com/threat-hunter-eu/suriharvest
|
|
41
|
+
Project-URL: Website, https://threat-hunting.eu/tools/suriharvest
|
|
42
|
+
Project-URL: Issues, https://github.com/threat-hunter-eu/suriharvest/issues
|
|
43
|
+
Description-Content-Type: text/markdown
|
|
44
|
+
|
|
45
|
+
<p align="center">
|
|
46
|
+
<img src="https://raw.githubusercontent.com/threat-hunter-eu/suriharvest/main/src/suriharvest/web/static/favicon.svg" width="84" alt="suriharvest logo">
|
|
47
|
+
</p>
|
|
48
|
+
|
|
49
|
+
<h1 align="center">suriharvest</h1>
|
|
50
|
+
|
|
51
|
+
<p align="center">
|
|
52
|
+
<b>Free Suricata rulesets, merged, deduplicated and tested on a real engine.</b><br>
|
|
53
|
+
One ruleset per Suricata version that loads cleanly, with every rule's source and licence.
|
|
54
|
+
</p>
|
|
55
|
+
|
|
56
|
+
<p align="center">
|
|
57
|
+
<a href="https://github.com/threat-hunter-eu/suriharvest/actions/workflows/ci.yml"><img src="https://github.com/threat-hunter-eu/suriharvest/actions/workflows/ci.yml/badge.svg" alt="CI"></a>
|
|
58
|
+
<a href="https://github.com/threat-hunter-eu/suriharvest/blob/main/LICENSE"><img src="https://img.shields.io/badge/licence-MIT-2456b5" alt="MIT licence"></a>
|
|
59
|
+
<img src="https://img.shields.io/badge/python-3.12%2B-2456b5" alt="Python 3.12+">
|
|
60
|
+
</p>
|
|
61
|
+
|
|
62
|
+
<p align="center">
|
|
63
|
+
<a href="https://threat-hunting.eu/tools/suriharvest">Website</a> ·
|
|
64
|
+
<a href="#quickstart">Quickstart</a> ·
|
|
65
|
+
<a href="https://github.com/threat-hunter-eu/suriharvest/blob/main/docs/features.md">Features</a> ·
|
|
66
|
+
<a href="#download-the-rules">Download the rules</a> ·
|
|
67
|
+
<a href="#documentation">Docs</a>
|
|
68
|
+
</p>
|
|
69
|
+
|
|
70
|
+
<picture>
|
|
71
|
+
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/threat-hunter-eu/suriharvest/main/docs/screenshots/overview-dark.png">
|
|
72
|
+
<img src="https://raw.githubusercontent.com/threat-hunter-eu/suriharvest/main/docs/screenshots/overview-light.png" alt="suriharvest overview: unique rules, load rate in local Suricata, duplicates merged, rulesets and top sources">
|
|
73
|
+
</picture>
|
|
74
|
+
|
|
75
|
+
suriharvest downloads the free rulesets (ET Open, abuse.ch, Stamus, OISF Traffic ID and more), tests **every rule
|
|
76
|
+
with `suricata -T`**, merges duplicates, fixes sid clashes with stable new sids, and builds the ruleset your sensors
|
|
77
|
+
load, directly or through suricata-update. Every rule keeps its source and licence.
|
|
78
|
+
|
|
79
|
+
## Quickstart
|
|
80
|
+
|
|
81
|
+
You need Python 3.12+, [uv](https://docs.astral.sh/uv/) and Suricata (or Docker) to test the rules.
|
|
82
|
+
|
|
83
|
+
<!-- doctest -->
|
|
84
|
+
```bash
|
|
85
|
+
uv tool install git+https://github.com/threat-hunter-eu/suriharvest
|
|
86
|
+
suriharvest init ~/suri && cd ~/suri && suriharvest update # first run: a few minutes
|
|
87
|
+
suriharvest serve # http://127.0.0.1:8077
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
Prefer the terminal: `suriharvest search 'cobalt strike'`, `suriharvest profile build default`.
|
|
91
|
+
Suricata 8, Docker engines and no local Suricata: [Getting started](https://github.com/threat-hunter-eu/suriharvest/blob/main/docs/getting-started.md).
|
|
92
|
+
|
|
93
|
+
## Highlights
|
|
94
|
+
|
|
95
|
+
- **Tested on the real engine**: every rule goes through `suricata -T` on each engine you add (Suricata 7 and 8).
|
|
96
|
+
- **Duplicates merged** by sid and by detection logic; **sid clashes fixed** with new sids that stay stable.
|
|
97
|
+
- **Flowbits aware**: a rule that needs a flowbit brings the rule that sets it.
|
|
98
|
+
- **Coming from suricata-update**: `profile import-conf` reads your `enable/disable/drop/modify.conf`.
|
|
99
|
+
- **Licence-aware**: every rule keeps its publisher's licence; `--redistributable-only` gives a file you can share.
|
|
100
|
+
- **Local and private**: the web UI binds to 127.0.0.1 and loads nothing from the internet.
|
|
101
|
+
|
|
102
|
+
Screenshots of search, rule pages, export and builds, and how the pipeline works: [Features](https://github.com/threat-hunter-eu/suriharvest/blob/main/docs/features.md).
|
|
103
|
+
|
|
104
|
+
## Download the rules
|
|
105
|
+
|
|
106
|
+
No install needed: the **[suriharvest-rules](https://github.com/threat-hunter-eu/suriharvest-rules/releases/latest)**
|
|
107
|
+
nightly release has the redistributable free rulesets, merged, deduplicated and tested on Suricata 7 and 8. The
|
|
108
|
+
first release (`rules-2026-11-17`): 65,968 rules per engine, 0 load errors. Every file: [suricata-update](https://github.com/threat-hunter-eu/suriharvest/blob/main/docs/suricata-update.md).
|
|
109
|
+
|
|
110
|
+
<!-- doctest: skip downloads the nightly release (root, network) -->
|
|
111
|
+
```bash
|
|
112
|
+
sudo suricata-update add-source suriharvest-8 \
|
|
113
|
+
https://github.com/threat-hunter-eu/suriharvest-rules/releases/latest/download/suriharvest-8.tar.gz
|
|
114
|
+
sudo suricata-update
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
## Documentation
|
|
118
|
+
|
|
119
|
+
| | |
|
|
120
|
+
|---|---|
|
|
121
|
+
| **Start** | [Getting started](https://github.com/threat-hunter-eu/suriharvest/blob/main/docs/getting-started.md) · [Features](https://github.com/threat-hunter-eu/suriharvest/blob/main/docs/features.md) · [CLI recipes](https://github.com/threat-hunter-eu/suriharvest/blob/main/docs/cli.md) · [Web UI](https://github.com/threat-hunter-eu/suriharvest/blob/main/docs/web.md) · [FAQ](https://github.com/threat-hunter-eu/suriharvest/blob/main/docs/faq.md) |
|
|
122
|
+
| **Rulesets** | [Profiles](https://github.com/threat-hunter-eu/suriharvest/blob/main/docs/profiles.md) · [Export](https://github.com/threat-hunter-eu/suriharvest/blob/main/docs/export.md) · [suricata-update](https://github.com/threat-hunter-eu/suriharvest/blob/main/docs/suricata-update.md) · [Sources and licences](https://github.com/threat-hunter-eu/suriharvest/blob/main/docs/sources.md) |
|
|
123
|
+
| **Run it** | [Releases](https://github.com/threat-hunter-eu/suriharvest/blob/main/docs/releases.md) · [Unattended updates](https://github.com/threat-hunter-eu/suriharvest/blob/main/docs/scheduling.md) · [GitHub Actions](https://github.com/threat-hunter-eu/suriharvest/blob/main/docs/automation.md) · [Architecture](https://github.com/threat-hunter-eu/suriharvest/blob/main/docs/architecture.md) |
|
|
124
|
+
|
|
125
|
+
## Contributing
|
|
126
|
+
|
|
127
|
+
Contributions are welcome: see [CONTRIBUTING](https://github.com/threat-hunter-eu/suriharvest/blob/main/.github/CONTRIBUTING.md); security reports: [SECURITY](https://github.com/threat-hunter-eu/suriharvest/blob/main/.github/SECURITY.md).
|
|
128
|
+
Maintainers: [@angstromissa](https://github.com/angstromissa), [@elhoim](https://github.com/elhoim).
|
|
129
|
+
|
|
130
|
+
## Licence
|
|
131
|
+
|
|
132
|
+
suriharvest is released under the [MIT licence](https://github.com/threat-hunter-eu/suriharvest/blob/main/LICENSE). Every rule keeps its publisher's licence; the only
|
|
133
|
+
changes to rule text (a new sid on a clash, a dataset path) are noted in each rules file's header
|
|
134
|
+
([rule licences](https://github.com/threat-hunter-eu/suriharvest/blob/main/docs/sources.md#licences), [NOTICE](https://github.com/threat-hunter-eu/suriharvest/blob/main/NOTICE)). To have a rule corrected or removed,
|
|
135
|
+
[open an issue](https://github.com/threat-hunter-eu/suriharvest/issues) or write to security@threat-hunting.eu.
|
|
136
|
+
|
|
137
|
+
Not affiliated with or endorsed by SigmaHQ, OISF, Proofpoint/Emerging Threats or MITRE. Suricata and OISF are
|
|
138
|
+
trademarks of the Open Information Security Foundation; Emerging Threats and Proofpoint are trademarks of
|
|
139
|
+
Proofpoint, Inc.; MITRE ATT&CK® and ATT&CK® are registered trademarks of The MITRE Corporation.
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
<p align="center">
|
|
2
|
+
<img src="https://raw.githubusercontent.com/threat-hunter-eu/suriharvest/main/src/suriharvest/web/static/favicon.svg" width="84" alt="suriharvest logo">
|
|
3
|
+
</p>
|
|
4
|
+
|
|
5
|
+
<h1 align="center">suriharvest</h1>
|
|
6
|
+
|
|
7
|
+
<p align="center">
|
|
8
|
+
<b>Free Suricata rulesets, merged, deduplicated and tested on a real engine.</b><br>
|
|
9
|
+
One ruleset per Suricata version that loads cleanly, with every rule's source and licence.
|
|
10
|
+
</p>
|
|
11
|
+
|
|
12
|
+
<p align="center">
|
|
13
|
+
<a href="https://github.com/threat-hunter-eu/suriharvest/actions/workflows/ci.yml"><img src="https://github.com/threat-hunter-eu/suriharvest/actions/workflows/ci.yml/badge.svg" alt="CI"></a>
|
|
14
|
+
<a href="https://github.com/threat-hunter-eu/suriharvest/blob/main/LICENSE"><img src="https://img.shields.io/badge/licence-MIT-2456b5" alt="MIT licence"></a>
|
|
15
|
+
<img src="https://img.shields.io/badge/python-3.12%2B-2456b5" alt="Python 3.12+">
|
|
16
|
+
</p>
|
|
17
|
+
|
|
18
|
+
<p align="center">
|
|
19
|
+
<a href="https://threat-hunting.eu/tools/suriharvest">Website</a> ·
|
|
20
|
+
<a href="#quickstart">Quickstart</a> ·
|
|
21
|
+
<a href="https://github.com/threat-hunter-eu/suriharvest/blob/main/docs/features.md">Features</a> ·
|
|
22
|
+
<a href="#download-the-rules">Download the rules</a> ·
|
|
23
|
+
<a href="#documentation">Docs</a>
|
|
24
|
+
</p>
|
|
25
|
+
|
|
26
|
+
<picture>
|
|
27
|
+
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/threat-hunter-eu/suriharvest/main/docs/screenshots/overview-dark.png">
|
|
28
|
+
<img src="https://raw.githubusercontent.com/threat-hunter-eu/suriharvest/main/docs/screenshots/overview-light.png" alt="suriharvest overview: unique rules, load rate in local Suricata, duplicates merged, rulesets and top sources">
|
|
29
|
+
</picture>
|
|
30
|
+
|
|
31
|
+
suriharvest downloads the free rulesets (ET Open, abuse.ch, Stamus, OISF Traffic ID and more), tests **every rule
|
|
32
|
+
with `suricata -T`**, merges duplicates, fixes sid clashes with stable new sids, and builds the ruleset your sensors
|
|
33
|
+
load, directly or through suricata-update. Every rule keeps its source and licence.
|
|
34
|
+
|
|
35
|
+
## Quickstart
|
|
36
|
+
|
|
37
|
+
You need Python 3.12+, [uv](https://docs.astral.sh/uv/) and Suricata (or Docker) to test the rules.
|
|
38
|
+
|
|
39
|
+
<!-- doctest -->
|
|
40
|
+
```bash
|
|
41
|
+
uv tool install git+https://github.com/threat-hunter-eu/suriharvest
|
|
42
|
+
suriharvest init ~/suri && cd ~/suri && suriharvest update # first run: a few minutes
|
|
43
|
+
suriharvest serve # http://127.0.0.1:8077
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
Prefer the terminal: `suriharvest search 'cobalt strike'`, `suriharvest profile build default`.
|
|
47
|
+
Suricata 8, Docker engines and no local Suricata: [Getting started](https://github.com/threat-hunter-eu/suriharvest/blob/main/docs/getting-started.md).
|
|
48
|
+
|
|
49
|
+
## Highlights
|
|
50
|
+
|
|
51
|
+
- **Tested on the real engine**: every rule goes through `suricata -T` on each engine you add (Suricata 7 and 8).
|
|
52
|
+
- **Duplicates merged** by sid and by detection logic; **sid clashes fixed** with new sids that stay stable.
|
|
53
|
+
- **Flowbits aware**: a rule that needs a flowbit brings the rule that sets it.
|
|
54
|
+
- **Coming from suricata-update**: `profile import-conf` reads your `enable/disable/drop/modify.conf`.
|
|
55
|
+
- **Licence-aware**: every rule keeps its publisher's licence; `--redistributable-only` gives a file you can share.
|
|
56
|
+
- **Local and private**: the web UI binds to 127.0.0.1 and loads nothing from the internet.
|
|
57
|
+
|
|
58
|
+
Screenshots of search, rule pages, export and builds, and how the pipeline works: [Features](https://github.com/threat-hunter-eu/suriharvest/blob/main/docs/features.md).
|
|
59
|
+
|
|
60
|
+
## Download the rules
|
|
61
|
+
|
|
62
|
+
No install needed: the **[suriharvest-rules](https://github.com/threat-hunter-eu/suriharvest-rules/releases/latest)**
|
|
63
|
+
nightly release has the redistributable free rulesets, merged, deduplicated and tested on Suricata 7 and 8. The
|
|
64
|
+
first release (`rules-2026-11-17`): 65,968 rules per engine, 0 load errors. Every file: [suricata-update](https://github.com/threat-hunter-eu/suriharvest/blob/main/docs/suricata-update.md).
|
|
65
|
+
|
|
66
|
+
<!-- doctest: skip downloads the nightly release (root, network) -->
|
|
67
|
+
```bash
|
|
68
|
+
sudo suricata-update add-source suriharvest-8 \
|
|
69
|
+
https://github.com/threat-hunter-eu/suriharvest-rules/releases/latest/download/suriharvest-8.tar.gz
|
|
70
|
+
sudo suricata-update
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
## Documentation
|
|
74
|
+
|
|
75
|
+
| | |
|
|
76
|
+
|---|---|
|
|
77
|
+
| **Start** | [Getting started](https://github.com/threat-hunter-eu/suriharvest/blob/main/docs/getting-started.md) · [Features](https://github.com/threat-hunter-eu/suriharvest/blob/main/docs/features.md) · [CLI recipes](https://github.com/threat-hunter-eu/suriharvest/blob/main/docs/cli.md) · [Web UI](https://github.com/threat-hunter-eu/suriharvest/blob/main/docs/web.md) · [FAQ](https://github.com/threat-hunter-eu/suriharvest/blob/main/docs/faq.md) |
|
|
78
|
+
| **Rulesets** | [Profiles](https://github.com/threat-hunter-eu/suriharvest/blob/main/docs/profiles.md) · [Export](https://github.com/threat-hunter-eu/suriharvest/blob/main/docs/export.md) · [suricata-update](https://github.com/threat-hunter-eu/suriharvest/blob/main/docs/suricata-update.md) · [Sources and licences](https://github.com/threat-hunter-eu/suriharvest/blob/main/docs/sources.md) |
|
|
79
|
+
| **Run it** | [Releases](https://github.com/threat-hunter-eu/suriharvest/blob/main/docs/releases.md) · [Unattended updates](https://github.com/threat-hunter-eu/suriharvest/blob/main/docs/scheduling.md) · [GitHub Actions](https://github.com/threat-hunter-eu/suriharvest/blob/main/docs/automation.md) · [Architecture](https://github.com/threat-hunter-eu/suriharvest/blob/main/docs/architecture.md) |
|
|
80
|
+
|
|
81
|
+
## Contributing
|
|
82
|
+
|
|
83
|
+
Contributions are welcome: see [CONTRIBUTING](https://github.com/threat-hunter-eu/suriharvest/blob/main/.github/CONTRIBUTING.md); security reports: [SECURITY](https://github.com/threat-hunter-eu/suriharvest/blob/main/.github/SECURITY.md).
|
|
84
|
+
Maintainers: [@angstromissa](https://github.com/angstromissa), [@elhoim](https://github.com/elhoim).
|
|
85
|
+
|
|
86
|
+
## Licence
|
|
87
|
+
|
|
88
|
+
suriharvest is released under the [MIT licence](https://github.com/threat-hunter-eu/suriharvest/blob/main/LICENSE). Every rule keeps its publisher's licence; the only
|
|
89
|
+
changes to rule text (a new sid on a clash, a dataset path) are noted in each rules file's header
|
|
90
|
+
([rule licences](https://github.com/threat-hunter-eu/suriharvest/blob/main/docs/sources.md#licences), [NOTICE](https://github.com/threat-hunter-eu/suriharvest/blob/main/NOTICE)). To have a rule corrected or removed,
|
|
91
|
+
[open an issue](https://github.com/threat-hunter-eu/suriharvest/issues) or write to security@threat-hunting.eu.
|
|
92
|
+
|
|
93
|
+
Not affiliated with or endorsed by SigmaHQ, OISF, Proofpoint/Emerging Threats or MITRE. Suricata and OISF are
|
|
94
|
+
trademarks of the Open Information Security Foundation; Emerging Threats and Proofpoint are trademarks of
|
|
95
|
+
Proofpoint, Inc.; MITRE ATT&CK® and ATT&CK® are registered trademarks of The MITRE Corporation.
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
[project]
|
|
2
|
+
name = "suriharvest"
|
|
3
|
+
version = "0.1.0"
|
|
4
|
+
description = "Public Suricata rule aggregator: collect free rulesets, deduplicate, validate with suricata -T and build merged rulesets"
|
|
5
|
+
keywords = [
|
|
6
|
+
"suricata",
|
|
7
|
+
"ids",
|
|
8
|
+
"rules",
|
|
9
|
+
"threat-detection",
|
|
10
|
+
"aggregator",
|
|
11
|
+
]
|
|
12
|
+
classifiers = [
|
|
13
|
+
"Development Status :: 4 - Beta",
|
|
14
|
+
"Environment :: Console",
|
|
15
|
+
"Environment :: Web Environment",
|
|
16
|
+
"Intended Audience :: Information Technology",
|
|
17
|
+
"Intended Audience :: System Administrators",
|
|
18
|
+
"Natural Language :: English",
|
|
19
|
+
"Operating System :: POSIX :: Linux",
|
|
20
|
+
"Operating System :: MacOS",
|
|
21
|
+
"Operating System :: Microsoft :: Windows",
|
|
22
|
+
"Programming Language :: Python :: 3",
|
|
23
|
+
"Programming Language :: Python :: 3 :: Only",
|
|
24
|
+
"Programming Language :: Python :: 3.12",
|
|
25
|
+
"Programming Language :: Python :: 3.13",
|
|
26
|
+
"Topic :: Security",
|
|
27
|
+
"Topic :: System :: Networking :: Monitoring",
|
|
28
|
+
]
|
|
29
|
+
readme = "README.md"
|
|
30
|
+
requires-python = ">=3.12"
|
|
31
|
+
license = "MIT AND OFL-1.1"
|
|
32
|
+
license-files = [
|
|
33
|
+
"LICENSE",
|
|
34
|
+
"NOTICE",
|
|
35
|
+
"src/suriharvest/web/static/fonts/*-OFL.txt",
|
|
36
|
+
]
|
|
37
|
+
dependencies = [
|
|
38
|
+
"alembic>=1.13",
|
|
39
|
+
"fastapi>=0.162.0",
|
|
40
|
+
"httpcore>=1.0",
|
|
41
|
+
"httpx>=0.27",
|
|
42
|
+
"jinja2>=3.1.6",
|
|
43
|
+
"python-multipart>=0.0.33",
|
|
44
|
+
"pyyaml>=6.0",
|
|
45
|
+
"rich>=13",
|
|
46
|
+
"sqlalchemy>=2.0",
|
|
47
|
+
"typer>=0.12",
|
|
48
|
+
"uvicorn>=0.54.0",
|
|
49
|
+
]
|
|
50
|
+
|
|
51
|
+
[[project.authors]]
|
|
52
|
+
name = "suriharvest contributors"
|
|
53
|
+
|
|
54
|
+
[project.urls]
|
|
55
|
+
Homepage = "https://github.com/threat-hunter-eu/suriharvest"
|
|
56
|
+
Website = "https://threat-hunting.eu/tools/suriharvest"
|
|
57
|
+
Issues = "https://github.com/threat-hunter-eu/suriharvest/issues"
|
|
58
|
+
|
|
59
|
+
[project.scripts]
|
|
60
|
+
suriharvest = "suriharvest.cli:main"
|
|
61
|
+
|
|
62
|
+
[build-system]
|
|
63
|
+
requires = ["uv_build>=0.13.1,<0.14.0"]
|
|
64
|
+
build-backend = "uv_build"
|
|
65
|
+
|
|
66
|
+
[dependency-groups]
|
|
67
|
+
dev = [
|
|
68
|
+
"pytest>=8",
|
|
69
|
+
"pytest-xdist>=3.8",
|
|
70
|
+
"ruff>=0.6",
|
|
71
|
+
]
|
|
72
|
+
ui = ["playwright>=1.40"]
|
|
73
|
+
|
|
74
|
+
[tool.pytest.ini_options]
|
|
75
|
+
testpaths = ["tests"]
|
|
76
|
+
addopts = "-q -m 'not engine and not network and not docs'"
|
|
77
|
+
markers = [
|
|
78
|
+
"engine: needs a real Suricata binary (run with -m engine)",
|
|
79
|
+
"network: downloads real sources",
|
|
80
|
+
"proxy: goes through a real forward proxy (SURIHARVEST_TEST_PROXY; see tests/test_proxy_real.py)",
|
|
81
|
+
"docs: runs the README/docs shell examples on an offline fixture workspace (needs suricata; run with -m docs)",
|
|
82
|
+
]
|
|
83
|
+
|
|
84
|
+
[tool.ruff]
|
|
85
|
+
line-length = 140
|
|
86
|
+
target-version = "py312"
|
|
87
|
+
extend-exclude = [
|
|
88
|
+
"src/suriharvest/migrations/versions",
|
|
89
|
+
"scripts/maintainer/privacy_gate.py",
|
|
90
|
+
"tests/acceptance",
|
|
91
|
+
]
|
|
92
|
+
|
|
93
|
+
[tool.ruff.lint]
|
|
94
|
+
select = [
|
|
95
|
+
"E",
|
|
96
|
+
"F",
|
|
97
|
+
"W",
|
|
98
|
+
"I",
|
|
99
|
+
"B",
|
|
100
|
+
"UP",
|
|
101
|
+
"S",
|
|
102
|
+
"BLE",
|
|
103
|
+
"SIM",
|
|
104
|
+
"RUF",
|
|
105
|
+
]
|
|
106
|
+
ignore = [
|
|
107
|
+
"S603",
|
|
108
|
+
"S607",
|
|
109
|
+
"S101",
|
|
110
|
+
"RUF001",
|
|
111
|
+
"RUF002",
|
|
112
|
+
"RUF003",
|
|
113
|
+
"B008",
|
|
114
|
+
"RUF012",
|
|
115
|
+
"UP047",
|
|
116
|
+
]
|
|
117
|
+
|
|
118
|
+
[tool.ruff.lint.pycodestyle]
|
|
119
|
+
max-line-length = 160
|
|
120
|
+
|
|
121
|
+
[tool.ruff.lint.per-file-ignores]
|
|
122
|
+
"src/suriharvest/web/app.py" = ["B008"]
|
|
123
|
+
"tests/*" = ["S"]
|
|
124
|
+
"tests/test_docs.py" = ["E501"]
|
|
125
|
+
"tests/test_ownership_datasets.py" = ["E501"]
|
|
126
|
+
"tests/test_pipeline.py" = ["E501"]
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
[project]
|
|
2
|
+
name = "suriharvest"
|
|
3
|
+
version = "0.1.0"
|
|
4
|
+
description = "Public Suricata rule aggregator: collect free rulesets, deduplicate, validate with suricata -T and build merged rulesets"
|
|
5
|
+
authors = [{ name = "suriharvest contributors" }]
|
|
6
|
+
keywords = ["suricata", "ids", "rules", "threat-detection", "aggregator"]
|
|
7
|
+
classifiers = [
|
|
8
|
+
# The licence is the SPDX expression in `license` below (PEP 639): code MIT, the web UI's bundled fonts OFL-1.1.
|
|
9
|
+
# No "License :: OSI Approved :: MIT License" classifier: PEP 639 deprecates License :: classifiers next to a
|
|
10
|
+
# licence expression and PyPI refuses an upload that has both. Python 3.12 and 3.13 are tested in CI.
|
|
11
|
+
"Development Status :: 4 - Beta",
|
|
12
|
+
"Environment :: Console",
|
|
13
|
+
"Environment :: Web Environment",
|
|
14
|
+
"Intended Audience :: Information Technology",
|
|
15
|
+
"Intended Audience :: System Administrators",
|
|
16
|
+
"Natural Language :: English",
|
|
17
|
+
"Operating System :: POSIX :: Linux",
|
|
18
|
+
"Operating System :: MacOS",
|
|
19
|
+
"Operating System :: Microsoft :: Windows",
|
|
20
|
+
"Programming Language :: Python :: 3",
|
|
21
|
+
"Programming Language :: Python :: 3 :: Only",
|
|
22
|
+
"Programming Language :: Python :: 3.12",
|
|
23
|
+
"Programming Language :: Python :: 3.13",
|
|
24
|
+
"Topic :: Security",
|
|
25
|
+
"Topic :: System :: Networking :: Monitoring",
|
|
26
|
+
]
|
|
27
|
+
readme = "README.md"
|
|
28
|
+
requires-python = ">=3.12"
|
|
29
|
+
license = "MIT AND OFL-1.1" # code MIT; the web UI's bundled fonts OFL-1.1 (see NOTICE)
|
|
30
|
+
license-files = ["LICENSE", "NOTICE", "src/suriharvest/web/static/fonts/*-OFL.txt"]
|
|
31
|
+
dependencies = [
|
|
32
|
+
"alembic>=1.13",
|
|
33
|
+
"fastapi>=0.162.0",
|
|
34
|
+
"httpcore>=1.0",
|
|
35
|
+
"httpx>=0.27",
|
|
36
|
+
"jinja2>=3.1.6",
|
|
37
|
+
"python-multipart>=0.0.33",
|
|
38
|
+
"pyyaml>=6.0",
|
|
39
|
+
"rich>=13",
|
|
40
|
+
"sqlalchemy>=2.0",
|
|
41
|
+
"typer>=0.12",
|
|
42
|
+
"uvicorn>=0.54.0",
|
|
43
|
+
]
|
|
44
|
+
|
|
45
|
+
[project.urls]
|
|
46
|
+
Homepage = "https://github.com/threat-hunter-eu/suriharvest"
|
|
47
|
+
Website = "https://threat-hunting.eu/tools/suriharvest"
|
|
48
|
+
Issues = "https://github.com/threat-hunter-eu/suriharvest/issues"
|
|
49
|
+
|
|
50
|
+
[project.scripts]
|
|
51
|
+
suriharvest = "suriharvest.cli:main"
|
|
52
|
+
|
|
53
|
+
[build-system]
|
|
54
|
+
requires = ["uv_build>=0.13.1,<0.14.0"]
|
|
55
|
+
build-backend = "uv_build"
|
|
56
|
+
|
|
57
|
+
[dependency-groups]
|
|
58
|
+
dev = [
|
|
59
|
+
"pytest>=8",
|
|
60
|
+
"pytest-xdist>=3.8",
|
|
61
|
+
"ruff>=0.6",
|
|
62
|
+
]
|
|
63
|
+
ui = [
|
|
64
|
+
"playwright>=1.40",
|
|
65
|
+
]
|
|
66
|
+
|
|
67
|
+
[tool.pytest.ini_options]
|
|
68
|
+
testpaths = ["tests"]
|
|
69
|
+
addopts = "-q -m 'not engine and not network and not docs'"
|
|
70
|
+
markers = [
|
|
71
|
+
"engine: needs a real Suricata binary (run with -m engine)",
|
|
72
|
+
"network: downloads real sources",
|
|
73
|
+
"proxy: goes through a real forward proxy (SURIHARVEST_TEST_PROXY; see tests/test_proxy_real.py)",
|
|
74
|
+
"docs: runs the README/docs shell examples on an offline fixture workspace (needs suricata; run with -m docs)",
|
|
75
|
+
]
|
|
76
|
+
|
|
77
|
+
[tool.ruff]
|
|
78
|
+
line-length = 140
|
|
79
|
+
target-version = "py312"
|
|
80
|
+
extend-exclude = ["src/suriharvest/migrations/versions", "scripts/maintainer/privacy_gate.py", "tests/acceptance"] # the gate is a standalone stdlib script (own style)
|
|
81
|
+
|
|
82
|
+
[tool.ruff.lint]
|
|
83
|
+
# Same rule set as sigharvest.
|
|
84
|
+
select = ["E", "F", "W", "I", "B", "UP", "S", "BLE", "SIM", "RUF"]
|
|
85
|
+
ignore = ["S603", "S607", "S101", "RUF001", "RUF002", "RUF003", "B008", "RUF012", "UP047"]
|
|
86
|
+
|
|
87
|
+
[tool.ruff.lint.pycodestyle]
|
|
88
|
+
max-line-length = 160 # as sigharvest; the formatter keeps line-length 140
|
|
89
|
+
|
|
90
|
+
[tool.ruff.lint.per-file-ignores]
|
|
91
|
+
"src/suriharvest/web/app.py" = ["B008"] # FastAPI's Form() defaults
|
|
92
|
+
"tests/*" = ["S"]
|
|
93
|
+
# Suricata rule fixtures: one rule per line, cannot be wrapped.
|
|
94
|
+
"tests/test_docs.py" = ["E501"]
|
|
95
|
+
"tests/test_ownership_datasets.py" = ["E501"]
|
|
96
|
+
"tests/test_pipeline.py" = ["E501"]
|