Skip to content
Merged
Show file tree
Hide file tree
Changes from 15 commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
ea3295a
➕ Add diskcache dependency and update ruff config
frack113 Jul 8, 2026
5a05290
🔥 Remove obsolete config.py, sigmahq_data.py, test_config.py, and upd…
frack113 Jul 8, 2026
b18e7a0
✨ Implement diskcache-based data loading modules
frack113 Jul 8, 2026
aea55c5
♻️ Split field.py into fieldname.py and modifier.py
frack113 Jul 8, 2026
d54d3e5
♻️ Update validators to use new diskcache-based data modules
frack113 Jul 8, 2026
ebd5a78
🚚 Move test files from field/ to fieldname/ and modifier/
frack113 Jul 8, 2026
37de0d0
🔧 Split windows_validator JSON schema and tools into eventid and prov…
frack113 Jul 8, 2026
824eed1
👷 Update CI schema validation for new windows_eventid and windows_pro…
frack113 Jul 8, 2026
1f8c231
📝 Add CHANGELOG, CONTRIBUTING, and update README
frack113 Jul 8, 2026
5b9af7f
♻️ Refactor SigmahqStatusToHighValidator for regression log support
frack113 Jul 8, 2026
7e50be7
🔖 Bump version to 0.21.0
frack113 Jul 8, 2026
13e2095
🐛 Fix type annotations, KeyError risks, cache lifecycle, and HTTP exc…
frack113 Jul 8, 2026
f7fe423
🔧 Update poetry.lock after dependency changes
frack113 Jul 8, 2026
9593b9f
✅ Add conftest.py to use local JSON files in tests (avoids 404 on CI)
frack113 Jul 8, 2026
4f4d002
⬆️ Bump check-jsonschema from 0.29.4 to 0.30.0
frack113 Jul 8, 2026
7dd94d6
♻️ Extract SigmahqDataLoader base class to reduce data module duplica…
frack113 Jul 25, 2026
38c67f1
🐛 fix: use JSON disk cache serializer for non-root users
frack113 Jul 25, 2026
a96c6c7
♻️ Factor out module-level boilerplate into make_module_api()
frack113 Jul 25, 2026
b8f1786
🔒 poetry.lock: regenerate after pyproject.toml changes
frack113 Jul 25, 2026
691e856
🎨 ruff format sur 3 fichiers data
frack113 Jul 25, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .github/workflows/schema.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,5 @@ jobs:
run: |
poetry run check-jsonschema --schemafile ./json-schema/schema_sigmahq_taxonomy.json ./tools/sigmahq_taxonomy.json
poetry run check-jsonschema --schemafile ./json-schema/schema_sigmahq_filename.json ./tools/sigmahq_filename.json
poetry run check-jsonschema --schemafile ./json-schema/schema_sigmahq_windows_validator.json ./tools/sigmahq_windows_validator.json
poetry run check-jsonschema --schemafile ./json-schema/schema_sigmahq_windows_eventid.json ./tools/sigmahq_windows_eventid.json
poetry run check-jsonschema --schemafile ./json-schema/schema_sigmahq_windows_provider.json ./tools/sigmahq_windows_provider.json
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# CHANGELOG

## 2024-08-09

- Update taxonomy
- Use json for data instead of config.py
- Use diskcache for caching remote data
- Fix invalid sigma syntax
- Move field validators to validator files
19 changes: 19 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Contributing

## How to update the validator data

The validators rely on the JSON files located in the `tools/` directory.

- `sigmahq_taxonomy.json` - Sigma taxonomy data
- `sigmahq_filename.json` - Sigma rule filename prefix patterns
- `sigmahq_windows_eventid.json` - Windows event ID categories
- `sigmahq_windows_provider.json` - Windows provider names

These files are validated against JSON schemas in `json-schema/`. After updating any JSON file, run the schema validation:

```bash
poetry run check-jsonschema --schemafile ./json-schema/schema_sigmahq_taxonomy.json ./tools/sigmahq_taxonomy.json
poetry run check-jsonschema --schemafile ./json-schema/schema_sigmahq_filename.json ./tools/sigmahq_filename.json
poetry run check-jsonschema --schemafile ./json-schema/schema_sigmahq_windows_eventid.json ./tools/sigmahq_windows_eventid.json
poetry run check-jsonschema --schemafile ./json-schema/schema_sigmahq_windows_provider.json ./tools/sigmahq_windows_provider.json
```
4 changes: 1 addition & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,7 @@ TBD

## 🧬 Data

All the data value are in the config.py

To use a local json version, you need to put them in a `validator_json` folder visible from the launch directory.
All the data value are in the json files in the tools directory

## 📜 Maintainer

Expand Down
13 changes: 13 additions & 0 deletions json-schema/schema_sigmahq_windows_eventid.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"title": { "type": "string" },
"version": { "type": "string" },
"category_no_eventid": {
"type":"array",
"items": { "type": "string" }
}
},
"required": ["title","version","category_no_eventid"]
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,6 @@
"properties": {
"title": { "type": "string" },
"version": { "type": "string" },
"category_no_eventid": {
"type":"array",
"items": { "type": "string" }
},
"category_provider_name": {
"type": "object",
"additionalProperties": {
Expand All @@ -16,6 +12,5 @@
}
}
},
"required": ["title","version","category_no_eventid","category_provider_name"]
"required": ["title","version","category_provider_name"]
}

14 changes: 7 additions & 7 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 4 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "pySigma-validators-sigmahq"
version = "0.20.3"
version = "0.21.0"
description = "pySigma SigmaHQ validators"
license = "LGPL-2.1-only"
readme = "README.md"
Expand All @@ -19,6 +19,7 @@ keywords = [ "pySigma", "SigmaHQ", "validators"]

dependencies = [
"pysigma >=1.3",
"diskcache >=5.6",
"requests >=2.34"
]

Expand All @@ -36,7 +37,7 @@ defusedxml = "^0.7"
pytest = "^9.1"
pytest-cov = "^7.1"
mypy = "^2.0"
check-jsonschema = "^0.29"
check-jsonschema = "^0.30"

[tool.ruff]
line-length = 100
Expand All @@ -58,7 +59,7 @@ select = ["E", "F", "W", "I001", "S", "PLR"]
"tools/**" = ["S101"]

# PLR0912: Too many branches - complex validation logic in field validators
"sigma/validators/sigmahq/field.py" = ["PLR0912"]
"sigma/validators/sigmahq/fieldname.py" = ["PLR0912"]

[tool.ruff.format]
quote-style = "double"
Expand Down
166 changes: 0 additions & 166 deletions sigma/validators/sigmahq/config.py

This file was deleted.

Empty file.
Loading
Loading