detkit-cli 0.1.4__tar.gz → 0.1.6__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.
Files changed (38) hide show
  1. {detkit_cli-0.1.4 → detkit_cli-0.1.6}/.github/workflows/ci.yml +3 -3
  2. {detkit_cli-0.1.4 → detkit_cli-0.1.6}/PKG-INFO +21 -4
  3. {detkit_cli-0.1.4 → detkit_cli-0.1.6}/README.md +20 -3
  4. detkit_cli-0.1.6/detkit/attack_enterprise.json +1484 -0
  5. {detkit_cli-0.1.4 → detkit_cli-0.1.6}/detkit/cli.py +108 -10
  6. detkit_cli-0.1.6/detkit/docs.py +382 -0
  7. detkit_cli-0.1.6/detkit-navigator.json +50 -0
  8. {detkit_cli-0.1.4 → detkit_cli-0.1.6}/detkit_cli.egg-info/PKG-INFO +21 -4
  9. {detkit_cli-0.1.4 → detkit_cli-0.1.6}/detkit_cli.egg-info/SOURCES.txt +7 -0
  10. {detkit_cli-0.1.4 → detkit_cli-0.1.6}/detkit_cli.egg-info/scm_file_list.json +8 -1
  11. detkit_cli-0.1.6/detkit_cli.egg-info/scm_version.json +8 -0
  12. detkit_cli-0.1.6/examples/rules/powershell_encoded_command.test.yml +22 -0
  13. detkit_cli-0.1.6/examples/rules/powershell_encoded_command.yml +23 -0
  14. {detkit_cli-0.1.4 → detkit_cli-0.1.6}/examples/rules/whoami_execution.yml +3 -0
  15. {detkit_cli-0.1.4 → detkit_cli-0.1.6}/pyproject.toml +3 -0
  16. detkit_cli-0.1.6/tests/test_cli_json.py +22 -0
  17. detkit_cli-0.1.6/tests/test_docs.py +66 -0
  18. detkit_cli-0.1.4/detkit_cli.egg-info/scm_version.json +0 -8
  19. {detkit_cli-0.1.4 → detkit_cli-0.1.6}/.github/ISSUE_TEMPLATE/bug_report.md +0 -0
  20. {detkit_cli-0.1.4 → detkit_cli-0.1.6}/.github/ISSUE_TEMPLATE/feature_request.md +0 -0
  21. {detkit_cli-0.1.4 → detkit_cli-0.1.6}/.github/workflows/publish.yml +0 -0
  22. {detkit_cli-0.1.4 → detkit_cli-0.1.6}/.gitignore +0 -0
  23. {detkit_cli-0.1.4 → detkit_cli-0.1.6}/.pre-commit-hooks.yaml +0 -0
  24. {detkit_cli-0.1.4 → detkit_cli-0.1.6}/CONTRIBUTING.md +0 -0
  25. {detkit_cli-0.1.4 → detkit_cli-0.1.6}/LICENSE +0 -0
  26. {detkit_cli-0.1.4 → detkit_cli-0.1.6}/action.yml +0 -0
  27. {detkit_cli-0.1.4 → detkit_cli-0.1.6}/detkit/__init__.py +0 -0
  28. {detkit_cli-0.1.4 → detkit_cli-0.1.6}/detkit/__main__.py +0 -0
  29. {detkit_cli-0.1.4 → detkit_cli-0.1.6}/detkit/evaluator.py +0 -0
  30. {detkit_cli-0.1.4 → detkit_cli-0.1.6}/detkit-demo.gif +0 -0
  31. {detkit_cli-0.1.4 → detkit_cli-0.1.6}/detkit-demo.tape +0 -0
  32. {detkit_cli-0.1.4 → detkit_cli-0.1.6}/detkit_cli.egg-info/dependency_links.txt +0 -0
  33. {detkit_cli-0.1.4 → detkit_cli-0.1.6}/detkit_cli.egg-info/entry_points.txt +0 -0
  34. {detkit_cli-0.1.4 → detkit_cli-0.1.6}/detkit_cli.egg-info/requires.txt +0 -0
  35. {detkit_cli-0.1.4 → detkit_cli-0.1.6}/detkit_cli.egg-info/top_level.txt +0 -0
  36. {detkit_cli-0.1.4 → detkit_cli-0.1.6}/examples/rules/whoami_execution.test.yml +0 -0
  37. {detkit_cli-0.1.4 → detkit_cli-0.1.6}/setup.cfg +0 -0
  38. {detkit_cli-0.1.4 → detkit_cli-0.1.6}/tests/test_evaluator.py +0 -0
