Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
5 changes: 4 additions & 1 deletion contentctl/actions/detection_testing/GitService.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
from contentctl.objects.config import All, Changes, Selected, test_common
from contentctl.objects.data_source import DataSource
from contentctl.objects.detection import Detection
from contentctl.objects.lookup import CSVLookup, Lookup
from contentctl.objects.lookup import CSVLookup, Lookup, RuntimeCSV
from contentctl.objects.macro import Macro
from contentctl.objects.security_content_object import SecurityContentObject

Expand Down Expand Up @@ -148,6 +148,9 @@ def getChanges(self, target_branch: str) -> List[Detection]:
matched = list(
filter(
lambda x: isinstance(x, CSVLookup)
and not isinstance(
x, RuntimeCSV
) # RuntimeCSV is not used directly by any content
and x.filename == decoded_path,
self.director.lookups,
)
Expand Down
2 changes: 1 addition & 1 deletion contentctl/actions/validate.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ def ensure_no_orphaned_files_in_lookups(
"""
lookupsDirectory = repo_path / "lookups"

# Get all of the files referneced by Lookups
# Get all of the files referenced by Lookups
usedLookupFiles: list[pathlib.Path] = [
lookup.filename
for lookup in director_output_dto.lookups
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -547,7 +547,7 @@ def serialize_model(self):
{
"name": lookup.name,
"description": lookup.description,
"filename": lookup.filename.name,
"filename": lookup.filename.name, # This does not cause an issue for RuntimeCSV type because they are not used by any detections
"default_match": lookup.default_match,
"case_sensitive_match": "true"
if lookup.case_sensitive_match
Expand Down
2 changes: 1 addition & 1 deletion contentctl/objects/lookup.py
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ def filename(self) -> FilePath:
"""
if self.file_path is None:
raise ValueError(
f"Cannot get the filename of the lookup {self.lookup_type} because the YML file_path attribute is None"
f"Cannot get the filename of the lookup {self.lookup_type} for content [{self.name}] because the YML file_path attribute is None"
) # type: ignore

csv_file = self.file_path.parent / f"{self.file_path.stem}.{self.lookup_type}" # type: ignore
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[tool.poetry]
name = "contentctl"

version = "5.3.0"
version = "5.3.1"

description = "Splunk Content Control Tool"
authors = ["STRT <research@splunk.com>"]
Expand Down
Loading