Skip to content

Commit db19969

Browse files
committed
change _UPDATE_ string to __UPDATE__
Remove extra pair of quotes from new detection template
1 parent 3fea2f6 commit db19969

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

contentctl/actions/new_content.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
from contentctl.objects.enums import AssetType
1313
from contentctl.objects.constants import SES_OBSERVABLE_TYPE_MAPPING, SES_OBSERVABLE_ROLE_MAPPING
1414
class NewContent:
15-
UPDATE_PREFIX = "_UPDATE_"
15+
UPDATE_PREFIX = "__UPDATE__"
1616

1717
DEFAULT_DRILLDOWN_DEF = [
1818
{
@@ -68,7 +68,7 @@ def buildDetection(self) -> tuple[dict[str, Any], str]:
6868
"type": answers["detection_type"],
6969
"description": f"{NewContent.UPDATE_PREFIX} by providing a description of your search",
7070
"data_source": data_source_field,
71-
"search": f"{answers['detection_search']} | `{file_name}_filter`'",
71+
"search": f"{answers['detection_search']} | `{file_name}_filter`",
7272
"how_to_implement": f"{NewContent.UPDATE_PREFIX} how to implement your search",
7373
"known_false_positives": f"{NewContent.UPDATE_PREFIX} known false positives for your search",
7474
"references": [f"{NewContent.UPDATE_PREFIX} zero or more http references to provide more information about your search"],

contentctl/input/new_content_questions.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ def get_questions_detection(cls) -> list[dict[str,Any]]:
5757
"type": "text",
5858
"message": "enter search (spl)",
5959
"name": "detection_search",
60-
"default": "| _UPDATE_ SPL",
60+
"default": "| __UPDATE__ SPL",
6161
},
6262
{
6363
"type": "text",

contentctl/input/yml_reader.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ def load_file(file_path: pathlib.Path, add_fields:bool=True, STRICT_YML_CHECKING
2929
# and use NewContent.UPDATE_PREFIX,
3030
# but there is a circular dependency right now which makes that difficult.
3131
# We have instead hardcoded UPDATE_PREFIX
32-
UPDATE_PREFIX = "_UPDATE_"
32+
UPDATE_PREFIX = "__UPDATE__"
3333
data = file_handler.read()
3434
if UPDATE_PREFIX in data:
3535
raise Exception(f"The file {file_path} contains the value '{UPDATE_PREFIX}'. Please fill out any unpopulated fields as required.")

0 commit comments

Comments
 (0)