@@ -14,8 +14,8 @@ jobs:
14
14
  - uses: actions/setup-python@v5
15
15
  with:
16
16
  python-version: ${{ matrix.python-version }}
17
- - run: pip install -e .
18
- - name: Unit checks (evaluator core)
19
- run: python tests/test_evaluator.py
17
+ - run: pip install -e . pytest
18
+ - name: Run the test suite
19
+ run: pytest -q
20
20
  - name: Example rules must pass their tests
21
21
  run: detkit test examples/rules
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: detkit-cli
3
- Version: 0.1.4
3
+ Version: 0.1.6
4
4
  Summary: dbt for detections — test, validate, and CI-gate Sigma detection rules as code.
5
5
  Author: detkit
6
6
  License-Expression: MIT
@@ -105,11 +105,28 @@ repos:
105
105
 
106
106
  There's a `detkit-validate` hook too, for the lighter structural check.
107
107
 
108
+ ## Coverage
109
+
110
+ Past a handful of rules you want to see what you're *not* covering. `detkit docs` builds a single self-contained HTML page: a catalog of every rule plus a MITRE ATT&CK heatmap of which techniques you detect, which you test, and which are gaps.
111
+
112
+ ```bash
113
+ detkit docs rules -o coverage.html
114
+ ```
115
+
116
+ Green is a technique with a tested rule, amber is a rule with no test, and the faint cells are the gaps. It's one file with no external assets, so you can commit it or publish it to GitHub Pages.
117
+
118
+ `detkit navigator` exports the same coverage as a [MITRE ATT&CK Navigator](https://mitre-attack.github.io/attack-navigator/) layer, so it drops straight into the tool your team already uses:
119
+
120
+ ```bash
121
+ detkit navigator rules -o coverage.json
122
+ # then Open Existing Layer -> Upload at the Navigator
123
+ ```
124
+
108
125
  ## What it handles
109
126
 
110
- detkit runs your rules locally. No SIEM, no credentials, nothing leaves your machine or CI runner. I ran it against every rule in the SigmaHQ repo, and about 91% use only features it understands today: `contains`, `startswith`, `endswith`, `re`, value wildcards (`*` and `?`), `|cidr`, keyword lists, and `X of` / `all of` conditions.
127
+ detkit runs your rules locally. No SIEM, no credentials, nothing leaves your machine or CI runner. I ran it against every rule in the SigmaHQ repo, and about 91% use only features it understands today: `contains`, `startswith`, `endswith`, `re`, value wildcards (`*` and `?`), `|cidr`, nested/dotted fields (`DeviceDetail.deviceId`), keyword lists, and `X of` / `all of` conditions.
111
128
 
112
- It won't guess at the rest. If a rule uses something detkit can't evaluate yet, like nested fields (`DeviceDetail.deviceId`) or `base64` modifiers, `test` and `validate` print a WARN naming the feature instead of returning an answer that might be wrong. A detection tool that's quietly wrong is worse than no tool.
129
+ It won't guess at the rest. If a rule uses something detkit can't evaluate yet, like `base64`/`windash` modifiers or arrays of objects, `test` and `validate` print a WARN naming the feature instead of returning an answer that might be wrong. A detection tool that's quietly wrong is worse than no tool.
113
130
 
114
131
  ## Why
115
132
 
@@ -117,7 +134,7 @@ Detections live in Git now, but the testing habit that comes with the rest of so
117
134
 
118
135
  ## Roadmap
119
136
 
120
- - Nested/dotted fields and `base64` modifiers (the two things it warns on today), probably via [pySigma](https://github.com/SigmaHQ/pySigma).
137
+ - `base64`/`windash` modifiers and arrays of objects (what it warns on today), probably via [pySigma](https://github.com/SigmaHQ/pySigma).
121
138
  - `detkit generate`: draft a rule and its tests from a plain-English description. The tests come with it, not as an afterthought.
122
139
  - Field mapping, so one rule can be checked against more than one log schema.
123
140
  - A hosted option down the line for teams that want shared runs and history. The CLI stays free.
@@ -84,11 +84,28 @@ repos:
84
84
 
85
85
  There's a `detkit-validate` hook too, for the lighter structural check.
86
86
 
87
+ ## Coverage
88
+
89
+ Past a handful of rules you want to see what you're *not* covering. `detkit docs` builds a single self-contained HTML page: a catalog of every rule plus a MITRE ATT&CK heatmap of which techniques you detect, which you test, and which are gaps.
90
+
91
+ ```bash
92
+ detkit docs rules -o coverage.html
93
+ ```
94
+
95
+ Green is a technique with a tested rule, amber is a rule with no test, and the faint cells are the gaps. It's one file with no external assets, so you can commit it or publish it to GitHub Pages.
96
+
97
+ `detkit navigator` exports the same coverage as a [MITRE ATT&CK Navigator](https://mitre-attack.github.io/attack-navigator/) layer, so it drops straight into the tool your team already uses:
98
+
99
+ ```bash
100
+ detkit navigator rules -o coverage.json
101
+ # then Open Existing Layer -> Upload at the Navigator
102
+ ```
103
+
87
104
  ## What it handles
88
105
 
89
- detkit runs your rules locally. No SIEM, no credentials, nothing leaves your machine or CI runner. I ran it against every rule in the SigmaHQ repo, and about 91% use only features it understands today: `contains`, `startswith`, `endswith`, `re`, value wildcards (`*` and `?`), `|cidr`, keyword lists, and `X of` / `all of` conditions.
106
+ detkit runs your rules locally. No SIEM, no credentials, nothing leaves your machine or CI runner. I ran it against every rule in the SigmaHQ repo, and about 91% use only features it understands today: `contains`, `startswith`, `endswith`, `re`, value wildcards (`*` and `?`), `|cidr`, nested/dotted fields (`DeviceDetail.deviceId`), keyword lists, and `X of` / `all of` conditions.
90
107
 
91
- It won't guess at the rest. If a rule uses something detkit can't evaluate yet, like nested fields (`DeviceDetail.deviceId`) or `base64` modifiers, `test` and `validate` print a WARN naming the feature instead of returning an answer that might be wrong. A detection tool that's quietly wrong is worse than no tool.
108
+ It won't guess at the rest. If a rule uses something detkit can't evaluate yet, like `base64`/`windash` modifiers or arrays of objects, `test` and `validate` print a WARN naming the feature instead of returning an answer that might be wrong. A detection tool that's quietly wrong is worse than no tool.
92
109
 
93
110
  ## Why
94
111
 
@@ -96,7 +113,7 @@ Detections live in Git now, but the testing habit that comes with the rest of so
96
113
 
97
114
  ## Roadmap
98
115
 
99
- - Nested/dotted fields and `base64` modifiers (the two things it warns on today), probably via [pySigma](https://github.com/SigmaHQ/pySigma).
116
+ - `base64`/`windash` modifiers and arrays of objects (what it warns on today), probably via [pySigma](https://github.com/SigmaHQ/pySigma).
100
117
  - `detkit generate`: draft a rule and its tests from a plain-English description. The tests come with it, not as an afterthought.
101
118
  - Field mapping, so one rule can be checked against more than one log schema.
102
119
  - A hosted option down the line for teams that want shared runs and history. The CLI stays free.