contentctl-ng 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.
- contentctl_ng-0.1.0/PKG-INFO +26 -0
- contentctl_ng-0.1.0/README.md +4 -0
- contentctl_ng-0.1.0/pyproject.toml +140 -0
- contentctl_ng-0.1.0/src/contentctl_ng/__init__.py +10 -0
- contentctl_ng-0.1.0/src/contentctl_ng/__main__.py +10 -0
- contentctl_ng-0.1.0/src/contentctl_ng/build.py +635 -0
- contentctl_ng-0.1.0/src/contentctl_ng/cli.py +143 -0
- contentctl_ng-0.1.0/src/contentctl_ng/contentctl_legacy_ported/__init__.py +4 -0
- contentctl_ng-0.1.0/src/contentctl_ng/contentctl_legacy_ported/actions/detection_testing/DetectionTestingManager.py +309 -0
- contentctl_ng-0.1.0/src/contentctl_ng/contentctl_legacy_ported/actions/detection_testing/GitService.py +388 -0
- contentctl_ng-0.1.0/src/contentctl_ng/contentctl_legacy_ported/actions/detection_testing/infrastructures/DetectionTestingInfrastructure.py +1872 -0
- contentctl_ng-0.1.0/src/contentctl_ng/contentctl_legacy_ported/actions/detection_testing/infrastructures/DetectionTestingInfrastructureServer.py +39 -0
- contentctl_ng-0.1.0/src/contentctl_ng/contentctl_legacy_ported/actions/detection_testing/progress_bar.py +122 -0
- contentctl_ng-0.1.0/src/contentctl_ng/contentctl_legacy_ported/actions/detection_testing/views/DetectionTestingView.py +266 -0
- contentctl_ng-0.1.0/src/contentctl_ng/contentctl_legacy_ported/actions/detection_testing/views/DetectionTestingViewCLI.py +114 -0
- contentctl_ng-0.1.0/src/contentctl_ng/contentctl_legacy_ported/actions/detection_testing/views/DetectionTestingViewFile.py +89 -0
- contentctl_ng-0.1.0/src/contentctl_ng/contentctl_legacy_ported/actions/detection_testing/views/DetectionTestingViewWeb.py +210 -0
- contentctl_ng-0.1.0/src/contentctl_ng/contentctl_legacy_ported/actions/test.py +186 -0
- contentctl_ng-0.1.0/src/contentctl_ng/contentctl_legacy_ported/contentctl.py +266 -0
- contentctl_ng-0.1.0/src/contentctl_ng/contentctl_legacy_ported/helper/splunk_app.py +503 -0
- contentctl_ng-0.1.0/src/contentctl_ng/contentctl_legacy_ported/helper/utils.py +679 -0
- contentctl_ng-0.1.0/src/contentctl_ng/contentctl_legacy_ported/objects/TestOnlyDetection.py +475 -0
- contentctl_ng-0.1.0/src/contentctl_ng/contentctl_legacy_ported/objects/annotated_types.py +14 -0
- contentctl_ng-0.1.0/src/contentctl_ng/contentctl_legacy_ported/objects/base_security_event.py +35 -0
- contentctl_ng-0.1.0/src/contentctl_ng/contentctl_legacy_ported/objects/base_test.py +72 -0
- contentctl_ng-0.1.0/src/contentctl_ng/contentctl_legacy_ported/objects/base_test_result.py +183 -0
- contentctl_ng-0.1.0/src/contentctl_ng/contentctl_legacy_ported/objects/config.py +1902 -0
- contentctl_ng-0.1.0/src/contentctl_ng/contentctl_legacy_ported/objects/constants.py +155 -0
- contentctl_ng-0.1.0/src/contentctl_ng/contentctl_legacy_ported/objects/content_versioning_service.py +698 -0
- contentctl_ng-0.1.0/src/contentctl_ng/contentctl_legacy_ported/objects/correlation_search.py +1361 -0
- contentctl_ng-0.1.0/src/contentctl_ng/contentctl_legacy_ported/objects/detection_metadata.py +91 -0
- contentctl_ng-0.1.0/src/contentctl_ng/contentctl_legacy_ported/objects/enums.py +519 -0
- contentctl_ng-0.1.0/src/contentctl_ng/contentctl_legacy_ported/objects/errors.py +420 -0
- contentctl_ng-0.1.0/src/contentctl_ng/contentctl_legacy_ported/objects/integration_test.py +58 -0
- contentctl_ng-0.1.0/src/contentctl_ng/contentctl_legacy_ported/objects/integration_test_result.py +18 -0
- contentctl_ng-0.1.0/src/contentctl_ng/contentctl_legacy_ported/objects/manual_test.py +47 -0
- contentctl_ng-0.1.0/src/contentctl_ng/contentctl_legacy_ported/objects/manual_test_result.py +17 -0
- contentctl_ng-0.1.0/src/contentctl_ng/contentctl_legacy_ported/objects/mitre_attack_enrichment.py +179 -0
- contentctl_ng-0.1.0/src/contentctl_ng/contentctl_legacy_ported/objects/notable_action.py +53 -0
- contentctl_ng-0.1.0/src/contentctl_ng/contentctl_legacy_ported/objects/notable_event.py +27 -0
- contentctl_ng-0.1.0/src/contentctl_ng/contentctl_legacy_ported/objects/rba.py +190 -0
- contentctl_ng-0.1.0/src/contentctl_ng/contentctl_legacy_ported/objects/risk_analysis_action.py +114 -0
- contentctl_ng-0.1.0/src/contentctl_ng/contentctl_legacy_ported/objects/risk_event.py +311 -0
- contentctl_ng-0.1.0/src/contentctl_ng/contentctl_legacy_ported/objects/risk_object.py +31 -0
- contentctl_ng-0.1.0/src/contentctl_ng/contentctl_legacy_ported/objects/savedsearch_stanza.py +214 -0
- contentctl_ng-0.1.0/src/contentctl_ng/contentctl_legacy_ported/objects/savedsearches_conf.py +228 -0
- contentctl_ng-0.1.0/src/contentctl_ng/contentctl_legacy_ported/objects/test_attack_data.py +72 -0
- contentctl_ng-0.1.0/src/contentctl_ng/contentctl_legacy_ported/objects/test_group.py +102 -0
- contentctl_ng-0.1.0/src/contentctl_ng/contentctl_legacy_ported/objects/threat_object.py +28 -0
- contentctl_ng-0.1.0/src/contentctl_ng/contentctl_legacy_ported/objects/unit_test.py +49 -0
- contentctl_ng-0.1.0/src/contentctl_ng/contentctl_legacy_ported/objects/unit_test_baseline.py +22 -0
- contentctl_ng-0.1.0/src/contentctl_ng/contentctl_legacy_ported/objects/unit_test_result.py +97 -0
- contentctl_ng-0.1.0/src/contentctl_ng/contentctl_legacy_ported/output/yml_writer.py +93 -0
- contentctl_ng-0.1.0/src/contentctl_ng/demo_main.py +22 -0
- contentctl_ng-0.1.0/src/contentctl_ng/generate_erdantic_docs.py +24 -0
- contentctl_ng-0.1.0/src/contentctl_ng/inspect_.py +459 -0
- contentctl_ng-0.1.0/src/contentctl_ng/install.py +994 -0
- contentctl_ng-0.1.0/src/contentctl_ng/objects/app.py +356 -0
- contentctl_ng-0.1.0/src/contentctl_ng/objects/atomic_guid.py +227 -0
- contentctl_ng-0.1.0/src/contentctl_ng/objects/conf.py +879 -0
- contentctl_ng-0.1.0/src/contentctl_ng/objects/content.py +951 -0
- contentctl_ng-0.1.0/src/contentctl_ng/objects/dashboard.py +157 -0
- contentctl_ng-0.1.0/src/contentctl_ng/objects/data_source.py +423 -0
- contentctl_ng-0.1.0/src/contentctl_ng/objects/lookup.py +326 -0
- contentctl_ng-0.1.0/src/contentctl_ng/objects/macro.py +197 -0
- contentctl_ng-0.1.0/src/contentctl_ng/objects/mitre_enrichment.py +236 -0
- contentctl_ng-0.1.0/src/contentctl_ng/objects/object_parser.py +416 -0
- contentctl_ng-0.1.0/src/contentctl_ng/objects/schedule.py +206 -0
- contentctl_ng-0.1.0/src/contentctl_ng/objects/searches/baseline.py +86 -0
- contentctl_ng-0.1.0/src/contentctl_ng/objects/searches/detection.py +910 -0
- contentctl_ng-0.1.0/src/contentctl_ng/objects/searches/search.py +639 -0
- contentctl_ng-0.1.0/src/contentctl_ng/objects/splstring.py +303 -0
- contentctl_ng-0.1.0/src/contentctl_ng/objects/story.py +232 -0
- contentctl_ng-0.1.0/src/contentctl_ng/port.py +65 -0
- contentctl_ng-0.1.0/src/contentctl_ng/py.typed +0 -0
- contentctl_ng-0.1.0/src/contentctl_ng/release_notes.py +456 -0
- contentctl_ng-0.1.0/src/contentctl_ng/resources/datamodels_cim.conf +340 -0
- contentctl_ng-0.1.0/src/contentctl_ng/resources/detection_count_svg.template +18 -0
- contentctl_ng-0.1.0/src/contentctl_ng/resources/detection_coverage_svg.template +16 -0
- contentctl_ng-0.1.0/src/contentctl_ng/resources/install.yml +34 -0
- contentctl_ng-0.1.0/src/contentctl_ng/resources/port_build_template.yml +50 -0
- contentctl_ng-0.1.0/src/contentctl_ng/settings.py +596 -0
- contentctl_ng-0.1.0/src/contentctl_ng/test.py +329 -0
- contentctl_ng-0.1.0/src/contentctl_ng/utilities/common_io.py +461 -0
- contentctl_ng-0.1.0/src/contentctl_ng/utilities/port_yml_file.py +997 -0
- contentctl_ng-0.1.0/src/contentctl_ng/utilities/reporting_tools.py +333 -0
- contentctl_ng-0.1.0/src/contentctl_ng/version.py +73 -0
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
Metadata-Version: 2.3
|
|
2
|
+
Name: contentctl-ng
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Add your description here
|
|
5
|
+
Requires-Dist: mitreattack-python>=5.5.0
|
|
6
|
+
Requires-Dist: pydantic-settings>=2.14.0
|
|
7
|
+
Requires-Dist: pyyaml>=6.0.2
|
|
8
|
+
Requires-Dist: requests>=2.32.5
|
|
9
|
+
Requires-Dist: beautifulsoup4>=4.13.4
|
|
10
|
+
Requires-Dist: lxml>=6.1.0
|
|
11
|
+
Requires-Dist: pydantic>=2.13.3
|
|
12
|
+
Requires-Dist: requests-toolbelt>=1.0.0
|
|
13
|
+
Requires-Dist: splunk-sdk>=2.1.0
|
|
14
|
+
Requires-Dist: pygit2>=1.19.1
|
|
15
|
+
Requires-Dist: xmltodict>=1.0.2
|
|
16
|
+
Requires-Dist: gitpython>=3.1.49
|
|
17
|
+
Requires-Dist: semantic-version>=2.10.0
|
|
18
|
+
Requires-Dist: tenacity>=9.1.2
|
|
19
|
+
Requires-Dist: cron-validator>=1.0.8
|
|
20
|
+
Requires-Python: >=3.14
|
|
21
|
+
Description-Content-Type: text/markdown
|
|
22
|
+
|
|
23
|
+
# contentctl
|
|
24
|
+
<p align="center">
|
|
25
|
+
<img src="https://github.com/splunk/contentctl-ng/raw/refs/heads/main/docs/contentctl_logo_white.png" title="In case you're wondering, it's a capybara" alt="" width="250" height="250"></p>
|
|
26
|
+
</p>
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
[project]
|
|
2
|
+
name = "contentctl-ng"
|
|
3
|
+
version = "0.1.0"
|
|
4
|
+
description = "Add your description here"
|
|
5
|
+
readme = "README.md"
|
|
6
|
+
requires-python = ">=3.14"
|
|
7
|
+
dependencies = [
|
|
8
|
+
"mitreattack-python>=5.5.0",
|
|
9
|
+
"pydantic-settings>=2.14.0",
|
|
10
|
+
"pyyaml>=6.0.2",
|
|
11
|
+
"requests>=2.32.5",
|
|
12
|
+
"beautifulsoup4>=4.13.4",
|
|
13
|
+
"lxml>=6.1.0",
|
|
14
|
+
"pydantic>=2.13.3",
|
|
15
|
+
"requests-toolbelt>=1.0.0",
|
|
16
|
+
"splunk-sdk>=2.1.0",
|
|
17
|
+
"pygit2>=1.19.1",
|
|
18
|
+
"xmltodict>=1.0.2",
|
|
19
|
+
"gitpython>=3.1.49",
|
|
20
|
+
"semantic-version>=2.10.0",
|
|
21
|
+
"tenacity>=9.1.2",
|
|
22
|
+
"cron-validator>=1.0.8",
|
|
23
|
+
]
|
|
24
|
+
|
|
25
|
+
[project.scripts]
|
|
26
|
+
contentctl-ng = "contentctl_ng.cli:main"
|
|
27
|
+
|
|
28
|
+
[build-system]
|
|
29
|
+
requires = ["uv_build"]
|
|
30
|
+
build-backend = "uv_build"
|
|
31
|
+
|
|
32
|
+
[tool.pytest.ini_options]
|
|
33
|
+
addopts = ["--import-mode=importlib"]
|
|
34
|
+
pythonpath = ["src"]
|
|
35
|
+
|
|
36
|
+
[dependency-groups]
|
|
37
|
+
dev = [
|
|
38
|
+
"pytest>=9.0.3",
|
|
39
|
+
"pytest-cov>=7.0.0",
|
|
40
|
+
"ruff>=0.15.12",
|
|
41
|
+
"pre-commit>=4.6.0",
|
|
42
|
+
# TODO: Infratructure around erdantic for docgen is not fully working yet
|
|
43
|
+
# It is maintained here for documentation and potential future use purposes.
|
|
44
|
+
# We have a number of discussions on whether or not erdantic, or an alternative,
|
|
45
|
+
# will be used for docgen moving forward.
|
|
46
|
+
# Note that erdantic has an installation/dependency issue
|
|
47
|
+
# around graphviz that we will need to resolve should we use it.
|
|
48
|
+
#"erdantic>=1.1.1",
|
|
49
|
+
|
|
50
|
+
"pytest-xdist>=3.8.0",
|
|
51
|
+
"responses>=0.25.8",
|
|
52
|
+
]
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
[tool.ruff]
|
|
56
|
+
# Exclude a variety of commonly ignored directories.
|
|
57
|
+
exclude = [
|
|
58
|
+
".bzr",
|
|
59
|
+
".direnv",
|
|
60
|
+
".eggs",
|
|
61
|
+
".git",
|
|
62
|
+
".git-rewrite",
|
|
63
|
+
".hg",
|
|
64
|
+
".ipynb_checkpoints",
|
|
65
|
+
".mypy_cache",
|
|
66
|
+
".nox",
|
|
67
|
+
".pants.d",
|
|
68
|
+
".pyenv",
|
|
69
|
+
".pytest_cache",
|
|
70
|
+
".pytype",
|
|
71
|
+
".ruff_cache",
|
|
72
|
+
".svn",
|
|
73
|
+
".tox",
|
|
74
|
+
".venv",
|
|
75
|
+
".vscode",
|
|
76
|
+
"__pypackages__",
|
|
77
|
+
"_build",
|
|
78
|
+
"buck-out",
|
|
79
|
+
"build",
|
|
80
|
+
"dist",
|
|
81
|
+
"node_modules",
|
|
82
|
+
"site-packages",
|
|
83
|
+
"venv",
|
|
84
|
+
"typings"
|
|
85
|
+
]
|
|
86
|
+
|
|
87
|
+
# Same as Black.
|
|
88
|
+
line-length = 88
|
|
89
|
+
indent-width = 4
|
|
90
|
+
|
|
91
|
+
target-version = "py314"
|
|
92
|
+
|
|
93
|
+
[tool.ruff.lint]
|
|
94
|
+
# Takes settings from old contentctl ruff config, adds "D" and "DOC"
|
|
95
|
+
select = ["E", "W", "F", "I", "RUF", "D", "DOC"]
|
|
96
|
+
ignore = ["E501", "RUF012"]
|
|
97
|
+
|
|
98
|
+
# Allow fix for all enabled rules (when `--fix`) is provided.
|
|
99
|
+
fixable = ["ALL"]
|
|
100
|
+
unfixable = []
|
|
101
|
+
|
|
102
|
+
# Allow unused variables when underscore-prefixed.
|
|
103
|
+
dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"
|
|
104
|
+
|
|
105
|
+
[tool.ruff.format]
|
|
106
|
+
# Like Black, use double quotes for strings.
|
|
107
|
+
quote-style = "double"
|
|
108
|
+
|
|
109
|
+
# Like Black, indent with spaces, rather than tabs.
|
|
110
|
+
indent-style = "space"
|
|
111
|
+
|
|
112
|
+
# Like Black, respect magic trailing commas.
|
|
113
|
+
skip-magic-trailing-comma = false
|
|
114
|
+
|
|
115
|
+
# Like Black, automatically detect the appropriate line ending.
|
|
116
|
+
line-ending = "auto"
|
|
117
|
+
|
|
118
|
+
# Enable auto-formatting of code examples in docstrings. Markdown,
|
|
119
|
+
# reStructuredText code/literal blocks and doctests are all supported.
|
|
120
|
+
#
|
|
121
|
+
# This is currently disabled by default, but it is planned for this
|
|
122
|
+
# to be opt-out in the future.
|
|
123
|
+
docstring-code-format = false
|
|
124
|
+
|
|
125
|
+
# Set the line length limit used when formatting code snippets in
|
|
126
|
+
# docstrings.
|
|
127
|
+
#
|
|
128
|
+
# This only has an effect when the `docstring-code-format` setting is
|
|
129
|
+
# enabled.
|
|
130
|
+
docstring-code-line-length = "dynamic"
|
|
131
|
+
|
|
132
|
+
|
|
133
|
+
[tool.ruff.lint.pydocstyle]
|
|
134
|
+
# Require google Docstring format. For documentation on google docstring format see:
|
|
135
|
+
# https://sphinxcontrib-napoleon.readthedocs.io/en/latest/example_google.html
|
|
136
|
+
convention = "google"
|
|
137
|
+
|
|
138
|
+
[[tool.uv.index]]
|
|
139
|
+
name="pypi"
|
|
140
|
+
url="https://pypi.org/simple"
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"""Allows contentctl_ng to be used as a package."""
|
|
2
|
+
|
|
3
|
+
import os
|
|
4
|
+
import sys
|
|
5
|
+
|
|
6
|
+
TQDM_DISABLE_ENV_VAR = "TQDM_DISABLE"
|
|
7
|
+
|
|
8
|
+
if not sys.stderr.isatty() and TQDM_DISABLE_ENV_VAR not in os.environ:
|
|
9
|
+
# If stderr is not a terminal and the envvar is not already set, disable tqdm progress bars to avoid messy output
|
|
10
|
+
os.environ[TQDM_DISABLE_ENV_VAR] = "true"
|