Skip to content

Commit

Permalink
Container Script (demisto#34445)
Browse files Browse the repository at this point in the history
  • Loading branch information
tkatzir authored Jun 3, 2024
1 parent ea34357 commit 0a10bc3
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 1 deletion.
6 changes: 6 additions & 0 deletions Packs/Base/ReleaseNotes/1_34_9.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@

#### Scripts

##### CommonServerPython

- Added support for determining which script runs in the Docker container.
10 changes: 10 additions & 0 deletions Packs/Base/Scripts/CommonServerPython/CommonServerPython.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,16 @@ def __line__():
SEND_PREFIX = "send: b'"
SAFE_SLEEP_START_TIME = datetime.now()

try:
if 'context' in demisto.callingContext \
and 'ExecutedCommands' in demisto.callingContext['context'] \
and 'name' in demisto.callingContext['context']['ExecutedCommands'][0]:
context_executed_commands_name = demisto.callingContext['context']['ExecutedCommands'][0]['name']
with open('script_info.txt', 'w') as file_demisto_info:
file_demisto_info.write(context_executed_commands_name)
except Exception as exc_script_info:
demisto.info('failed to save the script info.\nError: {}'.format(exc_script_info))


def register_module_line(module_name, start_end, line, wrapper=0):
"""
Expand Down
2 changes: 1 addition & 1 deletion Packs/Base/pack_metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "Base",
"description": "The base pack for Cortex XSOAR.",
"support": "xsoar",
"currentVersion": "1.34.8",
"currentVersion": "1.34.9",
"author": "Cortex XSOAR",
"serverMinVersion": "6.0.0",
"url": "https://www.paloaltonetworks.com/cortex",
Expand Down

0 comments on commit 0a10bc3

Please sign in to comment.