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.
Files changed (87) hide show
  1. contentctl_ng-0.1.0/PKG-INFO +26 -0
  2. contentctl_ng-0.1.0/README.md +4 -0
  3. contentctl_ng-0.1.0/pyproject.toml +140 -0
  4. contentctl_ng-0.1.0/src/contentctl_ng/__init__.py +10 -0
  5. contentctl_ng-0.1.0/src/contentctl_ng/__main__.py +10 -0
  6. contentctl_ng-0.1.0/src/contentctl_ng/build.py +635 -0
  7. contentctl_ng-0.1.0/src/contentctl_ng/cli.py +143 -0
  8. contentctl_ng-0.1.0/src/contentctl_ng/contentctl_legacy_ported/__init__.py +4 -0
  9. contentctl_ng-0.1.0/src/contentctl_ng/contentctl_legacy_ported/actions/detection_testing/DetectionTestingManager.py +309 -0
  10. contentctl_ng-0.1.0/src/contentctl_ng/contentctl_legacy_ported/actions/detection_testing/GitService.py +388 -0
  11. contentctl_ng-0.1.0/src/contentctl_ng/contentctl_legacy_ported/actions/detection_testing/infrastructures/DetectionTestingInfrastructure.py +1872 -0
  12. contentctl_ng-0.1.0/src/contentctl_ng/contentctl_legacy_ported/actions/detection_testing/infrastructures/DetectionTestingInfrastructureServer.py +39 -0
  13. contentctl_ng-0.1.0/src/contentctl_ng/contentctl_legacy_ported/actions/detection_testing/progress_bar.py +122 -0
  14. contentctl_ng-0.1.0/src/contentctl_ng/contentctl_legacy_ported/actions/detection_testing/views/DetectionTestingView.py +266 -0
  15. contentctl_ng-0.1.0/src/contentctl_ng/contentctl_legacy_ported/actions/detection_testing/views/DetectionTestingViewCLI.py +114 -0
  16. contentctl_ng-0.1.0/src/contentctl_ng/contentctl_legacy_ported/actions/detection_testing/views/DetectionTestingViewFile.py +89 -0
  17. contentctl_ng-0.1.0/src/contentctl_ng/contentctl_legacy_ported/actions/detection_testing/views/DetectionTestingViewWeb.py +210 -0
  18. contentctl_ng-0.1.0/src/contentctl_ng/contentctl_legacy_ported/actions/test.py +186 -0
  19. contentctl_ng-0.1.0/src/contentctl_ng/contentctl_legacy_ported/contentctl.py +266 -0
  20. contentctl_ng-0.1.0/src/contentctl_ng/contentctl_legacy_ported/helper/splunk_app.py +503 -0
  21. contentctl_ng-0.1.0/src/contentctl_ng/contentctl_legacy_ported/helper/utils.py +679 -0
  22. contentctl_ng-0.1.0/src/contentctl_ng/contentctl_legacy_ported/objects/TestOnlyDetection.py +475 -0
  23. contentctl_ng-0.1.0/src/contentctl_ng/contentctl_legacy_ported/objects/annotated_types.py +14 -0
  24. contentctl_ng-0.1.0/src/contentctl_ng/contentctl_legacy_ported/objects/base_security_event.py +35 -0
  25. contentctl_ng-0.1.0/src/contentctl_ng/contentctl_legacy_ported/objects/base_test.py +72 -0
  26. contentctl_ng-0.1.0/src/contentctl_ng/contentctl_legacy_ported/objects/base_test_result.py +183 -0
  27. contentctl_ng-0.1.0/src/contentctl_ng/contentctl_legacy_ported/objects/config.py +1902 -0
  28. contentctl_ng-0.1.0/src/contentctl_ng/contentctl_legacy_ported/objects/constants.py +155 -0
  29. contentctl_ng-0.1.0/src/contentctl_ng/contentctl_legacy_ported/objects/content_versioning_service.py +698 -0
  30. contentctl_ng-0.1.0/src/contentctl_ng/contentctl_legacy_ported/objects/correlation_search.py +1361 -0
  31. contentctl_ng-0.1.0/src/contentctl_ng/contentctl_legacy_ported/objects/detection_metadata.py +91 -0
  32. contentctl_ng-0.1.0/src/contentctl_ng/contentctl_legacy_ported/objects/enums.py +519 -0
  33. contentctl_ng-0.1.0/src/contentctl_ng/contentctl_legacy_ported/objects/errors.py +420 -0
  34. contentctl_ng-0.1.0/src/contentctl_ng/contentctl_legacy_ported/objects/integration_test.py +58 -0
  35. contentctl_ng-0.1.0/src/contentctl_ng/contentctl_legacy_ported/objects/integration_test_result.py +18 -0
  36. contentctl_ng-0.1.0/src/contentctl_ng/contentctl_legacy_ported/objects/manual_test.py +47 -0
  37. contentctl_ng-0.1.0/src/contentctl_ng/contentctl_legacy_ported/objects/manual_test_result.py +17 -0
  38. contentctl_ng-0.1.0/src/contentctl_ng/contentctl_legacy_ported/objects/mitre_attack_enrichment.py +179 -0
  39. contentctl_ng-0.1.0/src/contentctl_ng/contentctl_legacy_ported/objects/notable_action.py +53 -0
  40. contentctl_ng-0.1.0/src/contentctl_ng/contentctl_legacy_ported/objects/notable_event.py +27 -0
  41. contentctl_ng-0.1.0/src/contentctl_ng/contentctl_legacy_ported/objects/rba.py +190 -0
  42. contentctl_ng-0.1.0/src/contentctl_ng/contentctl_legacy_ported/objects/risk_analysis_action.py +114 -0
  43. contentctl_ng-0.1.0/src/contentctl_ng/contentctl_legacy_ported/objects/risk_event.py +311 -0
  44. contentctl_ng-0.1.0/src/contentctl_ng/contentctl_legacy_ported/objects/risk_object.py +31 -0
  45. contentctl_ng-0.1.0/src/contentctl_ng/contentctl_legacy_ported/objects/savedsearch_stanza.py +214 -0
  46. contentctl_ng-0.1.0/src/contentctl_ng/contentctl_legacy_ported/objects/savedsearches_conf.py +228 -0
  47. contentctl_ng-0.1.0/src/contentctl_ng/contentctl_legacy_ported/objects/test_attack_data.py +72 -0
  48. contentctl_ng-0.1.0/src/contentctl_ng/contentctl_legacy_ported/objects/test_group.py +102 -0
  49. contentctl_ng-0.1.0/src/contentctl_ng/contentctl_legacy_ported/objects/threat_object.py +28 -0
  50. contentctl_ng-0.1.0/src/contentctl_ng/contentctl_legacy_ported/objects/unit_test.py +49 -0
  51. contentctl_ng-0.1.0/src/contentctl_ng/contentctl_legacy_ported/objects/unit_test_baseline.py +22 -0
  52. contentctl_ng-0.1.0/src/contentctl_ng/contentctl_legacy_ported/objects/unit_test_result.py +97 -0
  53. contentctl_ng-0.1.0/src/contentctl_ng/contentctl_legacy_ported/output/yml_writer.py +93 -0
  54. contentctl_ng-0.1.0/src/contentctl_ng/demo_main.py +22 -0
  55. contentctl_ng-0.1.0/src/contentctl_ng/generate_erdantic_docs.py +24 -0
  56. contentctl_ng-0.1.0/src/contentctl_ng/inspect_.py +459 -0
  57. contentctl_ng-0.1.0/src/contentctl_ng/install.py +994 -0
  58. contentctl_ng-0.1.0/src/contentctl_ng/objects/app.py +356 -0
  59. contentctl_ng-0.1.0/src/contentctl_ng/objects/atomic_guid.py +227 -0
  60. contentctl_ng-0.1.0/src/contentctl_ng/objects/conf.py +879 -0
  61. contentctl_ng-0.1.0/src/contentctl_ng/objects/content.py +951 -0
  62. contentctl_ng-0.1.0/src/contentctl_ng/objects/dashboard.py +157 -0
  63. contentctl_ng-0.1.0/src/contentctl_ng/objects/data_source.py +423 -0
  64. contentctl_ng-0.1.0/src/contentctl_ng/objects/lookup.py +326 -0
  65. contentctl_ng-0.1.0/src/contentctl_ng/objects/macro.py +197 -0
  66. contentctl_ng-0.1.0/src/contentctl_ng/objects/mitre_enrichment.py +236 -0
  67. contentctl_ng-0.1.0/src/contentctl_ng/objects/object_parser.py +416 -0
  68. contentctl_ng-0.1.0/src/contentctl_ng/objects/schedule.py +206 -0
  69. contentctl_ng-0.1.0/src/contentctl_ng/objects/searches/baseline.py +86 -0
  70. contentctl_ng-0.1.0/src/contentctl_ng/objects/searches/detection.py +910 -0
  71. contentctl_ng-0.1.0/src/contentctl_ng/objects/searches/search.py +639 -0
  72. contentctl_ng-0.1.0/src/contentctl_ng/objects/splstring.py +303 -0
  73. contentctl_ng-0.1.0/src/contentctl_ng/objects/story.py +232 -0
  74. contentctl_ng-0.1.0/src/contentctl_ng/port.py +65 -0
  75. contentctl_ng-0.1.0/src/contentctl_ng/py.typed +0 -0
  76. contentctl_ng-0.1.0/src/contentctl_ng/release_notes.py +456 -0
  77. contentctl_ng-0.1.0/src/contentctl_ng/resources/datamodels_cim.conf +340 -0
  78. contentctl_ng-0.1.0/src/contentctl_ng/resources/detection_count_svg.template +18 -0
  79. contentctl_ng-0.1.0/src/contentctl_ng/resources/detection_coverage_svg.template +16 -0
  80. contentctl_ng-0.1.0/src/contentctl_ng/resources/install.yml +34 -0
  81. contentctl_ng-0.1.0/src/contentctl_ng/resources/port_build_template.yml +50 -0
  82. contentctl_ng-0.1.0/src/contentctl_ng/settings.py +596 -0
  83. contentctl_ng-0.1.0/src/contentctl_ng/test.py +329 -0
  84. contentctl_ng-0.1.0/src/contentctl_ng/utilities/common_io.py +461 -0
  85. contentctl_ng-0.1.0/src/contentctl_ng/utilities/port_yml_file.py +997 -0
  86. contentctl_ng-0.1.0/src/contentctl_ng/utilities/reporting_tools.py +333 -0
  87. 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,4 @@
1
+ # contentctl
2
+ <p align="center">
3
+ <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>
4
+ </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"
@@ -0,0 +1,10 @@
1
+ """Allows the main cli entry to be invoked when running contentctl_ng as a module.
2
+
3
+ i.e.:
4
+ python -m contentctl_ng install
5
+ """
6
+
7
+ from contentctl_ng.cli import main
8
+
9
+ if __name__ == "__main__":
10
+ main()