diff --git a/.pre-commit-config_template.yaml b/.pre-commit-config_template.yaml index a93e9d274b47..0633cf2a2737 100644 --- a/.pre-commit-config_template.yaml +++ b/.pre-commit-config_template.yaml @@ -98,7 +98,7 @@ repos: args: - --ignore=demistomock.py,CommonServerPython.py,CommonServerUserPython.py,conftest.py,.venv - -E - - --disable=bad-option-value,unsubscriptable-object + - --disable=bad-option-value,unsubscriptable-object,E0601,E0606 # Remove E0601,E0606 after CIAC-11651 is done - -d duplicate-string-formatting-argument - "--msg-template='{path}:{line}:{column}: {msg_id} {obj}: {msg}'" - --generated-members=requests.packages.urllib3,requests.codes.ok diff --git a/Packs/AWS-ACM/ReleaseNotes/1_1_40.md b/Packs/AWS-ACM/ReleaseNotes/1_1_40.md new file mode 100644 index 000000000000..efd98ff53cc8 --- /dev/null +++ b/Packs/AWS-ACM/ReleaseNotes/1_1_40.md @@ -0,0 +1,4 @@ +#### Integrations + +##### AWS - ACM +Code functionality improvements. \ No newline at end of file diff --git a/Packs/AWS-ACM/pack_metadata.json b/Packs/AWS-ACM/pack_metadata.json index 9787ac3994da..f6a6f4090fda 100644 --- a/Packs/AWS-ACM/pack_metadata.json +++ b/Packs/AWS-ACM/pack_metadata.json @@ -2,7 +2,7 @@ "name": "AWS - ACM", "description": "Amazon Web Services Certificate Manager Service (acm)", "support": "xsoar", - "currentVersion": "1.1.39", + "currentVersion": "1.1.40", "author": "Cortex XSOAR", "url": "https://www.paloaltonetworks.com/cortex", "email": "", diff --git a/Packs/AWS-AccessAnalyzer/ReleaseNotes/1_1_37.md b/Packs/AWS-AccessAnalyzer/ReleaseNotes/1_1_37.md new file mode 100644 index 000000000000..92cc46d55635 --- /dev/null +++ b/Packs/AWS-AccessAnalyzer/ReleaseNotes/1_1_37.md @@ -0,0 +1,4 @@ +#### Integrations + +##### AWS - AccessAnalyzer +Code functionality improvements. \ No newline at end of file diff --git a/Packs/AWS-AccessAnalyzer/pack_metadata.json b/Packs/AWS-AccessAnalyzer/pack_metadata.json index 2ea212e4e0d7..21ddfd87bafe 100644 --- a/Packs/AWS-AccessAnalyzer/pack_metadata.json +++ b/Packs/AWS-AccessAnalyzer/pack_metadata.json @@ -2,7 +2,7 @@ "name": "AWS - AccessAnalyzer", "description": "Amazon Web Services IAM Access Analyzer", "support": "xsoar", - "currentVersion": "1.1.36", + "currentVersion": "1.1.37", "author": "Cortex XSOAR", "url": "https://www.paloaltonetworks.com/cortex", "email": "", diff --git a/Packs/AWS-Athena/ReleaseNotes/2_0_5.md b/Packs/AWS-Athena/ReleaseNotes/2_0_5.md new file mode 100644 index 000000000000..68ff3312208a --- /dev/null +++ b/Packs/AWS-Athena/ReleaseNotes/2_0_5.md @@ -0,0 +1,4 @@ +#### Integrations + +##### AWS - Athena +Code functionality improvements. \ No newline at end of file diff --git a/Packs/AWS-Athena/pack_metadata.json b/Packs/AWS-Athena/pack_metadata.json index 107d50e7036a..32bc2cff99d0 100644 --- a/Packs/AWS-Athena/pack_metadata.json +++ b/Packs/AWS-Athena/pack_metadata.json @@ -2,7 +2,7 @@ "name": "AWS - Athena", "description": "Amazon Web Services Athena", "support": "xsoar", - "currentVersion": "2.0.4", + "currentVersion": "2.0.5", "author": "Cortex XSOAR", "url": "https://www.paloaltonetworks.com/cortex", "email": "", diff --git a/Packs/AWS-CloudWatchLogs/Integrations/AWS-CloudWatchLogs/AWS-CloudWatchLogs.py b/Packs/AWS-CloudWatchLogs/Integrations/AWS-CloudWatchLogs/AWS-CloudWatchLogs.py index 5f37f476aed3..f10ee519e9ca 100644 --- a/Packs/AWS-CloudWatchLogs/Integrations/AWS-CloudWatchLogs/AWS-CloudWatchLogs.py +++ b/Packs/AWS-CloudWatchLogs/Integrations/AWS-CloudWatchLogs/AWS-CloudWatchLogs.py @@ -144,7 +144,7 @@ def filter_log_events(args, aws_client): if args.get('limit') is not None: kwargs.update({'limit': int(args.get('limit'))}) if args.get('interleaved') is not None: - kwargs.update({'interleaved': True if args.get('interleaved') == 'True' else False}) + kwargs.update({'interleaved': args.get('interleaved') == 'True'}) response = client.filter_log_events(**kwargs) for event in response['events']: @@ -435,6 +435,7 @@ def main(): retries, sts_endpoint_url=sts_endpoint_url, endpoint_url=endpoint_url) command = demisto.command() args = demisto.args() + result = "" if command == 'test-module': # This is the call made when pressing the integration test button. diff --git a/Packs/AWS-CloudWatchLogs/Integrations/AWS-CloudWatchLogs/AWS-CloudWatchLogs.yml b/Packs/AWS-CloudWatchLogs/Integrations/AWS-CloudWatchLogs/AWS-CloudWatchLogs.yml index 4f8104917ce1..1c0db62741f9 100644 --- a/Packs/AWS-CloudWatchLogs/Integrations/AWS-CloudWatchLogs/AWS-CloudWatchLogs.yml +++ b/Packs/AWS-CloudWatchLogs/Integrations/AWS-CloudWatchLogs/AWS-CloudWatchLogs.yml @@ -461,7 +461,7 @@ script: description: The name of the log group. type: string description: Lists the specified metric filters. You can list all the metric filters or filter the results by log name, prefix, metric name, or metric namespace. - dockerimage: demisto/boto3py3:1.0.0.115129 + dockerimage: demisto/boto3py3:1.0.0.1894954 tests: - No Tests fromversion: 5.0.0 diff --git a/Packs/AWS-CloudWatchLogs/ReleaseNotes/1_2_26.md b/Packs/AWS-CloudWatchLogs/ReleaseNotes/1_2_26.md new file mode 100644 index 000000000000..c1935b5e6c02 --- /dev/null +++ b/Packs/AWS-CloudWatchLogs/ReleaseNotes/1_2_26.md @@ -0,0 +1,5 @@ +#### Integrations + +##### AWS - CloudWatchLogs +- Code functionality improvements. +- Updated the Docker image to: *demisto/boto3py3:1.0.0.1894954*. \ No newline at end of file diff --git a/Packs/AWS-CloudWatchLogs/pack_metadata.json b/Packs/AWS-CloudWatchLogs/pack_metadata.json index bc2b7dfaa9b2..a38fe92d3710 100644 --- a/Packs/AWS-CloudWatchLogs/pack_metadata.json +++ b/Packs/AWS-CloudWatchLogs/pack_metadata.json @@ -2,7 +2,7 @@ "name": "AWS - CloudWatchLogs", "description": "Amazon Web Services CloudWatch Logs (logs).", "support": "xsoar", - "currentVersion": "1.2.25", + "currentVersion": "1.2.26", "author": "Cortex XSOAR", "url": "https://www.paloaltonetworks.com/cortex", "email": "", diff --git a/Packs/AWS-EC2/ReleaseNotes/1_4_17.md b/Packs/AWS-EC2/ReleaseNotes/1_4_17.md new file mode 100644 index 000000000000..bb09fe5a1d2b --- /dev/null +++ b/Packs/AWS-EC2/ReleaseNotes/1_4_17.md @@ -0,0 +1,4 @@ +#### Integrations + +##### AWS - EC2 +Code functionality improvements. \ No newline at end of file diff --git a/Packs/AWS-EC2/pack_metadata.json b/Packs/AWS-EC2/pack_metadata.json index 0bc14bb40c2c..fc4e7b614df5 100644 --- a/Packs/AWS-EC2/pack_metadata.json +++ b/Packs/AWS-EC2/pack_metadata.json @@ -2,7 +2,7 @@ "name": "AWS - EC2", "description": "Amazon Web Services Elastic Compute Cloud (EC2)", "support": "xsoar", - "currentVersion": "1.4.16", + "currentVersion": "1.4.17", "author": "Cortex XSOAR", "url": "https://www.paloaltonetworks.com/cortex", "email": "", diff --git a/Packs/AWS-EKS/ReleaseNotes/1_0_7.md b/Packs/AWS-EKS/ReleaseNotes/1_0_7.md new file mode 100644 index 000000000000..c52eabb9bccc --- /dev/null +++ b/Packs/AWS-EKS/ReleaseNotes/1_0_7.md @@ -0,0 +1,4 @@ +#### Integrations + +##### AWS-EKS +Code functionality improvements. \ No newline at end of file diff --git a/Packs/AWS-EKS/pack_metadata.json b/Packs/AWS-EKS/pack_metadata.json index d8f951e28252..988e050dd744 100644 --- a/Packs/AWS-EKS/pack_metadata.json +++ b/Packs/AWS-EKS/pack_metadata.json @@ -2,7 +2,7 @@ "name": "AWS - EKS", "description": "The AWS EKS integration allows for the management and operation of Amazon Elastic Kubernetes Service (EKS) clusters.", "support": "xsoar", - "currentVersion": "1.0.6", + "currentVersion": "1.0.7", "author": "Cortex XSOAR", "url": "https://www.paloaltonetworks.com/cortex", "email": "", diff --git a/Packs/AWS-GuardDuty/Integrations/AWSGuardDuty/AWSGuardDuty.py b/Packs/AWS-GuardDuty/Integrations/AWSGuardDuty/AWSGuardDuty.py index 203b92e3bd09..90d9beb04178 100644 --- a/Packs/AWS-GuardDuty/Integrations/AWSGuardDuty/AWSGuardDuty.py +++ b/Packs/AWS-GuardDuty/Integrations/AWSGuardDuty/AWSGuardDuty.py @@ -48,7 +48,7 @@ def create_detector(client: "GuardDutyClient", args: dict) -> CommandResults: if args.get('findingFrequency'): kwargs['FindingPublishingFrequency'] = FINDING_FREQUENCY[args['findingFrequency']] - get_dataSources = dict() + get_dataSources = {} if args.get('enableKubernetesLogs'): get_dataSources.update( {'Kubernetes': {'AuditLogs': {'Enable': argToBoolean(args['enableKubernetesLogs'])}}}) @@ -73,7 +73,7 @@ def create_detector(client: "GuardDutyClient", args: dict) -> CommandResults: def delete_detector(client: "GuardDutyClient", args: dict): response = client.delete_detector(DetectorId=args.get('detectorId', '')) - if response == dict() or response.get('ResponseMetadata', {}).get('HTTPStatusCode') == 200: + if response == {} or response.get('ResponseMetadata', {}).get('HTTPStatusCode') == 200: return f"The Detector {args.get('detectorId')} has been deleted" else: raise Exception(f"The Detector {args.get('detectorId')} failed to delete.") @@ -118,7 +118,7 @@ def update_detector(client: "GuardDutyClient", args: dict) -> str: if args.get('findingFrequency'): kwargs['FindingPublishingFrequency'] = FINDING_FREQUENCY[args['findingFrequency']] - get_dataSources = dict() + get_dataSources = {} if args.get('enableKubernetesLogs'): get_dataSources.update( {'Kubernetes': {'AuditLogs': {'Enable': argToBoolean(args['enableKubernetesLogs'])}}}) @@ -131,7 +131,7 @@ def update_detector(client: "GuardDutyClient", args: dict) -> str: kwargs['DataSources'] = get_dataSources response = client.update_detector(**kwargs) - if response == dict() or response.get('ResponseMetadata', {}).get('HTTPStatusCode') == 200: + if response == {} or response.get('ResponseMetadata', {}).get('HTTPStatusCode') == 200: return f"The Detector {args.get('detectorId')} has been updated successfully" else: raise Exception(f"Detector {args.get('detectorId')} failed to update. Response was: {response}") @@ -167,7 +167,7 @@ def list_detectors(client: "GuardDutyClient", args: dict) -> CommandResults: def create_ip_set(client: "GuardDutyClient", args: dict): kwargs: dict[str, Any] = {'DetectorId': args.get('detectorId')} if args.get('activate') is not None: - kwargs.update({'Activate': True if args.get('activate') == 'True' else False}) + kwargs.update({'Activate': args.get('activate') == 'True'}) if args.get('format') is not None: kwargs.update({'Format': args.get('format')}) if args.get('location') is not None: @@ -193,7 +193,7 @@ def delete_ip_set(client: "GuardDutyClient", args: dict): DetectorId=args.get('detectorId', ''), IpSetId=args.get('ipSetId', '') ) - if response == dict() or response.get('ResponseMetadata', {}).get('HTTPStatusCode') == 200: + if response == {} or response.get('ResponseMetadata', {}).get('HTTPStatusCode') == 200: return f"The IPSet {args.get('ipSetId')} has been deleted from Detector {args.get('detectorId')}" else: @@ -206,7 +206,7 @@ def update_ip_set(client: "GuardDutyClient", args: dict): 'IpSetId': args.get('ipSetId') } if args.get('activate'): - kwargs.update({'Activate': True if args.get('activate') == 'True' else False}) + kwargs.update({'Activate': args.get('activate') == 'True'}) if args.get('location'): kwargs.update({'Location': args.get('location')}) if args.get('name'): @@ -214,7 +214,7 @@ def update_ip_set(client: "GuardDutyClient", args: dict): response = client.update_ip_set(**kwargs) - if response == dict() or response.get('ResponseMetadata', {}).get('HTTPStatusCode') == 200: + if response == {} or response.get('ResponseMetadata', {}).get('HTTPStatusCode') == 200: return f"The IPSet {args.get('ipSetId')} has been Updated" else: @@ -269,7 +269,7 @@ def list_ip_sets(client: "GuardDutyClient", args: dict) -> CommandResults: def create_threat_intel_set(client: "GuardDutyClient", args: dict): kwargs: dict[str, Any] = {'DetectorId': args.get('detectorId')} if args.get('activate') is not None: - kwargs.update({'Activate': True if args.get('activate') == 'True' else False}) + kwargs.update({'Activate': args.get('activate') == 'True'}) if args.get('format') is not None: kwargs.update({'Format': args.get('format')}) if args.get('location') is not None: @@ -296,7 +296,7 @@ def delete_threat_intel_set(client: "GuardDutyClient", args: dict): DetectorId=args.get('detectorId', ''), ThreatIntelSetId=args.get('threatIntelSetId', '') ) - if response == dict() or response.get('ResponseMetadata', {}).get('HTTPStatusCode') == 200: + if response == {} or response.get('ResponseMetadata', {}).get('HTTPStatusCode') == 200: return f"The ThreatIntel Set {args.get('threatIntelSetId')} has been deleted from Detector {args.get('detectorId')}" else: raise Exception(f"Failed to delete ThreatIntel set {args.get('threatIntelSetId')} . Response was: {response}") @@ -357,14 +357,14 @@ def update_threat_intel_set(client: "GuardDutyClient", args: dict): 'ThreatIntelSetId': args.get('threatIntelSetId') } if args.get('activate'): - kwargs.update({'Activate': True if args.get('activate') == 'True' else False}) + kwargs.update({'Activate': args.get('activate') == 'True'}) if args.get('location'): kwargs.update({'Location': args.get('location')}) if args.get('name'): kwargs.update({'Name': args.get('name')}) response = client.update_threat_intel_set(**kwargs) - if response == dict() or response.get('ResponseMetadata', {}).get('HTTPStatusCode') == 200: + if response == {} or response.get('ResponseMetadata', {}).get('HTTPStatusCode') == 200: return f"The ThreatIntel set {args.get('threatIntelSetId')} has been updated" else: raise Exception(f"Failed updating ThreatIntel set {args.get('threatIntelSetId')}. " @@ -457,7 +457,7 @@ def parse_finding(finding: "FindingTypeDef") -> Dict[str, Any]: which is generated when abnormal or suspicious activity is detected. :return: parsed_finding """ - parsed_finding: dict = dict() + parsed_finding: dict = {} parsed_finding['AccountId'] = finding.get('AccountId') parsed_finding['CreatedAt'] = finding.get('CreatedAt') parsed_finding['Description'] = finding.get('Description') @@ -511,7 +511,7 @@ def get_findings(client: "GuardDutyClient", args: dict) -> dict: def parse_incident_from_finding(finding: "FindingTypeDef") -> Dict[str, Any]: - incident: dict = dict() + incident: dict = {} incident['name'] = finding.get('Title') incident['details'] = finding.get('Description') incident['occurred'] = finding.get('CreatedAt') @@ -646,7 +646,7 @@ def create_sample_findings(client: "GuardDutyClient", args: dict): response = client.create_sample_findings(**kwargs) - if response == dict() or response.get('ResponseMetadata', {}).get('HTTPStatusCode') == 200: + if response == {} or response.get('ResponseMetadata', {}).get('HTTPStatusCode') == 200: return "Sample Findings were generated" else: raise Exception(f"Failed to generate findings. Response was: {response}") @@ -659,7 +659,7 @@ def archive_findings(client: "GuardDutyClient", args: dict): response = client.archive_findings(**kwargs) - if response == dict() or response.get('ResponseMetadata', {}).get('HTTPStatusCode') == 200: + if response == {} or response.get('ResponseMetadata', {}).get('HTTPStatusCode') == 200: return "Findings were archived" else: raise Exception(f"Failed to archive findings. Response was: {response}") @@ -672,7 +672,7 @@ def unarchive_findings(client: "GuardDutyClient", args: dict): response = client.unarchive_findings(**kwargs) - if response == dict() or response.get('ResponseMetadata', {}).get('HTTPStatusCode') == 200: + if response == {} or response.get('ResponseMetadata', {}).get('HTTPStatusCode') == 200: return "Findings were unarchived" else: raise Exception(f"Failed to archive findings. Response was: {response}") @@ -688,7 +688,7 @@ def update_findings_feedback(client: "GuardDutyClient", args: dict): kwargs.update({'Feedback': argToList(args.get('feedback'))}) response = client.update_findings_feedback(**kwargs) - if response == dict() or response.get('ResponseMetadata', {}).get('HTTPStatusCode') == 200: + if response == {} or response.get('ResponseMetadata', {}).get('HTTPStatusCode') == 200: return "Findings Feedback sent!" else: raise Exception(f"Failed to send findings feedback. Response was: {response}") diff --git a/Packs/AWS-GuardDuty/Integrations/AWSGuardDuty/AWSGuardDuty.yml b/Packs/AWS-GuardDuty/Integrations/AWSGuardDuty/AWSGuardDuty.yml index 756b6369cb06..96b1674e3999 100644 --- a/Packs/AWS-GuardDuty/Integrations/AWSGuardDuty/AWSGuardDuty.yml +++ b/Packs/AWS-GuardDuty/Integrations/AWSGuardDuty/AWSGuardDuty.yml @@ -880,7 +880,7 @@ script: - contextPath: AWS.GuardDuty.Members.UpdatedAt description: The time a member was last updated. type: string - dockerimage: demisto/boto3py3:1.0.0.1865449 + dockerimage: demisto/boto3py3:1.0.0.1894954 isfetch: true runonce: false script: '-' diff --git a/Packs/AWS-GuardDuty/ReleaseNotes/1_3_57.md b/Packs/AWS-GuardDuty/ReleaseNotes/1_3_57.md new file mode 100644 index 000000000000..110278786462 --- /dev/null +++ b/Packs/AWS-GuardDuty/ReleaseNotes/1_3_57.md @@ -0,0 +1,8 @@ +#### Integrations + +##### AWS - GuardDuty Event Collector +Code functionality improvements. + +##### AWS - GuardDuty +- Code functionality improvements. +- Updated the Docker image to: *demisto/boto3py3:1.0.0.1894954*. \ No newline at end of file diff --git a/Packs/AWS-GuardDuty/pack_metadata.json b/Packs/AWS-GuardDuty/pack_metadata.json index cb83a9558bba..7c3f8077e267 100644 --- a/Packs/AWS-GuardDuty/pack_metadata.json +++ b/Packs/AWS-GuardDuty/pack_metadata.json @@ -2,7 +2,7 @@ "name": "AWS - GuardDuty", "description": "Amazon Web Services Guard Duty Service (gd)", "support": "xsoar", - "currentVersion": "1.3.56", + "currentVersion": "1.3.57", "author": "Cortex XSOAR", "url": "https://www.paloaltonetworks.com/cortex", "email": "", diff --git a/Packs/AWS-IAM/Integrations/AWS-IAM/AWS-IAM.py b/Packs/AWS-IAM/Integrations/AWS-IAM/AWS-IAM.py index 9e421a3d05b4..715eceab70a0 100644 --- a/Packs/AWS-IAM/Integrations/AWS-IAM/AWS-IAM.py +++ b/Packs/AWS-IAM/Integrations/AWS-IAM/AWS-IAM.py @@ -1,3 +1,4 @@ + import demistomock as demisto # noqa: F401 from CommonServerPython import * # noqa: F401 @@ -71,12 +72,11 @@ def create_login_profile(args, client): # pragma: no cover 'Password': args.get('password') } if args.get('passwordResetRequired'): - kwargs.update({'PasswordResetRequired': True if args.get( - 'passwordResetRequired') == 'True' else False}) + kwargs.update({'PasswordResetRequired': args.get('passwordResetRequired') == 'True'}) response = client.create_login_profile(**kwargs) if response['ResponseMetadata']['HTTPStatusCode'] == 200: - demisto.results("Login Profile Was Created For user {0} ".format(args.get('userName'))) + demisto.results("Login Profile Was Created For user {} ".format(args.get('userName'))) def get_user(args, client): # pragma: no cover @@ -132,23 +132,23 @@ def update_user(args, client): # pragma: no cover response = client.update_user(**kwargs) if response['ResponseMetadata']['HTTPStatusCode'] == 200: demisto.results( - "Changed UserName {0} To: {1}".format(args.get('oldUserName'), args.get('newUserName'))) + "Changed UserName {} To: {}".format(args.get('oldUserName'), args.get('newUserName'))) def delete_user(args, client): # pragma: no cover response = client.delete_user(UserName=args.get('userName')) if response['ResponseMetadata']['HTTPStatusCode'] == 200: - demisto.results('The User {0} has been deleted'.format(args.get('userName'))) + demisto.results('The User {} has been deleted'.format(args.get('userName'))) def update_login_profile(args, client): # pragma: no cover response = client.update_login_profile( Password=args.get('newPassword'), UserName=args.get('userName'), - PasswordResetRequired=True if args.get('passwordResetRequired') == 'True' else False + PasswordResetRequired=args.get('passwordResetRequired') == 'True' ) if response['ResponseMetadata']['HTTPStatusCode'] == 200: - demisto.results("The user {0} Password was changed".format(args.get('userName'))) + demisto.results("The user {} Password was changed".format(args.get('userName'))) def create_group(args, client): # pragma: no cover @@ -211,9 +211,9 @@ def add_user_to_group(args, client): # pragma: no cover UserName=args.get('userName') ) if response['ResponseMetadata']['HTTPStatusCode'] == 200: - demisto.results("The user {0} was added to the IAM group: {1}".format(args.get('userName'), - args.get( - 'groupName'))) + demisto.results("The user {} was added to the IAM group: {}".format(args.get('userName'), + args.get( + 'groupName'))) def create_access_key(args, client): # pragma: no cover @@ -245,8 +245,8 @@ def update_access_key(args, client): # pragma: no cover response = client.update_access_key(**kwargs) if response['ResponseMetadata']['HTTPStatusCode'] == 200: demisto.results( - "Access Key with ID {0} was set to status: {1}".format(args.get('accessKeyId'), - args.get('status'))) + "Access Key with ID {} was set to status: {}".format(args.get('accessKeyId'), + args.get('status'))) def list_access_key_for_user(args, client): # pragma: no cover @@ -269,7 +269,7 @@ def list_policies(args, client): # pragma: no cover data = [] response = client.list_policies( Scope=args.get('scope'), - OnlyAttached=True if args.get('onlyAttached') == 'True' else False + OnlyAttached=args.get('onlyAttached') == 'True' ) for policy in response['Policies']: data.append({ @@ -310,6 +310,7 @@ def list_roles(args, client): # pragma: no cover def attach_policy(args, client): # pragma: no cover + response = {} if args.get('type') == 'User': response = client.attach_user_policy( UserName=args.get('entityName'), @@ -328,10 +329,11 @@ def attach_policy(args, client): # pragma: no cover if response['ResponseMetadata']['HTTPStatusCode'] == 200: demisto.results( - "Policy was attached to {0}: {1} ".format(args.get('type'), args.get('entityName'))) + "Policy was attached to {}: {} ".format(args.get('type'), args.get('entityName'))) def detach_policy(args, client): # pragma: no cover + response = {} if args.get('type') == 'User': response = client.detach_user_policy( UserName=args.get('entityName'), @@ -349,19 +351,19 @@ def detach_policy(args, client): # pragma: no cover ) if response['ResponseMetadata']['HTTPStatusCode'] == 200: demisto.results( - "Policy was detached from {0}: {1} ".format(args.get('type'), args.get('entityName'))) + "Policy was detached from {}: {} ".format(args.get('type'), args.get('entityName'))) def delete_login_profile(args, client): # pragma: no cover response = client.delete_login_profile(UserName=args.get('userName')) if response['ResponseMetadata']['HTTPStatusCode'] == 200: - demisto.results("The user {0} login profile has been deleted".format(args.get('userName'))) + demisto.results("The user {} login profile has been deleted".format(args.get('userName'))) def delete_group(args, client): # pragma: no cover response = client.delete_group(GroupName=args.get('groupName')) if response['ResponseMetadata']['HTTPStatusCode'] == 200: - demisto.results("The Group {0} has been deleted".format(args.get('groupName'))) + demisto.results("The Group {} has been deleted".format(args.get('groupName'))) def remove_user_from_group(args, client): # pragma: no cover @@ -371,8 +373,8 @@ def remove_user_from_group(args, client): # pragma: no cover ) if response['ResponseMetadata']['HTTPStatusCode'] == 200: demisto.results( - "The User {0} has been removed from the group {1}".format(args.get('userName'), - args.get('groupName'))) + "The User {} has been removed from the group {}".format(args.get('userName'), + args.get('groupName'))) def delete_access_key(args, client): # pragma: no cover @@ -461,7 +463,7 @@ def delete_instance_profile(args, client): # pragma: no cover response = client.delete_instance_profile(InstanceProfileName=args.get('instanceProfileName')) if response['ResponseMetadata']['HTTPStatusCode'] == 200: demisto.results( - "The InstanceProfile: {0} was deleted".format(args.get('instanceProfileName'))) + "The InstanceProfile: {} was deleted".format(args.get('instanceProfileName'))) def list_instance_profiles(args, client): # pragma: no cover @@ -493,8 +495,8 @@ def add_role_to_instance_profile(args, client): # pragma: no cover response = client.add_role_to_instance_profile(**kwargs) if response['ResponseMetadata']['HTTPStatusCode'] == 200: demisto.results( - "The Role: {0} was added to the Instance Profile: {1}".format(args.get('roleName'), - args.get('instanceProfileName')) + "The Role: {} was added to the Instance Profile: {}".format(args.get('roleName'), + args.get('instanceProfileName')) ) @@ -507,9 +509,9 @@ def remove_role_from_instance_profile(args, client): # pragma: no cover response = client.remove_role_from_instance_profile(**kwargs) if response['ResponseMetadata']['HTTPStatusCode'] == 200: demisto.results( - "The Role: {0} was removed from the Instance Profile: {1}".format(args.get('roleName'), - args.get( - 'instanceProfileName'))) + "The Role: {} was removed from the Instance Profile: {}".format(args.get('roleName'), + args.get( + 'instanceProfileName'))) def list_instance_profiles_for_role(args, client): # pragma: no cover @@ -575,7 +577,7 @@ def delete_role(args, client): # pragma: no cover response = client.delete_role(RoleName=args.get('roleName')) if response['ResponseMetadata']['HTTPStatusCode'] == 200: - demisto.results("The Role: {0} was deleted".format(args.get('roleName'))) + demisto.results("The Role: {} was deleted".format(args.get('roleName'))) def create_role(args, client): # pragma: no cover @@ -635,7 +637,7 @@ def delete_policy(args, client): # pragma: no cover response = client.delete_policy(PolicyArn=args.get('policyArn')) if response['ResponseMetadata']['HTTPStatusCode'] == 200: - demisto.results("The Policy: {0} was deleted".format(args.get('policyArn'))) + demisto.results("The Policy: {} was deleted".format(args.get('policyArn'))) def create_policy_version(args, client): # pragma: no cover @@ -644,7 +646,7 @@ def create_policy_version(args, client): # pragma: no cover 'PolicyDocument': json.dumps(json.loads(args.get('policyDocument'))) } if args.get('setAsDefault') is not None: - kwargs.update({'SetAsDefault': True if args.get('setAsDefault') == 'True' else False}) + kwargs.update({'SetAsDefault': args.get('setAsDefault') == 'True'}) response = client.create_policy_version(**kwargs) policy = response['PolicyVersion'] @@ -713,7 +715,7 @@ def set_default_policy_version(args, client): # pragma: no cover } response = client.set_default_policy_version(**kwargs) if response['ResponseMetadata']['HTTPStatusCode'] == 200: - demisto.results("The Default Policy Version was set to {0}".format(args.get('versionId'))) + demisto.results("The Default Policy Version was set to {}".format(args.get('versionId'))) def create_account_alias(args, client): # pragma: no cover @@ -752,24 +754,24 @@ def update_account_password_policy(args, client): # pragma: no cover if args.get('minimumPasswordLength'): kwargs.update({'MinimumPasswordLength': int(args.get('minimumPasswordLength'))}) if args.get('requireSymbols'): - kwargs.update({'RequireSymbols': True if args.get('requireSymbols') == 'True' else False}) + kwargs.update({'RequireSymbols': args.get('requireSymbols') == 'True'}) if args.get('requireNumbers'): - kwargs.update({'RequireNumbers': True if args.get('requireNumbers') == 'True' else False}) + kwargs.update({'RequireNumbers': args.get('requireNumbers') == 'True'}) if args.get('requireUppercaseCharacters'): kwargs.update( - {'RequireUppercaseCharacters': True if args.get('requireUppercaseCharacters') == 'True' else False}) + {'RequireUppercaseCharacters': args.get('requireUppercaseCharacters') == 'True'}) if args.get('requireLowercaseCharacters'): kwargs.update( - {'RequireLowercaseCharacters': True if args.get('requireLowercaseCharacters') == 'True' else False}) + {'RequireLowercaseCharacters': args.get('requireLowercaseCharacters') == 'True'}) if args.get('allowUsersToChangePassword'): kwargs.update( - {'AllowUsersToChangePassword': True if args.get('allowUsersToChangePassword') == 'True' else False}) + {'AllowUsersToChangePassword': args.get('allowUsersToChangePassword') == 'True'}) if args.get('maxPasswordAge'): kwargs.update({'MaxPasswordAge': int(args.get('maxPasswordAge'))}) if args.get('passwordReusePrevention'): kwargs.update({'PasswordReusePrevention': int(args.get('passwordReusePrevention'))}) if args.get('hardExpiry'): - kwargs.update({'HardExpiry': True if args.get('hardExpiry') == 'True' else False}) + kwargs.update({'HardExpiry': args.get('hardExpiry') == 'True'}) response = client.update_account_password_policy(**kwargs) if response['ResponseMetadata']['HTTPStatusCode'] == 200: demisto.results("The Account Password Policy was updated") @@ -850,9 +852,9 @@ def list_user_policies(args, client): if policy_data: ec = {'AWS.IAM.UserPolicies(val.PolicyName && val.UserName && val.PolicyName === obj.PolicyName && ' 'val.UserName === obj.UserName)': policy_data, - 'AWS.IAM.Users(val.UserName === \'{}\').InlinePoliciesMarker'.format(user_name): marker} + f'AWS.IAM.Users(val.UserName === \'{user_name}\').InlinePoliciesMarker': marker} - human_readable = tableToMarkdown('AWS IAM Policies for user {}'.format(user_name), + human_readable = tableToMarkdown(f'AWS IAM Policies for user {user_name}', headers=["PolicyNames"], headerTransform=pascalToSpace, t=data) @@ -888,9 +890,9 @@ def list_attached_user_policies(args, client): if policy_data: ec = {'AWS.IAM.AttachedUserPolicies(val.PolicyArn && val.UserName && val.PolicyArn === obj.PolicyArn && ' 'val.UserName === obj.UserName)': policy_data, - 'AWS.IAM.Users(val.UserName === \'{}\').AttachedPoliciesMarker'.format(user_name): marker} + f'AWS.IAM.Users(val.UserName === \'{user_name}\').AttachedPoliciesMarker': marker} - human_readable = tableToMarkdown('AWS IAM Attached Policies for user {}'.format(user_name), + human_readable = tableToMarkdown(f'AWS IAM Attached Policies for user {user_name}', headers=['PolicyName', 'PolicyArn'], headerTransform=pascalToSpace, t=data) @@ -927,9 +929,9 @@ def list_attached_group_policies(args, client): if policy_data: ec = {'AWS.IAM.AttachedGroupPolicies(val.PolicyArn && val.GroupName && val.PolicyArn === obj.PolicyArn && ' 'val.GroupName === obj.GroupName)': policy_data, - 'AWS.IAM.Groups(val.GroupName === \'{}\').AttachedPoliciesMarker'.format(group_name): marker} + f'AWS.IAM.Groups(val.GroupName === \'{group_name}\').AttachedPoliciesMarker': marker} - human_readable = tableToMarkdown('AWS IAM Attached Policies for group {}'.format(group_name), + human_readable = tableToMarkdown(f'AWS IAM Attached Policies for group {group_name}', headers=['PolicyName', 'PolicyArn'], headerTransform=pascalToSpace, t=data) @@ -957,7 +959,7 @@ def get_user_login_profile(args, client): ec = {'AWS.IAM.Users(val.UserName && val.UserName === obj.UserName)': data} - human_readable = tableToMarkdown('AWS IAM Login Profile for user {}'.format(user_name), + human_readable = tableToMarkdown(f'AWS IAM Login Profile for user {user_name}', t=data.get('LoginProfile'), headers=['CreateDate', 'PasswordResetRequired'], removeNull=True, @@ -967,7 +969,7 @@ def get_user_login_profile(args, client): return_outputs(human_readable, ec, response) except botocore.exceptions.ClientError as error: if error.response.get('ResponseMetadata', {}).get('HTTPStatusCode') == 404: - return_outputs(tableToMarkdown('AWS IAM Login Profile for user {}'.format(user_name), t={})) + return_outputs(tableToMarkdown(f'AWS IAM Login Profile for user {user_name}', t={})) else: raise error @@ -1326,7 +1328,7 @@ def main(): # pragma: no cover ) try: - LOG('Command being called is {command}'.format(command=command)) + LOG(f'Command being called is {command}') if command == 'test-module': test_function(client) elif command == 'aws-iam-create-user': diff --git a/Packs/AWS-IAM/Integrations/AWS-IAM/AWS-IAM.yml b/Packs/AWS-IAM/Integrations/AWS-IAM/AWS-IAM.yml index 9916d200e04a..40101869dfe3 100644 --- a/Packs/AWS-IAM/Integrations/AWS-IAM/AWS-IAM.yml +++ b/Packs/AWS-IAM/Integrations/AWS-IAM/AWS-IAM.yml @@ -1609,7 +1609,7 @@ script: required: false description: Deletes a virtual MFA device. name: aws-iam-delete-mfa-devices - dockerimage: demisto/boto3py3:1.0.0.115129 + dockerimage: demisto/boto3py3:1.0.0.1894954 runonce: false script: '-' subtype: python3 diff --git a/Packs/AWS-IAM/ReleaseNotes/1_1_68.md b/Packs/AWS-IAM/ReleaseNotes/1_1_68.md new file mode 100644 index 000000000000..a662687883e6 --- /dev/null +++ b/Packs/AWS-IAM/ReleaseNotes/1_1_68.md @@ -0,0 +1,5 @@ +#### Integrations + +##### AWS - Identity and Access Management +- Code functionality improvements. +- Updated the Docker image to: *demisto/boto3py3:1.0.0.1894954*. \ No newline at end of file diff --git a/Packs/AWS-IAM/pack_metadata.json b/Packs/AWS-IAM/pack_metadata.json index f9aeedcca98f..db4fe884bbeb 100644 --- a/Packs/AWS-IAM/pack_metadata.json +++ b/Packs/AWS-IAM/pack_metadata.json @@ -3,7 +3,7 @@ "description": "Amazon Web Services Identity and Access Management (IAM)", "support": "xsoar", "author": "Cortex XSOAR", - "currentVersion": "1.1.67", + "currentVersion": "1.1.68", "url": "https://www.paloaltonetworks.com/cortex", "email": "", "created": "2020-04-14T00:00:00Z", diff --git a/Packs/AWS-IAMIdentityCenter/ReleaseNotes/1_0_7.md b/Packs/AWS-IAMIdentityCenter/ReleaseNotes/1_0_7.md new file mode 100644 index 000000000000..20e02feea9c7 --- /dev/null +++ b/Packs/AWS-IAMIdentityCenter/ReleaseNotes/1_0_7.md @@ -0,0 +1,4 @@ +#### Integrations + +##### AWS - IAM Identity Center +Code functionality improvements. \ No newline at end of file diff --git a/Packs/AWS-IAMIdentityCenter/pack_metadata.json b/Packs/AWS-IAMIdentityCenter/pack_metadata.json index 222bc5c02b57..0263e2a3e47f 100644 --- a/Packs/AWS-IAMIdentityCenter/pack_metadata.json +++ b/Packs/AWS-IAMIdentityCenter/pack_metadata.json @@ -2,7 +2,7 @@ "name": "AWS - IAM Identity Center", "description": "AWS IAM Identity Center\n\nWith AWS IAM Identity Center (successor to AWS Single Sign-On), you can manage sign-in security for your workforce identities, also known as workforce users. IAM Identity Center provides one place where you can create or connect workforce users and manage their access centrally across all their AWS accounts and applications. IAM Identity Center is the recommended approach for workforce authentication and authorization in AWS, for organizations of any size and type.", "support": "xsoar", - "currentVersion": "1.0.6", + "currentVersion": "1.0.7", "author": "Cortex XSOAR", "url": "", "email": "", diff --git a/Packs/AWS-ILM/Integrations/AWSILM/AWSILM.py b/Packs/AWS-ILM/Integrations/AWSILM/AWSILM.py index f9fc318a24d8..6f85694f6072 100644 --- a/Packs/AWS-ILM/Integrations/AWSILM/AWSILM.py +++ b/Packs/AWS-ILM/Integrations/AWSILM/AWSILM.py @@ -2,6 +2,7 @@ from CommonServerPython import * import traceback import urllib3 +from requests import Response # Disable insecure warnings urllib3.disable_warnings() @@ -62,7 +63,7 @@ def build_body_request_for_update_user(old_user_data, new_user_data): operations = [] for key, value in new_user_data.items(): operation = { - 'op': 'replace' if key in old_user_data.keys() else 'add', + 'op': 'replace' if key in old_user_data else 'add', 'path': key, 'value': [value] if key in ('emails', 'phoneNumbers') and not isinstance(value, list) else value, } @@ -491,6 +492,7 @@ def create_group_command(client, args): def update_group_command(client, args): + res = Response() scim = safe_load_json(args.get('scim')) group_id = scim.get('id') diff --git a/Packs/AWS-ILM/Integrations/AWSILM/AWSILM.yml b/Packs/AWS-ILM/Integrations/AWSILM/AWSILM.yml index 32fa40157eeb..9bbbb03e6753 100644 --- a/Packs/AWS-ILM/Integrations/AWSILM/AWSILM.yml +++ b/Packs/AWS-ILM/Integrations/AWSILM/AWSILM.yml @@ -347,7 +347,7 @@ script: type: Unknown description: Permanently removes a group. execution: true - dockerimage: demisto/python3:3.11.10.115186 + dockerimage: demisto/python3:3.11.10.116949 runonce: false script: '-' subtype: python3 diff --git a/Packs/AWS-ILM/ReleaseNotes/1_0_27.md b/Packs/AWS-ILM/ReleaseNotes/1_0_27.md new file mode 100644 index 000000000000..fae9efb6ccd1 --- /dev/null +++ b/Packs/AWS-ILM/ReleaseNotes/1_0_27.md @@ -0,0 +1,5 @@ +#### Integrations + +##### AWS - IAM (user lifecycle management) +- Code functionality improvements. +- Updated the Docker image to: *demisto/python3:3.11.10.116949*. \ No newline at end of file diff --git a/Packs/AWS-ILM/pack_metadata.json b/Packs/AWS-ILM/pack_metadata.json index 3e78ce7d11dd..66295d9d3ca0 100644 --- a/Packs/AWS-ILM/pack_metadata.json +++ b/Packs/AWS-ILM/pack_metadata.json @@ -2,7 +2,7 @@ "name": "AWS-ILM", "description": "IAM Integration for AWS-ILM. This pack handles user account auto-provisioning", "support": "xsoar", - "currentVersion": "1.0.26", + "currentVersion": "1.0.27", "author": "Cortex XSOAR", "url": "https://www.paloaltonetworks.com/cortex", "email": "", diff --git a/Packs/AWS-Lambda/ReleaseNotes/1_3_11.md b/Packs/AWS-Lambda/ReleaseNotes/1_3_11.md new file mode 100644 index 000000000000..7f4b21327009 --- /dev/null +++ b/Packs/AWS-Lambda/ReleaseNotes/1_3_11.md @@ -0,0 +1,4 @@ +#### Integrations + +##### AWS - Lambda +Code functionality improvements. \ No newline at end of file diff --git a/Packs/AWS-Lambda/pack_metadata.json b/Packs/AWS-Lambda/pack_metadata.json index 255df38fd346..72137fbd35fe 100644 --- a/Packs/AWS-Lambda/pack_metadata.json +++ b/Packs/AWS-Lambda/pack_metadata.json @@ -2,7 +2,7 @@ "name": "AWS - Lambda", "description": "Amazon Web Services Serverless Compute service (lambda)", "support": "xsoar", - "currentVersion": "1.3.10", + "currentVersion": "1.3.11", "author": "Cortex XSOAR", "url": "https://www.paloaltonetworks.com/cortex", "email": "", diff --git a/Packs/AWS-NetworkFirewall/Integrations/AWS-NetworkFirewall/AWS-NetworkFirewall.py b/Packs/AWS-NetworkFirewall/Integrations/AWS-NetworkFirewall/AWS-NetworkFirewall.py index a624dfdace91..2b7abe4e94cf 100644 --- a/Packs/AWS-NetworkFirewall/Integrations/AWS-NetworkFirewall/AWS-NetworkFirewall.py +++ b/Packs/AWS-NetworkFirewall/Integrations/AWS-NetworkFirewall/AWS-NetworkFirewall.py @@ -85,6 +85,7 @@ def parse_tag_field(tags_str): def aws_session(service='network-firewall', region=None, roleArn=None, roleSessionName=None, roleSessionDuration=None, rolePolicy=None): + client = None kwargs = {} if roleArn and roleSessionName is not None: kwargs.update({ @@ -1047,6 +1048,7 @@ def main(): # pragma: no cover args = demisto.args() human_readable = None outputs = None + response = None try: LOG('Command being called is {command}'.format( command=demisto.command())) diff --git a/Packs/AWS-NetworkFirewall/Integrations/AWS-NetworkFirewall/AWS-NetworkFirewall.yml b/Packs/AWS-NetworkFirewall/Integrations/AWS-NetworkFirewall/AWS-NetworkFirewall.yml index 84c998d64250..7bbaa009b0d9 100644 --- a/Packs/AWS-NetworkFirewall/Integrations/AWS-NetworkFirewall/AWS-NetworkFirewall.yml +++ b/Packs/AWS-NetworkFirewall/Integrations/AWS-NetworkFirewall/AWS-NetworkFirewall.yml @@ -1521,7 +1521,7 @@ script: - contextPath: AWS-NetworkFirewall.SubnetChangeProtection description: A setting indicating whether the firewall is protected against changes to the subnet associations. Use this setting to protect against accidentally modifying the subnet associations for a firewall that is in use. When you create a firewall, the operation initializes this setting to TRUE. type: Unknown - dockerimage: demisto/boto3py3:1.0.0.115129 + dockerimage: demisto/boto3py3:1.0.0.1894954 runonce: false script: '-' subtype: python3 diff --git a/Packs/AWS-NetworkFirewall/ReleaseNotes/1_0_9.md b/Packs/AWS-NetworkFirewall/ReleaseNotes/1_0_9.md new file mode 100644 index 000000000000..36f22dc20e38 --- /dev/null +++ b/Packs/AWS-NetworkFirewall/ReleaseNotes/1_0_9.md @@ -0,0 +1,5 @@ +#### Integrations + +##### AWS Network Firewall +- Code functionality improvements. +- Updated the Docker image to: *demisto/boto3py3:1.0.0.1894954*. \ No newline at end of file diff --git a/Packs/AWS-NetworkFirewall/pack_metadata.json b/Packs/AWS-NetworkFirewall/pack_metadata.json index e6086f7ebcd0..e4063bdb6b9f 100644 --- a/Packs/AWS-NetworkFirewall/pack_metadata.json +++ b/Packs/AWS-NetworkFirewall/pack_metadata.json @@ -2,7 +2,7 @@ "name": "AWS - Network Firewall", "description": "Amazon Web Services Network Firewall", "support": "xsoar", - "currentVersion": "1.0.8", + "currentVersion": "1.0.9", "author": "Cortex XSOAR", "url": "https://www.paloaltonetworks.com/cortex", "email": "", diff --git a/Packs/AWS-Organizations/ReleaseNotes/1_0_6.md b/Packs/AWS-Organizations/ReleaseNotes/1_0_6.md new file mode 100644 index 000000000000..849c213225d1 --- /dev/null +++ b/Packs/AWS-Organizations/ReleaseNotes/1_0_6.md @@ -0,0 +1,4 @@ +#### Integrations + +##### AWS - Organizations +Code functionality improvements. \ No newline at end of file diff --git a/Packs/AWS-Organizations/pack_metadata.json b/Packs/AWS-Organizations/pack_metadata.json index fa3671f75988..abc6f07b8ccb 100644 --- a/Packs/AWS-Organizations/pack_metadata.json +++ b/Packs/AWS-Organizations/pack_metadata.json @@ -2,7 +2,7 @@ "name": "AWS Organizations", "description": "AWS Organizations offers policy-based management for multiple AWS accounts.", "support": "xsoar", - "currentVersion": "1.0.5", + "currentVersion": "1.0.6", "author": "Cortex XSOAR", "url": "https://www.paloaltonetworks.com/cortex", "email": "", diff --git a/Packs/AWS-Route53/ReleaseNotes/1_1_38.md b/Packs/AWS-Route53/ReleaseNotes/1_1_38.md new file mode 100644 index 000000000000..e7beeeeffda5 --- /dev/null +++ b/Packs/AWS-Route53/ReleaseNotes/1_1_38.md @@ -0,0 +1,4 @@ +#### Integrations + +##### AWS - Route53 +Code functionality improvements. \ No newline at end of file diff --git a/Packs/AWS-Route53/pack_metadata.json b/Packs/AWS-Route53/pack_metadata.json index 3810aefde91f..8d57e6fe3a4e 100644 --- a/Packs/AWS-Route53/pack_metadata.json +++ b/Packs/AWS-Route53/pack_metadata.json @@ -2,7 +2,7 @@ "name": "AWS - Route53", "description": "Amazon Web Services Managed Cloud DNS Service.", "support": "xsoar", - "currentVersion": "1.1.37", + "currentVersion": "1.1.38", "author": "Cortex XSOAR", "url": "https://www.paloaltonetworks.com/cortex", "email": "", diff --git a/Packs/AWS-S3/ReleaseNotes/1_2_29.md b/Packs/AWS-S3/ReleaseNotes/1_2_29.md new file mode 100644 index 000000000000..01bdee8a03b4 --- /dev/null +++ b/Packs/AWS-S3/ReleaseNotes/1_2_29.md @@ -0,0 +1,4 @@ +#### Integrations + +##### AWS - S3 +Code functionality improvements. \ No newline at end of file diff --git a/Packs/AWS-S3/pack_metadata.json b/Packs/AWS-S3/pack_metadata.json index f189c0c48b8d..e8266895ca70 100644 --- a/Packs/AWS-S3/pack_metadata.json +++ b/Packs/AWS-S3/pack_metadata.json @@ -2,7 +2,7 @@ "name": "AWS - S3", "description": "Amazon Web Services Simple Storage Service (S3)", "support": "xsoar", - "currentVersion": "1.2.28", + "currentVersion": "1.2.29", "author": "Cortex XSOAR", "url": "https://www.paloaltonetworks.com/cortex", "email": "", diff --git a/Packs/AWS-SNS/ReleaseNotes/1_0_20.md b/Packs/AWS-SNS/ReleaseNotes/1_0_20.md new file mode 100644 index 000000000000..48eabcfb90c2 --- /dev/null +++ b/Packs/AWS-SNS/ReleaseNotes/1_0_20.md @@ -0,0 +1,4 @@ +#### Integrations + +##### AWS - SNS +Code functionality improvements. \ No newline at end of file diff --git a/Packs/AWS-SNS/pack_metadata.json b/Packs/AWS-SNS/pack_metadata.json index b687c87f8b69..9bf3c3de9699 100644 --- a/Packs/AWS-SNS/pack_metadata.json +++ b/Packs/AWS-SNS/pack_metadata.json @@ -2,7 +2,7 @@ "name": "AWS - SNS", "description": "This is the integration content pack which can create or delete topic/subscription on AWS Simple Notification System and send the message via SNS as well.", "support": "xsoar", - "currentVersion": "1.0.19", + "currentVersion": "1.0.20", "author": "Jie Liau", "url": "", "email": "", diff --git a/Packs/AWS-SQS/ReleaseNotes/1_2_30.md b/Packs/AWS-SQS/ReleaseNotes/1_2_30.md new file mode 100644 index 000000000000..63ea408fa306 --- /dev/null +++ b/Packs/AWS-SQS/ReleaseNotes/1_2_30.md @@ -0,0 +1,4 @@ +#### Integrations + +##### AWS - SQS +Code functionality improvements. \ No newline at end of file diff --git a/Packs/AWS-SQS/pack_metadata.json b/Packs/AWS-SQS/pack_metadata.json index 9405d05c2ad8..07409efeeae5 100644 --- a/Packs/AWS-SQS/pack_metadata.json +++ b/Packs/AWS-SQS/pack_metadata.json @@ -2,7 +2,7 @@ "name": "AWS - SQS", "description": "Amazon Web Services Simple Queuing Service (SQS)", "support": "xsoar", - "currentVersion": "1.2.29", + "currentVersion": "1.2.30", "author": "Cortex XSOAR", "url": "https://www.paloaltonetworks.com/cortex", "email": "", diff --git a/Packs/AWS-SecurityHub/ReleaseNotes/1_3_41.md b/Packs/AWS-SecurityHub/ReleaseNotes/1_3_41.md new file mode 100644 index 000000000000..3256ad5386b1 --- /dev/null +++ b/Packs/AWS-SecurityHub/ReleaseNotes/1_3_41.md @@ -0,0 +1,7 @@ +#### Integrations + +##### AWS - Security Hub +Code functionality improvements. + +##### AWS Security Hub Event Collector +Code functionality improvements. \ No newline at end of file diff --git a/Packs/AWS-SecurityHub/pack_metadata.json b/Packs/AWS-SecurityHub/pack_metadata.json index a743b6ca992a..650702bf7504 100644 --- a/Packs/AWS-SecurityHub/pack_metadata.json +++ b/Packs/AWS-SecurityHub/pack_metadata.json @@ -2,7 +2,7 @@ "name": "AWS - Security Hub", "description": "Amazon Web Services Security Hub Service.", "support": "xsoar", - "currentVersion": "1.3.40", + "currentVersion": "1.3.41", "author": "Cortex XSOAR", "url": "https://www.paloaltonetworks.com/cortex", "email": "", diff --git a/Packs/AWS-SecurityLake/ReleaseNotes/1_0_13.md b/Packs/AWS-SecurityLake/ReleaseNotes/1_0_13.md new file mode 100644 index 000000000000..fab55b5e44cc --- /dev/null +++ b/Packs/AWS-SecurityLake/ReleaseNotes/1_0_13.md @@ -0,0 +1,4 @@ +#### Integrations + +##### Amazon Security Lake +Code functionality improvements. \ No newline at end of file diff --git a/Packs/AWS-SecurityLake/pack_metadata.json b/Packs/AWS-SecurityLake/pack_metadata.json index be3ae8ccab0c..904ee21e397c 100644 --- a/Packs/AWS-SecurityLake/pack_metadata.json +++ b/Packs/AWS-SecurityLake/pack_metadata.json @@ -2,7 +2,7 @@ "name": "Amazon - Security Lake", "description": "Amazon Security Lake is a fully managed security data lake service.", "support": "xsoar", - "currentVersion": "1.0.12", + "currentVersion": "1.0.13", "author": "Cortex XSOAR", "url": "https://www.paloaltonetworks.com/cortex", "email": "", diff --git a/Packs/AWS_DynamoDB/Integrations/AWS_DynamoDB/AWS_DynamoDB.py b/Packs/AWS_DynamoDB/Integrations/AWS_DynamoDB/AWS_DynamoDB.py index 1432ff6d62b4..4dde18d9c1d9 100644 --- a/Packs/AWS_DynamoDB/Integrations/AWS_DynamoDB/AWS_DynamoDB.py +++ b/Packs/AWS_DynamoDB/Integrations/AWS_DynamoDB/AWS_DynamoDB.py @@ -79,6 +79,7 @@ def parse_tag_field(tags_str): def aws_session(service='dynamodb', region=None, roleArn=None, roleSessionName=None, roleSessionDuration=None, rolePolicy=None): + client = None kwargs = {} if roleArn and roleSessionName is not None: kwargs.update({ diff --git a/Packs/AWS_DynamoDB/Integrations/AWS_DynamoDB/AWS_DynamoDB.yml b/Packs/AWS_DynamoDB/Integrations/AWS_DynamoDB/AWS_DynamoDB.yml index bcb70d025bdc..689952b166a6 100644 --- a/Packs/AWS_DynamoDB/Integrations/AWS_DynamoDB/AWS_DynamoDB.yml +++ b/Packs/AWS_DynamoDB/Integrations/AWS_DynamoDB/AWS_DynamoDB.yml @@ -2998,7 +2998,7 @@ script: description: The name of the TTL attribute used to store the expiration time for items in the table. - contextPath: AWS-DynamoDB.TimeToLiveSpecification description: Represents the output of an UpdateTimeToLive operation. - dockerimage: demisto/boto3py3:1.0.0.115129 + dockerimage: demisto/boto3py3:1.0.0.1894954 script: '' subtype: python3 type: python diff --git a/Packs/AWS_DynamoDB/ReleaseNotes/1_0_36.md b/Packs/AWS_DynamoDB/ReleaseNotes/1_0_36.md new file mode 100644 index 000000000000..17113cb788b5 --- /dev/null +++ b/Packs/AWS_DynamoDB/ReleaseNotes/1_0_36.md @@ -0,0 +1,5 @@ +#### Integrations + +##### Amazon DynamoDB +- Code functionality improvements. +- Updated the Docker image to: *demisto/boto3py3:1.0.0.1894954*. \ No newline at end of file diff --git a/Packs/AWS_DynamoDB/TestPlaybooks/playbook-AWS-DynamoDB-Test.yml b/Packs/AWS_DynamoDB/TestPlaybooks/playbook-AWS-DynamoDB-Test.yml index a3bcbcf49e03..365401e70ecb 100644 --- a/Packs/AWS_DynamoDB/TestPlaybooks/playbook-AWS-DynamoDB-Test.yml +++ b/Packs/AWS_DynamoDB/TestPlaybooks/playbook-AWS-DynamoDB-Test.yml @@ -381,7 +381,7 @@ tasks: brand: "" nexttasks: '#none#': - - "12" + - "24" scriptarguments: resource_arn: simple: ${TableArn} @@ -423,7 +423,7 @@ tasks: brand: "" nexttasks: '#none#': - - "16" + - "25" scriptarguments: resource_arn: simple: ${TableArn} @@ -435,7 +435,7 @@ tasks: { "position": { "x": 265, - "y": 2645 + "y": 2820 } } note: false @@ -472,7 +472,7 @@ tasks: { "position": { "x": 480, - "y": 2120 + "y": 2295 } } note: false @@ -517,7 +517,7 @@ tasks: { "position": { "x": 480, - "y": 2295 + "y": 2470 } } note: false @@ -561,7 +561,7 @@ tasks: { "position": { "x": 265, - "y": 2995 + "y": 3345 } } note: false @@ -633,7 +633,7 @@ tasks: { "position": { "x": 265, - "y": 2820 + "y": 3170 } } note: false @@ -670,7 +670,7 @@ tasks: { "position": { "x": 265, - "y": 2470 + "y": 2645 } } note: false @@ -697,7 +697,7 @@ tasks: { "position": { "x": 480, - "y": 3185 + "y": 3535 } } note: false @@ -729,7 +729,7 @@ tasks: { "position": { "x": 50, - "y": 3170 + "y": 3520 } } note: false @@ -761,7 +761,7 @@ tasks: { "position": { "x": 695, - "y": 2470 + "y": 2645 } } note: false @@ -866,15 +866,85 @@ tasks: brand: "" scriptarguments: message: - simple: In the TPB, we rely on a resource ARN (which most of the - times is number 12) which ends with 'c' but got another. + simple: In the TPB, we rely on a resource ARN (which most of the times is + number 12) which ends with 'c' but got another. separatecontext: false continueonerrortype: "" view: |- { "position": { - "x": 990, - "y": 1340 + "x": 910, + "y": 1245 + } + } + note: false + timertriggers: [] + ignoreworker: false + skipunavailable: false + quietmode: 0 + isoversize: false + isautoswitchedtoquietmode: false + "24": + id: "24" + taskid: 1e1bd75b-1824-4a7c-81dc-57c06b3244ef + type: regular + task: + id: 1e1bd75b-1824-4a7c-81dc-57c06b3244ef + version: -1 + name: sleep + description: Sleep for X seconds. + scriptName: Sleep + type: regular + iscommand: false + brand: "" + nexttasks: + '#none#': + - "12" + scriptarguments: + seconds: + simple: "5" + separatecontext: false + continueonerrortype: "" + view: |- + { + "position": { + "x": 480, + "y": 2120 + } + } + note: false + timertriggers: [] + ignoreworker: false + skipunavailable: false + quietmode: 0 + isoversize: false + isautoswitchedtoquietmode: false + "25": + id: "25" + taskid: 77a86692-ae6d-4193-89e0-38eb69c216f7 + type: regular + task: + id: 77a86692-ae6d-4193-89e0-38eb69c216f7 + version: -1 + name: sleep + description: Sleep for X seconds. + scriptName: Sleep + type: regular + iscommand: false + brand: "" + nexttasks: + '#none#': + - "16" + scriptarguments: + seconds: + simple: "5" + separatecontext: false + continueonerrortype: "" + view: |- + { + "position": { + "x": 265, + "y": 2995 } } note: false @@ -889,8 +959,8 @@ view: |- "linkLabelsPosition": {}, "paper": { "dimensions": { - "height": 3215, - "width": 1320, + "height": 3565, + "width": 1240, "x": 50, "y": 50 } @@ -898,5 +968,5 @@ view: |- } inputs: [] outputs: [] -fromversion: 5.0.0 -description: '' +dirtyInputs: true +fromversion: 5.0.0 \ No newline at end of file diff --git a/Packs/AWS_DynamoDB/pack_metadata.json b/Packs/AWS_DynamoDB/pack_metadata.json index 0aa2ac558ad4..2c73243a576e 100644 --- a/Packs/AWS_DynamoDB/pack_metadata.json +++ b/Packs/AWS_DynamoDB/pack_metadata.json @@ -2,7 +2,7 @@ "name": "Amazon DynamoDB", "description": "Amazon DynamoDB Amazon DynamoDB is a fully managed NoSQL database service that provides fast and predictable performance with seamless scalability. DynamoDB lets you offload the administrative burdens of operating and scaling a distributed database, so that you don't have to worry about hardware provisioning, setup and configuration, replication, software patching, or cluster scaling. With DynamoDB, you can create database tables that can store and retrieve any amount of data, and serve any level of request traffic. You can scale up or scale down your tables' throughput capacity without downtime or performance degradation, and use the AWS Management Console to monitor resource utilization and performance metrics. DynamoDB automatically spreads the data and traffic for your tables over a sufficient number of servers to handle your throughput and storage requirements, while maintaining consistent and fast performance. All of your data is stored on solid state disks (SSDs) and automatically replicated across multiple Availability Zones in an AWS region, providing built-in high availability and data durability. ", "support": "xsoar", - "currentVersion": "1.0.35", + "currentVersion": "1.0.36", "author": "Cortex XSOAR", "url": "https://www.paloaltonetworks.com/cortex", "email": "", diff --git a/Packs/AWS_SystemManager/ReleaseNotes/1_0_9.md b/Packs/AWS_SystemManager/ReleaseNotes/1_0_9.md new file mode 100644 index 000000000000..e1e883003c3c --- /dev/null +++ b/Packs/AWS_SystemManager/ReleaseNotes/1_0_9.md @@ -0,0 +1,4 @@ +#### Integrations + +##### AWS - System Manager +Code functionality improvements. \ No newline at end of file diff --git a/Packs/AWS_SystemManager/pack_metadata.json b/Packs/AWS_SystemManager/pack_metadata.json index e17a092a28a7..57b1fe6f7d1f 100644 --- a/Packs/AWS_SystemManager/pack_metadata.json +++ b/Packs/AWS_SystemManager/pack_metadata.json @@ -2,7 +2,7 @@ "name": "AWS Systems Manager", "description": "AWS Systems Manager is the operations hub for your AWS applications and resources and a secure end-to-end management solution for hybrid cloud environments that enables safe and secure operations at scale.", "support": "xsoar", - "currentVersion": "1.0.8", + "currentVersion": "1.0.9", "author": "Cortex XSOAR", "url": "https://www.paloaltonetworks.com/cortex", "email": "", diff --git a/Packs/AWS_WAF/Integrations/AWSWAF/AWSWAF.yml b/Packs/AWS_WAF/Integrations/AWSWAF/AWSWAF.yml index c878a1d16bde..0115fb3e41c3 100644 --- a/Packs/AWS_WAF/Integrations/AWSWAF/AWSWAF.yml +++ b/Packs/AWS_WAF/Integrations/AWSWAF/AWSWAF.yml @@ -1743,7 +1743,7 @@ script: script: '-' type: python subtype: python3 - dockerimage: demisto/boto3py3:1.0.0.1865449 + dockerimage: demisto/boto3py3:1.0.0.1894954 fromversion: 6.5.0 tests: - No tests (auto formatted) diff --git a/Packs/AWS_WAF/ReleaseNotes/1_0_12.md b/Packs/AWS_WAF/ReleaseNotes/1_0_12.md new file mode 100644 index 000000000000..0a6759dbbf39 --- /dev/null +++ b/Packs/AWS_WAF/ReleaseNotes/1_0_12.md @@ -0,0 +1,5 @@ +#### Integrations + +##### AWS-WAF +- Code functionality improvements. +- Updated the Docker image to: *demisto/boto3py3:1.0.0.1894954*. \ No newline at end of file diff --git a/Packs/AWS_WAF/pack_metadata.json b/Packs/AWS_WAF/pack_metadata.json index bb1667af7596..b253cdeebe13 100644 --- a/Packs/AWS_WAF/pack_metadata.json +++ b/Packs/AWS_WAF/pack_metadata.json @@ -2,7 +2,7 @@ "name": "AWS WAF", "description": "Amazon Web Services Web Application Firewall (WAF)", "support": "xsoar", - "currentVersion": "1.0.11", + "currentVersion": "1.0.12", "author": "Cortex XSOAR", "url": "https://www.paloaltonetworks.com/cortex", "email": "", diff --git a/Packs/ApiModules/ReleaseNotes/2_2_37.md b/Packs/ApiModules/ReleaseNotes/2_2_37.md new file mode 100644 index 000000000000..3abf74cd7b3f --- /dev/null +++ b/Packs/ApiModules/ReleaseNotes/2_2_37.md @@ -0,0 +1,4 @@ +#### Scripts + +##### AWSApiModule +Code functionality improvements. \ No newline at end of file diff --git a/Packs/ApiModules/Scripts/AWSApiModule/AWSApiModule.py b/Packs/ApiModules/Scripts/AWSApiModule/AWSApiModule.py index 3391755913bf..e897c7c6e8b5 100644 --- a/Packs/ApiModules/Scripts/AWSApiModule/AWSApiModule.py +++ b/Packs/ApiModules/Scripts/AWSApiModule/AWSApiModule.py @@ -63,9 +63,9 @@ def __init__(self, aws_default_region, aws_role_arn, aws_role_session_name, aws_ self.config = Config( connect_timeout=connect_timeout, read_timeout=read_timeout, - retries=dict( - max_attempts=int(retries) - ), + retries={ + "max_attempts": int(retries) + }, proxies=proxies ) @@ -73,7 +73,7 @@ def update_config(self): command_config = {} retries = demisto.getArg('retries') # Supports retries and timeout parameters on the command execution level if retries is not None: - command_config['retries'] = dict(max_attempts=int(retries)) + command_config['retries'] = {"max_attempts": int(retries)} timeout = demisto.getArg('timeout') if timeout is not None: (read_timeout, connect_timeout) = AWSClient.get_timeout(timeout) @@ -86,6 +86,7 @@ def update_config(self): def aws_session(self, service, region=None, role_arn=None, role_session_name=None, role_session_duration=None, role_policy=None): kwargs = {} + client = None self.update_config() diff --git a/Packs/ApiModules/Scripts/AWSApiModule/AWSApiModule_test.py b/Packs/ApiModules/Scripts/AWSApiModule/AWSApiModule_test.py index ed42a3a83cbd..57519de3af99 100644 --- a/Packs/ApiModules/Scripts/AWSApiModule/AWSApiModule_test.py +++ b/Packs/ApiModules/Scripts/AWSApiModule/AWSApiModule_test.py @@ -95,15 +95,20 @@ def test_get_timeout(): - validates the logic of setting read_timeout and connect_timeout values """ (read, connect) = AWSClient.get_timeout(None) - assert read == 60 and connect == 10 + assert read == 60 + assert connect == 10 (read, connect) = AWSClient.get_timeout("100") - assert read == 100 and connect == 10 + assert read == 100 + assert connect == 10 (read, connect) = AWSClient.get_timeout("200,2") - assert read == 200 and connect == 2 + assert read == 200 + assert connect == 2 (read, connect) = AWSClient.get_timeout(60) - assert read == 60 and connect == 10 - (read, connect) = AWSClient.get_timeout(u"60, 10") # testing for unicode variable - assert read == 60 and connect == 10 + assert read == 60 + assert connect == 10 + (read, connect) = AWSClient.get_timeout("60, 10") # testing for unicode variable + assert read == 60 + assert connect == 10 def test_AWSClient_with_session_token(): diff --git a/Packs/ApiModules/pack_metadata.json b/Packs/ApiModules/pack_metadata.json index 6a085fcadaee..38a715c26d0a 100644 --- a/Packs/ApiModules/pack_metadata.json +++ b/Packs/ApiModules/pack_metadata.json @@ -2,7 +2,7 @@ "name": "ApiModules", "description": "API Modules", "support": "xsoar", - "currentVersion": "2.2.36", + "currentVersion": "2.2.37", "author": "Cortex XSOAR", "url": "https://www.paloaltonetworks.com/cortex", "email": "", diff --git a/Packs/Aws-SecretsManager/ReleaseNotes/1_0_46.md b/Packs/Aws-SecretsManager/ReleaseNotes/1_0_46.md new file mode 100644 index 000000000000..a2ba6bb63fb4 --- /dev/null +++ b/Packs/Aws-SecretsManager/ReleaseNotes/1_0_46.md @@ -0,0 +1,4 @@ +#### Integrations + +##### Aws Secrets Manager +Code functionality improvements. \ No newline at end of file diff --git a/Packs/Aws-SecretsManager/pack_metadata.json b/Packs/Aws-SecretsManager/pack_metadata.json index 5babff98d583..0fb9312dac9d 100644 --- a/Packs/Aws-SecretsManager/pack_metadata.json +++ b/Packs/Aws-SecretsManager/pack_metadata.json @@ -2,7 +2,7 @@ "name": "AWS Secrets Manager", "description": "AWS Secrets Manager helps you to securely encrypt, store, and retrieve credentials for your databases and other services.", "support": "xsoar", - "currentVersion": "1.0.45", + "currentVersion": "1.0.46", "author": "Cortex XSOAR", "url": "https://www.paloaltonetworks.com/cortex", "email": "", diff --git a/Packs/CIRCLHashlookup/Integrations/CIRCLEHashlookup/CIRCLEHashlookup.py b/Packs/CIRCLHashlookup/Integrations/CIRCLEHashlookup/CIRCLEHashlookup.py index b0c166caa25e..8bc5c866e9d5 100644 --- a/Packs/CIRCLHashlookup/Integrations/CIRCLEHashlookup/CIRCLEHashlookup.py +++ b/Packs/CIRCLHashlookup/Integrations/CIRCLEHashlookup/CIRCLEHashlookup.py @@ -91,6 +91,9 @@ def create_file_output(results: Dict[str, str], hashtype: str, reliability: str, file_hash = results.get('SHA-1') elif hashtype == 'md5': file_hash = results.get('MD5') + else: + file_hash = "" + demisto.debug(f"{hashtype=} doesn't match any type. {file_hash=}") if 'KnownMalicious' in results: dbot_score_object = Common.DBotScore(indicator=file_hash, indicator_type=DBotScoreType.FILE, diff --git a/Packs/CIRCLHashlookup/Integrations/CIRCLEHashlookup/CIRCLEHashlookup.yml b/Packs/CIRCLHashlookup/Integrations/CIRCLEHashlookup/CIRCLEHashlookup.yml index 7d3ee97ab046..3252e7a9b42f 100644 --- a/Packs/CIRCLHashlookup/Integrations/CIRCLEHashlookup/CIRCLEHashlookup.yml +++ b/Packs/CIRCLHashlookup/Integrations/CIRCLEHashlookup/CIRCLEHashlookup.yml @@ -137,7 +137,7 @@ script: - contextPath: Circl.Top description: The top 100 of most queried values. type: string - dockerimage: demisto/python3:3.11.10.115186 + dockerimage: demisto/python3:3.11.10.116949 script: '' subtype: python3 type: python diff --git a/Packs/CIRCLHashlookup/ReleaseNotes/1_0_7.md b/Packs/CIRCLHashlookup/ReleaseNotes/1_0_7.md new file mode 100644 index 000000000000..d991bfef4684 --- /dev/null +++ b/Packs/CIRCLHashlookup/ReleaseNotes/1_0_7.md @@ -0,0 +1,6 @@ + +#### Integrations + +##### CIRCLEHashlookup +- Code functionality improvements. +- Updated the Docker image to: *demisto/python3:3.11.10.116949*. \ No newline at end of file diff --git a/Packs/CIRCLHashlookup/pack_metadata.json b/Packs/CIRCLHashlookup/pack_metadata.json index babb38305372..a6f9231dfa1f 100644 --- a/Packs/CIRCLHashlookup/pack_metadata.json +++ b/Packs/CIRCLHashlookup/pack_metadata.json @@ -2,7 +2,7 @@ "name": "CIRCL hashlookup (hashlookup.circl.lu)", "description": "CIRCL hash lookup is a public API to lookup hash values against known database of files. NSRL RDS database is included and many others are also included. The API is accessible via HTTP ReST API and the API is also described as an OpenAPI. The service is free and served as a best-effort basis.", "support": "community", - "currentVersion": "1.0.6", + "currentVersion": "1.0.7", "author": "Harri Ruuttila", "url": "", "email": "", diff --git a/Packs/CSCDomainManager/Integrations/CSCDomainManager/CSCDomainManager.py b/Packs/CSCDomainManager/Integrations/CSCDomainManager/CSCDomainManager.py index 927e9d1a8013..588d3954ebbd 100644 --- a/Packs/CSCDomainManager/Integrations/CSCDomainManager/CSCDomainManager.py +++ b/Packs/CSCDomainManager/Integrations/CSCDomainManager/CSCDomainManager.py @@ -130,6 +130,7 @@ def get_configurations(self, params): def parse_and_format_date(value: str) -> str: + formatted_date = value date = dateparser.parse(value) if date is None: # not a date return_error(f'Failed to execute {demisto.command()} command. Invalid Date') diff --git a/Packs/CSCDomainManager/Integrations/CSCDomainManager/CSCDomainManager.yml b/Packs/CSCDomainManager/Integrations/CSCDomainManager/CSCDomainManager.yml index 8ce70b241429..d4050d0f88a6 100644 --- a/Packs/CSCDomainManager/Integrations/CSCDomainManager/CSCDomainManager.yml +++ b/Packs/CSCDomainManager/Integrations/CSCDomainManager/CSCDomainManager.yml @@ -667,7 +667,7 @@ script: script: '-' type: python subtype: python3 - dockerimage: demisto/python3:3.11.10.115186 + dockerimage: demisto/python3:3.11.10.116949 fromversion: 5.0.0 tests: - CSCDomainManager_Test diff --git a/Packs/CSCDomainManager/Integrations/CSCDomainManager/README.md b/Packs/CSCDomainManager/Integrations/CSCDomainManager/README.md index 3966704eaa7e..8a8201934b35 100644 --- a/Packs/CSCDomainManager/Integrations/CSCDomainManager/README.md +++ b/Packs/CSCDomainManager/Integrations/CSCDomainManager/README.md @@ -758,3 +758,89 @@ Get domain data by qualified domain name >|Qualified Domain Name|Domain|Idn|Generic top-level domains|Managed Status|Registration Date|Registry Expiry Date|Paid Through Date|Country Code|Server Delete Prohibited|Server Transfer Prohibited|Server Update Prohibited|Name Servers|Dns Type|Whois Contact first Name|Whois Contact last Name|Whois Contact email| >|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---| >| csc-panw.biz | csc-panw | | false | ACTIVE | 22-Apr-2024 UTC | 22-Apr-2025 UTC | 22-Apr-2025 UTC | | | false | | dns1.cscdns.net,
dns2.cscdns.net | CSC_BASIC | Domain | Administrator | admin@internationaladmin.com | + + +### csc-domains-configuration-search + +*** +Get configuration information for owned domains with optional filtering. + +#### Base Command + +`csc-domains-configuration-search` + +#### Input + +| **Argument Name** | **Description** | **Required** | +| --- | --- | --- | +| domain_name | Domain name to filter by. Can start with like=, in=. | Optional | +| registration_date | Registration date to filter by. Can start with gt=, ge=, lt=, le=. Date example: 22-Apr-2024, 22/4/24, 22-4-24. | Optional | +| domain_email | Email to filter by. Can start with like=, in=. | Optional | +| filter | Create a filter using selectors such as: accountName, accountNumber, brandName, businessUnit, city, country, countryCode, criticalDomain, dnssecActivated, dnsType, domain, email, extension, fax, firstName, idnReferenceName, lastModifiedDate, lastModifiedDescription, lastModifiedReason, lastName, localAgent, managedStatus, nameServers, newGtld, organization, paidThroughDate, phone, phoneExtn, postalCode, qualifiedDomainName, redirectType, registrationDate, registryExpiryDate, serverDeleteProhibited, serverTransferProhibited, serverUpdateProhibited, stateProvince, street1, street2, urlForwarding, whoisPrivacy. For example: filter=lastName==Administrator. | Optional | +| page | Page number. | Optional | +| page_size | The number of rows in a page. | Optional | +| limit | The maximum number of rows to present. | Optional | + +#### Context Output + +| **Path** | **Type** | **Description** | +| --- | --- |-------------------| +| CSCDomainManager.Domain.Configuration.domain | String | The domain. | +| CSCDomainManager.Domain.Configuration.domainLabel | String | The domain label. | +| CSCDomainManager.Domain.Configuration.domainStatusCode | String | The domain status code. | +| CSCDomainManager.Domain.Configuration.domainExtension | String | The domain extension. | +| CSCDomainManager.Domain.Configuration.country | String | Country associated with the domain. | +| CSCDomainManager.Domain.Configuration.adminEmail | String | Domain email. | +| CSCDomainManager.Domain.Configuration.adminName | String | Admin name associated with the domain. | +| CSCDomainManager.Domain.Configuration.accountNumber | String | The account number associated with the domain. | +| CSCDomainManager.Domain.Configuration.accountName | String | The account name associated with the domain. | +| CSCDomainManager.Domain.Configuration.account.accountName | String | The name of the account associated with the domain. | +| CSCDomainManager.Domain.Configuration.account.accountNumber | String | The account number associated with the domain. | +| CSCDomainManager.Domain.Configuration.adminOrg | String | The administrative organization managing the domain. | +| CSCDomainManager.Domain.Configuration.businessUnit | String | The business unit associated with the domain. | +| CSCDomainManager.Domain.Configuration.dnsData.dnsDomain | String | The DNS domain information. | +| CSCDomainManager.Domain.Configuration.dnsData.dnsProvider | String | The DNS provider for the domain. | +| CSCDomainManager.Domain.Configuration.dnsHostingType | String | The type of DNS hosting used for the domain. | +| CSCDomainManager.Domain.Configuration.dnsTraffic12moAve | Number | The average DNS traffic over the last 12 months. | +| CSCDomainManager.Domain.Configuration.extension | String | The extension of the domain, such as .com, .net, etc. | +| CSCDomainManager.Domain.Configuration.hasCscUrlf | Boolean | Indicates if the domain has CSC URL forwarding enabled. | +| CSCDomainManager.Domain.Configuration.hasDkim | Boolean | Indicates if DKIM is configured for the domain. | +| CSCDomainManager.Domain.Configuration.hasDmarc | Boolean | Indicates if DMARC is configured for the domain. | +| CSCDomainManager.Domain.Configuration.hasDnssecDs | Boolean | Indicates if the domain has DNSSEC DS records. | +| CSCDomainManager.Domain.Configuration.hasSpf | Boolean | Indicates if SPF is configured for the domain. | +| CSCDomainManager.Domain.Configuration.hasWww | Boolean | Indicates if the domain has a WWW record. | +| CSCDomainManager.Domain.Configuration.isGtld | Boolean | Indicates if the domain is a gTLD (Generic Top-Level Domain). | +| CSCDomainManager.Domain.Configuration.isLive | Boolean | Indicates if the domain is live. | +| CSCDomainManager.Domain.Configuration.isLiveType | String | The type of live status for the domain. | +| CSCDomainManager.Domain.Configuration.isMultilockEligible | Boolean | Indicates if the domain is eligible for multilock. | +| CSCDomainManager.Domain.Configuration.isVital | Boolean | Indicates if the domain is considered vital. | +| CSCDomainManager.Domain.Configuration.multiLocked | Boolean | Indicates if the domain is multilocked. | +| CSCDomainManager.Domain.Configuration.numLiveMx | Number | The number of live MX records for the domain. | +| CSCDomainManager.Domain.Configuration.numRootA | Number | The number of root A records for the domain. | +| CSCDomainManager.Domain.Configuration.numRootTxt | Number | The number of root TXT records for the domain. | +| CSCDomainManager.Domain.Configuration.numSslNetcraft | Number | The number of SSL certificates detected by Netcraft for the domain. | +| CSCDomainManager.Domain.Configuration.numWwwA | Number | The number of WWW A records for the domain. | +| CSCDomainManager.Domain.Configuration.numWwwCname | Number | The number of WWW CNAME records for the domain. | +| CSCDomainManager.Domain.Configuration.regEmail | String | The registration email address for the domain. | +| CSCDomainManager.Domain.Configuration.regName | String | The registration name for the domain. | +| CSCDomainManager.Domain.Configuration.regOrg | String | The registration organization for the domain. | +| CSCDomainManager.Domain.Configuration.registryExpiryDate | Date | The expiration date of the domain registration in the registry. | +| CSCDomainManager.Domain.Configuration.rootHttpCode | Number | The HTTP response code for the root domain. | +| CSCDomainManager.Domain.Configuration.rootHttpUrl | Unknown | The HTTP URL for the root domain. | +| CSCDomainManager.Domain.Configuration.rootIsUrlf | Boolean | Indicates if the root domain is URL forwarding enabled. | +| CSCDomainManager.Domain.Configuration.serverDeleteProhibited | Unknown | Indicates if the domain is prohibited from deletion by the server. | +| CSCDomainManager.Domain.Configuration.serverTransferProhibited | Boolean | Indicates if the domain is prohibited from transfer by the server. | +| CSCDomainManager.Domain.Configuration.serverUpdateProhibited | Boolean | Indicates if the domain is prohibited from updates by the server. | +| CSCDomainManager.Domain.Configuration.techEmail | String | The technical contact email address for the domain. | +| CSCDomainManager.Domain.Configuration.techName | String | The technical contact name for the domain. | +| CSCDomainManager.Domain.Configuration.techOrg | String | The technical contact organization for the domain. | +| CSCDomainManager.Domain.Configuration.tld | String | The top-level domain (TLD) of the domain. | +| CSCDomainManager.Domain.Configuration.urlfTraffic12moAve | Number | The average URL forwarding traffic over the last 12 months. | +| CSCDomainManager.Domain.Configuration.valueRootA | Number | The value of root A records for the domain. | +| CSCDomainManager.Domain.Configuration.valueRootMx | Number | The value of root MX records for the domain. | +| CSCDomainManager.Domain.Configuration.valueRootTxt | Number | The value of root TXT records for the domain. | +| CSCDomainManager.Domain.Configuration.valueWwwA | Number | The value of WWW A records for the domain. | +| CSCDomainManager.Domain.Configuration.valueWwwCname | Number | The value of WWW CNAME records for the domain. | +| CSCDomainManager.Domain.Configuration.wwwHttpCode | String | The HTTP response code for the WWW domain. | +| CSCDomainManager.Domain.Configuration.wwwHttpUrl | String | The HTTP URL for the WWW domain. | +| CSCDomainManager.Domain.Configuration.wwwIsUrlf | Boolean | Indicates if the WWW domain is URL forwarding enabled. | diff --git a/Packs/CSCDomainManager/ReleaseNotes/1_0_5.md b/Packs/CSCDomainManager/ReleaseNotes/1_0_5.md new file mode 100644 index 000000000000..adcd2d5cae77 --- /dev/null +++ b/Packs/CSCDomainManager/ReleaseNotes/1_0_5.md @@ -0,0 +1,5 @@ +#### Integrations + +##### CSCDomainManager +- Code functionality improvements. +- Updated the Docker image to: *demisto/python3:3.11.10.116949*. \ No newline at end of file diff --git a/Packs/CSCDomainManager/pack_metadata.json b/Packs/CSCDomainManager/pack_metadata.json index 2fc3a11b163a..705c30008748 100644 --- a/Packs/CSCDomainManager/pack_metadata.json +++ b/Packs/CSCDomainManager/pack_metadata.json @@ -2,7 +2,7 @@ "name": "CSCDomainManager", "description": "CSCDomainManager is the world's first multilingual domain management tool, available in English, French, and German. It uses rules-based technology, customizable reporting, granular user management, and more to enable you to manage your domain.", "support": "partner", - "currentVersion": "1.0.4", + "currentVersion": "1.0.5", "author": "CSC", "url": "https://www.cscdbs.com", "email": "domain_api_support@cscglobal.com", diff --git a/Packs/Campaign/ReleaseNotes/3_4_14.md b/Packs/Campaign/ReleaseNotes/3_4_14.md new file mode 100644 index 000000000000..a621bb684c38 --- /dev/null +++ b/Packs/Campaign/ReleaseNotes/3_4_14.md @@ -0,0 +1,4 @@ +#### Scripts +##### FindEmailCampaign +- Code functionality improvements. +- Updated the Docker image to *demisto/sklearn:1.0.0.1858294*. \ No newline at end of file diff --git a/Packs/Campaign/Scripts/FindEmailCampaign/FindEmailCampaign.py b/Packs/Campaign/Scripts/FindEmailCampaign/FindEmailCampaign.py index 67ef0620456c..cd64824e0244 100644 --- a/Packs/Campaign/Scripts/FindEmailCampaign/FindEmailCampaign.py +++ b/Packs/Campaign/Scripts/FindEmailCampaign/FindEmailCampaign.py @@ -359,9 +359,9 @@ def summarize_email_body(body, subject, nb_sentences=3, subject_weight=1.5, keyw if word.lower() in word_frequency: sentence_rank[i] += word_frequency[word.lower()] sentence_rank[i] = sentence_rank[i] / len(word_tokenize(sent)) # type: ignore - top_sentences_indices = np.argsort(sentence_rank)[::-1][:nb_sentences].tolist() + top_sentences_indices: np.ndarray = np.argsort(sentence_rank)[::-1][:nb_sentences].tolist() summary = [] - for sent_i in sorted(top_sentences_indices): + for sent_i in sorted(top_sentences_indices): # type: ignore sent = corpus[sent_i].strip().replace('\n', ' ') if sent_i == 0 and sent_i + 1 not in top_sentences_indices: sent = sent + ' ...' diff --git a/Packs/Campaign/Scripts/FindEmailCampaign/FindEmailCampaign.yml b/Packs/Campaign/Scripts/FindEmailCampaign/FindEmailCampaign.yml index 1dc9d5f7b513..56857de4165f 100644 --- a/Packs/Campaign/Scripts/FindEmailCampaign/FindEmailCampaign.yml +++ b/Packs/Campaign/Scripts/FindEmailCampaign/FindEmailCampaign.yml @@ -126,7 +126,7 @@ tags: - phishing timeout: '0' type: python -dockerimage: demisto/sklearn:1.0.0.108551 +dockerimage: demisto/sklearn:1.0.0.1858294 tests: - Detect & Manage Phishing Campaigns - Test fromversion: 5.0.0 diff --git a/Packs/Campaign/pack_metadata.json b/Packs/Campaign/pack_metadata.json index de0dcd5a2249..b170392a382d 100644 --- a/Packs/Campaign/pack_metadata.json +++ b/Packs/Campaign/pack_metadata.json @@ -2,7 +2,7 @@ "name": "Phishing Campaign", "description": "This pack can help you find related phishing, spam or other types of email incidents and characterize campaigns.", "support": "xsoar", - "currentVersion": "3.4.13", + "currentVersion": "3.4.14", "author": "Cortex XSOAR", "url": "https://www.paloaltonetworks.com/cortex", "email": "", diff --git a/Packs/CentrifyVault/Integrations/CentrifyVault/CentrifyVault.py b/Packs/CentrifyVault/Integrations/CentrifyVault/CentrifyVault.py index fd9529d5ebab..26d37da7a6d3 100644 --- a/Packs/CentrifyVault/Integrations/CentrifyVault/CentrifyVault.py +++ b/Packs/CentrifyVault/Integrations/CentrifyVault/CentrifyVault.py @@ -754,6 +754,7 @@ def main(): args = demisto.args() LOG(f'Command being called is {command}.') + result = "" if command == 'test-module': result = test_module(client) diff --git a/Packs/CentrifyVault/Integrations/CentrifyVault/CentrifyVault.yml b/Packs/CentrifyVault/Integrations/CentrifyVault/CentrifyVault.yml index 098926d98a03..19455ff5d002 100644 --- a/Packs/CentrifyVault/Integrations/CentrifyVault/CentrifyVault.yml +++ b/Packs/CentrifyVault/Integrations/CentrifyVault/CentrifyVault.yml @@ -44,55 +44,55 @@ script: predefined: - Folder - Set - - description: 'Name of the holder (Folder/Set) where the secret is available. Please choose "Folder" or "Set" in the "holderType" argument. Ex: XSOAR, XSOAR/SUB_FOLDER' + - description: 'Name of the holder (Folder/Set) where the secret is available. Please choose "Folder" or "Set" in the "holderType" argument. Ex: XSOAR, XSOAR/SUB_FOLDER.' name: holderName - - description: 'Secret name which has the secret. Ex: client*, client_secret' + - description: 'Secret name which has the secret. Ex: client*, client_secret.' name: secretName description: 'Retrieves the secret from centrify vault based on folder name, set name or secret name. If folder name is not provided, all the secrets in the parent folder will be fetched recursively. You can filter based on the secret name and folder separately as well as combined. ' name: centrify-retrieve-secrets outputs: - contextPath: Centrify.Secrets.FolderName - description: Folder name of the secret + description: Folder name of the secret. type: string - contextPath: Centrify.Secrets.SecretName - description: Secret name of the secret + description: Secret name of the secret. type: string - contextPath: Centrify.Secrets.SecretText - description: Secret text of the secret + description: Secret text of the secret. type: string - contextPath: Centrify.Secrets.SecretType - description: Type of the secret + description: Type of the secret. type: string - contextPath: Centrify.Secrets.SecretDescription - description: Description of the secret + description: Description of the secret. type: string - contextPath: Centrify.Secrets.SecretID - description: ID of the Secret retrieved + description: ID of the Secret retrieved. type: string - arguments: - - description: ID of the secret + - description: ID of the secret. name: secretId required: true description: Retrieves the secret from centrify vault based on secret ID. name: centrify-retrieve-secret-by-secretid outputs: - contextPath: Centrify.Secrets.FolderName - description: Folder name of the secret + description: Folder name of the secret. type: string - contextPath: Centrify.Secrets.SecretName - description: Secret name of the secret + description: Secret name of the secret. type: string - contextPath: Centrify.Secrets.SecretText - description: Secret text of the secret + description: Secret text of the secret. type: string - contextPath: Centrify.Secrets.SecretType - description: Type of the secret + description: Type of the secret. type: string - contextPath: Centrify.Secrets.SecretDescription - description: Description of the secret + description: Description of the secret. type: string - contextPath: Centrify.Secrets.SecretID - description: ID of the Secret retrieved + description: ID of the Secret retrieved. type: string - arguments: - description: Name of the folder to be created. This will be subfolder if "parentFolderName" is provided. @@ -102,20 +102,20 @@ script: name: parentFolderName - description: Description of the folder to be created. name: folderDescription - description: Creates a folder in Centrify Vault + description: Creates a folder in Centrify Vault. name: centrify-create-secretfolder outputs: - contextPath: Centrify.Folder.FolderName - description: Name of the folder created + description: Name of the folder created. type: string - contextPath: Centrify.Folder.FolderID - description: ID of the folder created + description: ID of the folder created. type: string - contextPath: Centrify.Folder.ParentFolderName - description: Name of the parent folder + description: Name of the parent folder. type: string - contextPath: Centrify.Folder.FolderDescription - description: Description of the folder created + description: Description of the folder created. type: string - arguments: - auto: PREDEFINED @@ -125,22 +125,22 @@ script: - Folder - Set required: true - - description: 'Name of the holder (Folder/Set) where the secret needs to be created. Please choose "Folder" or "Set" in the "holderType" argument. Ex: XSOAR, XSOAR/SUB_FOLDER ' + - description: 'Name of the holder (Folder/Set) where the secret needs to be created. Please choose "Folder" or "Set" in the "holderType" argument. Ex: XSOAR, XSOAR/SUB_FOLDER.' name: holderName required: true - - description: Name of the secret to be created + - description: Name of the secret to be created. name: secretName required: true - - description: Text of the secret + - description: Text of the secret. name: secretText required: true - auto: PREDEFINED - description: Type of the secret + description: Type of the secret. name: secretType predefined: - Text required: true - - description: Description of the secret + - description: Description of the secret. name: secretDescription description: Creates a secret in Centrify Vault. name: centrify-create-secret @@ -149,79 +149,79 @@ script: description: Type of the location where secret is created. It can be folder or set. type: string - contextPath: Centrify.Secrets.SecretName - description: Name of the secret created + description: Name of the secret created. type: string - contextPath: Centrify.Secrets.SecretID - description: ID of the secret created + description: ID of the secret created. type: string - contextPath: Centrify.Secrets.SecretType - description: Type of the secret created + description: Type of the secret created. type: string - contextPath: Centrify.Secrets.FolderName - description: Name of the folder where the secret is created + description: Name of the folder where the secret is created. type: string - contextPath: Centrify.Secrets.FolderID - description: ID of the folder where the secret is created + description: ID of the folder where the secret is created. type: string - contextPath: Centrify.Secrets.SetName - description: Name of the set where the secret is created + description: Name of the set where the secret is created. type: string - contextPath: Centrify.Secrets.SetID - description: ID of the set where the secret is created + description: ID of the set where the secret is created. type: string - contextPath: Centrify.Secrets.SecretDescription - description: Description of the created secret + description: Description of the created secret. type: string - arguments: - - description: Name of the Set to be created + - description: Name of the Set to be created. name: setName required: true - - description: Description of the Set to be created + - description: Description of the Set to be created. name: setDescription - description: Creates a set in Centrify Vault + description: Creates a set in Centrify Vault. name: centrify-create-set outputs: - contextPath: Centrify.Set.SetName - description: Name of the set created + description: Name of the set created. type: string - contextPath: Centrify.Set.SetID - description: ID of the set created + description: ID of the set created. type: string - contextPath: Centrify.Set.SetDescription - description: Description of the set created + description: Description of the set created. type: string - arguments: [] - description: Fetch details of all folders in Centrify Vault + description: Fetch details of all folders in Centrify Vault. name: centrify-retrieve-folders outputs: - contextPath: Centrify.Folder.FolderName - description: Name of the folder + description: Name of the folder. type: string - contextPath: Centrify.Folder.FolderID - description: ID of the folder + description: ID of the folder. type: string - contextPath: Centrify.Folder.ParentFolder - description: Name of the parent folder + description: Name of the parent folder. type: string - contextPath: Centrify.Folder.FolderDescription - description: Description of the folder + description: Description of the folder. type: string - contextPath: Centrify.Folder.FolderDirectory - description: Complete directory of the folder + description: Complete directory of the folder. type: string - arguments: - description: Name of the folder to be deleted. Please provide parent foldername in the argument "parentFolderName" if you are deleting a subfolder. name: folderName required: true - - description: Name of the parent folder + - description: Name of the parent folder. name: parentFolderName - description: Delete a folder from the Centrify Vault + description: Delete a folder from the Centrify Vault. name: centrify-delete-folder - arguments: - - description: Name of the secret to be deleted + - description: Name of the secret to be deleted. name: secretName required: true - - description: 'Name of the folder from where the secret should be deleted. If the secret is in subfolder, then provide parent folder followed by "/" and subfolder name. Ex: XSOAR/Demisto' + - description: 'Name of the folder from where the secret should be deleted. If the secret is in subfolder, then provide parent folder followed by "/" and subfolder name. Ex: XSOAR/Demisto.' name: folderName - auto: PREDEFINED description: '"Yes" if you want to delete all the secrets having same name in all the subfolders recursively. "No" if you want do not want to delete the secret in the subfolders.' @@ -240,40 +240,40 @@ script: description: 'Delete Secret from the Centrify Vault. Please note: Enabling "recursiveDelete" to "Yes" will delete all secrets if there multiple secrets with same name in subfolders.' name: centrify-delete-secret - arguments: - - description: ID of the Secret to be deleted + - description: ID of the Secret to be deleted. name: secretId required: true - description: Delete Secret from the Centrify Vault based on the Secret ID provided + description: Delete Secret from the Centrify Vault based on the Secret ID provided. name: centrify-delete-secret-by-secretid - arguments: - - description: Name of the set where the secret will be added/moved + - description: Name of the set where the secret will be added/moved. name: setName required: true - - description: ID of the secret which needs to be moved to the set + - description: ID of the secret which needs to be moved to the set. name: secretId required: true description: Adds/Moves a secret to a set for the provided secretID. Use "centrify-retrieve-secrets" to fetch secret ID's. name: centrify-add-secret-to-set - arguments: [] - description: Fetches the details of all sets in the Centrify Vault + description: Fetches the details of all sets in the Centrify Vault. name: centrify-retrieve-sets outputs: - contextPath: Centrify.Set.SetName - description: Name of the set + description: Name of the set. type: string - contextPath: Centrify.Set.SetID - description: ID of the set + description: ID of the set. type: string - contextPath: Centrify.Set.SetDescription - description: Description of the set + description: Description of the set. type: string - arguments: - - description: Name of the set to be deleted + - description: Name of the set to be deleted. name: setName required: true - description: Delete set from the Centrify Vault + description: Delete set from the Centrify Vault. name: centrify-delete-set - dockerimage: demisto/python3:3.11.10.115186 + dockerimage: demisto/python3:3.11.10.116949 runonce: false script: '' subtype: python3 diff --git a/Packs/CentrifyVault/ReleaseNotes/1_0_10.md b/Packs/CentrifyVault/ReleaseNotes/1_0_10.md new file mode 100644 index 000000000000..69cf84fd5294 --- /dev/null +++ b/Packs/CentrifyVault/ReleaseNotes/1_0_10.md @@ -0,0 +1,5 @@ +#### Integrations + +##### Centrify Vault +- Code functionality improvements. +- Updated the Docker image to: *demisto/python3:3.11.10.116949*. \ No newline at end of file diff --git a/Packs/CentrifyVault/pack_metadata.json b/Packs/CentrifyVault/pack_metadata.json index 8b157c505ffa..70cfdcbe2525 100644 --- a/Packs/CentrifyVault/pack_metadata.json +++ b/Packs/CentrifyVault/pack_metadata.json @@ -2,7 +2,7 @@ "name": "Centrify Vault", "description": "Centrify Vault integration to create/fetch/delete secrets/folders/sets.", "support": "community", - "currentVersion": "1.0.9", + "currentVersion": "1.0.10", "author": "prashasthbaliga", "url": "", "email": "", diff --git a/Packs/CheckpointFirewall/Integrations/CheckPointFirewallV2/CheckPointFirewallV2.py b/Packs/CheckpointFirewall/Integrations/CheckPointFirewallV2/CheckPointFirewallV2.py index 73e6ef3c4497..3c52021507bd 100644 --- a/Packs/CheckpointFirewall/Integrations/CheckPointFirewallV2/CheckPointFirewallV2.py +++ b/Packs/CheckpointFirewall/Integrations/CheckPointFirewallV2/CheckPointFirewallV2.py @@ -1739,8 +1739,8 @@ def checkpoint_show_threat_protection_command(client: Client, args): readable_output = '' uid = args.get('uid', '') name = args.get('name') - properties = False if args.get('properties') == 'false' else True - profiles = False if args.get('profiles') == 'false' else True + properties = args.get('properties') != 'false' + profiles = args.get('profiles') != 'false' result = client.show_threat_protection(uid, name, properties, profiles) if result: @@ -1834,6 +1834,8 @@ def checkpoint_delete_threat_protections_command(client: Client, args): readable_output = tableToMarkdown('CheckPoint data for delete threat protections command:', result) + else: + readable_output = 'No result was found.' command_results = CommandResults( outputs_prefix='CheckPoint.DeletedThreatProtections', outputs_key_field='task-id', diff --git a/Packs/CheckpointFirewall/Integrations/CheckPointFirewallV2/CheckPointFirewallV2.yml b/Packs/CheckpointFirewall/Integrations/CheckPointFirewallV2/CheckPointFirewallV2.yml index 0853b2d449a4..c29224a31872 100644 --- a/Packs/CheckpointFirewall/Integrations/CheckPointFirewallV2/CheckPointFirewallV2.yml +++ b/Packs/CheckpointFirewall/Integrations/CheckPointFirewallV2/CheckPointFirewallV2.yml @@ -102,7 +102,7 @@ script: description: Host IPv4 address. type: String - contextPath: CheckPoint.Host.ipv6-address - description: IP address + description: IP address. type: String - contextPath: CheckPoint.Host.read-only description: Indicates if the object is read-only. @@ -1139,7 +1139,7 @@ script: description: Object types. type: String - arguments: - - description: Object name. Must be unique in the domain + - description: Object name. Must be unique in the domain. name: name required: true - description: Each application is assigned to one primary category based on its most defining aspect. @@ -1657,11 +1657,11 @@ script: description: Type of objects to be created. name: object_type required: true - - description: ip addresses to be added + - description: ip addresses to be added. isArray: true name: ipaddress required: true - - description: names of the ip objects to be added + - description: names of the ip objects to be added. isArray: true name: name required: true @@ -1708,7 +1708,7 @@ script: predefined: - 'true' - 'false' - description: Shows an existing threat protection using object name or uid + description: Shows an existing threat protection using object name or uid. name: checkpoint-show-threat-protection outputs: - contextPath: CheckPoint.ShowThreatProtection @@ -1722,7 +1722,7 @@ script: description: '' - name: order description: '' - description: Shows existing threat protections using a filter + description: Shows existing threat protections using a filter. name: checkpoint-show-threat-protections outputs: - contextPath: CheckPoint.ShowThreatProtections @@ -1818,13 +1818,13 @@ script: - active - inactive - staging - description: Add a new threat profile + description: Add a new threat profile. name: checkpoint-add-threat-profile outputs: - contextPath: CheckPoint.AddedThreatProfiles description: '' - arguments: - - description: Valid response is "snort" + - description: Valid response is "snort". name: packageFormat required: true description: Deletes threat protections. @@ -1832,7 +1832,7 @@ script: outputs: - contextPath: CheckPoint.DeletedThreatProtections description: '' - dockerimage: demisto/python3:3.11.10.115186 + dockerimage: demisto/python3:3.11.10.116949 runonce: false script: '' subtype: python3 diff --git a/Packs/CheckpointFirewall/ReleaseNotes/2_3_25.md b/Packs/CheckpointFirewall/ReleaseNotes/2_3_25.md new file mode 100644 index 000000000000..7e9965649c64 --- /dev/null +++ b/Packs/CheckpointFirewall/ReleaseNotes/2_3_25.md @@ -0,0 +1,5 @@ +#### Integrations + +##### CheckPoint Firewall v2 +- Code functionality improvements. +- Updated the Docker image to: *demisto/python3:3.11.10.116949*. \ No newline at end of file diff --git a/Packs/CheckpointFirewall/pack_metadata.json b/Packs/CheckpointFirewall/pack_metadata.json index 67994ebcfbaa..12204aa28e8e 100644 --- a/Packs/CheckpointFirewall/pack_metadata.json +++ b/Packs/CheckpointFirewall/pack_metadata.json @@ -2,7 +2,7 @@ "name": "Check Point Firewall", "description": "Manage Check Point firewall via API", "support": "xsoar", - "currentVersion": "2.3.24", + "currentVersion": "2.3.25", "author": "Cortex XSOAR", "url": "https://www.paloaltonetworks.com/cortex", "email": "", diff --git a/Packs/CiscoASA/Integrations/CiscoASA/CiscoASA.py b/Packs/CiscoASA/Integrations/CiscoASA/CiscoASA.py index 09b3806cc8aa..c9ff682bce6f 100644 --- a/Packs/CiscoASA/Integrations/CiscoASA/CiscoASA.py +++ b/Packs/CiscoASA/Integrations/CiscoASA/CiscoASA.py @@ -1,6 +1,9 @@ +from requests import Response + import demistomock as demisto # noqa: F401 from CommonServerPython import * # noqa: F401 -from typing import Any, Callable, Optional +from typing import Any +from collections.abc import Callable from functools import wraps from copy import deepcopy from http import HTTPStatus @@ -244,7 +247,7 @@ def logoff(self): # if failed to logoof just write to log. no need to raise error demisto.debug(f'Logoff error: {str(e)}') - def get_all_rules(self, specific_interface: Optional[str] = None, rule_type: str = 'All') -> list: + def get_all_rules(self, specific_interface: str | None = None, rule_type: str = 'All') -> list: """ Gets a list all rules for the supplied interface. @@ -320,6 +323,7 @@ def rule_action(self, rule_id: str, interface_name: str, interface_type: str, co GET - rule info PATCH - edit rule """ + rule = {} resp_type = {"GET": "json", "DELETE": "text", "PATCH": "response" @@ -350,6 +354,7 @@ def create_rule(self, interface_type: str, interface_name: str, rule_body: dict) Returns: The new created rule's information. """ + res = Response() if interface_type == "Global": res = self._http_request("POST", '/api/access/global/rules', json_data=rule_body, resp_type="response") if interface_type == 'In': @@ -425,7 +430,7 @@ def list_interfaces(self): """ Returns a list of interfaces. """ - interfaces = list() # type: ignore + interfaces = [] # type: ignore for type in ['global', 'in', 'out']: resp = self._http_request('GET', f'/api/access/{type}') interfaces.extend(resp.get('items', [])) @@ -710,7 +715,7 @@ def raw_to_rules(raw_rules): :return: Gets raw rules as received from API and extracts only the relevant fields """ - rules = list() + rules = [] for rule in raw_rules: source_services = rule.get('sourceService', {}) @@ -842,7 +847,7 @@ def extract_data_from_dict(dict_obj: dict[str, Any], keys_mapping: dict[str, Any return extracted -def arg_to_optional_bool(arg: Optional[Any]) -> Optional[bool]: +def arg_to_optional_bool(arg: Any | None) -> bool | None: """ Wrapper to argToBoolean function that will allow Optional arguments. diff --git a/Packs/CiscoASA/Integrations/CiscoASA/CiscoASA.yml b/Packs/CiscoASA/Integrations/CiscoASA/CiscoASA.yml index bf5bb71b3ece..524725f98867 100644 --- a/Packs/CiscoASA/Integrations/CiscoASA/CiscoASA.yml +++ b/Packs/CiscoASA/Integrations/CiscoASA/CiscoASA.yml @@ -275,7 +275,7 @@ script: description: The type of the security group; SecurityName, SecurityTag, objectRef#SecurityObjGroup. type: String - contextPath: CiscoASA.Rules.SourceSecurity.value - description: The value of the SecurityName or SecurityTag + description: The value of the SecurityName or SecurityTag. type: String - contextPath: CiscoASA.Rules.SourceSecurity.objectId description: The object ID of objectRef#SecurityObjGroup. @@ -284,13 +284,13 @@ script: description: The type of the security group; SecurityName, SecurityTag, objectRef#SecurityObjGroup. type: String - contextPath: CiscoASA.Rules.DestinationSecurity.value - description: The value of the SecurityName or SecurityTag + description: The value of the SecurityName or SecurityTag. type: String - contextPath: CiscoASA.Rules.DestinationSecurity.objectId description: The object ID of objectRef#SecurityObjGroup. type: String - contextPath: CiscoASA.Rules.User.kind - description: One of AnyUser, NoneUser, objectRef#LocalUserObjGroup, objectRef#UserGroupObj, objectRef#UserObj + description: One of AnyUser, NoneUser, objectRef#LocalUserObjGroup, objectRef#UserGroupObj, objectRef#UserObj. type: String - contextPath: CiscoASA.Rules.User.value description: The user value. @@ -375,7 +375,7 @@ script: description: The type of the security group; SecurityName, SecurityTag, objectRef#SecurityObjGroup. type: String - contextPath: CiscoASA.Rules.SourceSecurity.value - description: The value of the SecurityName or SecurityTag + description: The value of the SecurityName or SecurityTag. type: String - contextPath: CiscoASA.Rules.SourceSecurity.objectId description: The object ID of objectRef#SecurityObjGroup. @@ -384,13 +384,13 @@ script: description: The type of the security group; SecurityName, SecurityTag, objectRef#SecurityObjGroup. type: String - contextPath: CiscoASA.Rules.DestinationSecurity.value - description: The value of the SecurityName or SecurityTag + description: The value of the SecurityName or SecurityTag. type: String - contextPath: CiscoASA.Rules.DestinationSecurity.objectId description: The object ID of objectRef#SecurityObjGroup. type: String - contextPath: CiscoASA.Rules.User.kind - description: One of AnyUser, NoneUser, objectRef#LocalUserObjGroup, objectRef#UserGroupObj, objectRef#UserObj + description: One of AnyUser, NoneUser, objectRef#LocalUserObjGroup, objectRef#UserGroupObj, objectRef#UserObj. type: String - contextPath: CiscoASA.Rules.User.value description: The user value. @@ -521,7 +521,7 @@ script: - auto: PREDEFINED description: Object ID of for the time range object. Can be received with the command cisco-asa-list-time-range. name: time_range - - description: The object ID to the user. Can be one of LocalUserObjGroup, UserGroupObj, UserObj. Can be received with existing commands; cisco-asa-list-local-user-group, cisco-asa-list-local-user, cisco-asa-list-user-object + - description: The object ID to the user. Can be one of LocalUserObjGroup, UserGroupObj, UserObj. Can be received with existing commands; cisco-asa-list-local-user-group, cisco-asa-list-local-user, cisco-asa-list-user-object. name: user - auto: PREDEFINED description: The type of the user. Can be one of LocalUserObjGroup, UserGroupObj, UserObj. @@ -530,7 +530,7 @@ script: - LocalUserObjGroup - UserGroupObj - UserObj - - description: Source security group in the ace. Possible values are SecurityName, SecurityTag and SecurityObjGroup. Can be received with the existing command cisco-asa-list-security-object-group + - description: Source security group in the ace. Possible values are SecurityName, SecurityTag and SecurityObjGroup. Can be received with the existing command cisco-asa-list-security-object-group. name: source_security - auto: PREDEFINED description: The source security type. @@ -539,7 +539,7 @@ script: - SecurityName - SecurityTag - SecurityObjGroup - - description: Destination security group in the ace. Possible values are SecurityName, SecurityTag and SecurityObjGroup. Can be received with the existing command cisco-asa-list-security-object-group + - description: Destination security group in the ace. Possible values are SecurityName, SecurityTag and SecurityObjGroup. Can be received with the existing command cisco-asa-list-security-object-group. name: destination_security - auto: PREDEFINED description: The destination security type. @@ -609,7 +609,7 @@ script: description: The object ID of objectRef#SecurityObjGroup. type: String - contextPath: CiscoASA.Rules.User.kind - description: One of AnyUser, NoneUser, objectRef#LocalUserObjGroup, objectRef#UserGroupObj, objectRef#UserObj + description: One of AnyUser, NoneUser, objectRef#LocalUserObjGroup, objectRef#UserGroupObj, objectRef#UserObj. type: String - contextPath: CiscoASA.Rules.User.value description: The user value. @@ -754,7 +754,7 @@ script: - LocalUserObjGroup - UserGroupObj - UserObj - - description: Source security group in the ace. Possible values are SecurityName, SecurityTag and SecurityObjGroup. Can be received with the existing command cisco-asa-list-security-object-group + - description: Source security group in the ace. Possible values are SecurityName, SecurityTag and SecurityObjGroup. Can be received with the existing command cisco-asa-list-security-object-group. name: source_security - auto: PREDEFINED description: The source security type. @@ -763,7 +763,7 @@ script: - SecurityName - SecurityTag - SecurityObjGroup - - description: Destination security group in the ace. Possible values are SecurityName, SecurityTag and SecurityObjGroup. Can be received with the existing command cisco-asa-list-security-object-group + - description: Destination security group in the ace. Possible values are SecurityName, SecurityTag and SecurityObjGroup. Can be received with the existing command cisco-asa-list-security-object-group. name: destination_security - auto: PREDEFINED description: The destination security type. @@ -833,7 +833,7 @@ script: description: The object ID of objectRef#SecurityObjGroup. type: String - contextPath: CiscoASA.Rules.User.kind - description: One of AnyUser, NoneUser, objectRef#LocalUserObjGroup, objectRef#UserGroupObj, objectRef#UserObj + description: One of AnyUser, NoneUser, objectRef#LocalUserObjGroup, objectRef#UserGroupObj, objectRef#UserObj. type: String - contextPath: CiscoASA.Rules.User.value description: The user value. @@ -913,7 +913,7 @@ script: - contextPath: CiscoASA.Interface.Type description: The type of interface. type: String - dockerimage: demisto/python3:3.11.10.115186 + dockerimage: demisto/python3:3.11.10.116949 runonce: false script: '-' type: python diff --git a/Packs/CiscoASA/Integrations/CiscoASA/CiscoASA_test.py b/Packs/CiscoASA/Integrations/CiscoASA/CiscoASA_test.py index 3b781414bc01..67cea85126b6 100644 --- a/Packs/CiscoASA/Integrations/CiscoASA/CiscoASA_test.py +++ b/Packs/CiscoASA/Integrations/CiscoASA/CiscoASA_test.py @@ -109,8 +109,8 @@ def test_get_all_rules(requests_mock): command_results = list_rules_command(client, args) # Assert that the rules are exported as expected (in the outputs) - assert '1090940913' == command_results.outputs[0].get("ID") - assert '123456789' == command_results.outputs[1].get("ID") + assert command_results.outputs[0].get("ID") == '1090940913' + assert command_results.outputs[1].get("ID") == '123456789' empty_mock = { "selfLink": "https://example.com/api/access/out", @@ -145,7 +145,7 @@ def test_rule_by_id(requests_mock): command_results = rule_by_id_command(client, args) # Assert that the rule is exported as expected (in the outputs) - assert '123456789' == command_results.outputs[0].get("ID") + assert command_results.outputs[0].get("ID") == '123456789' def test_create_rule(requests_mock): @@ -176,7 +176,7 @@ def test_create_rule(requests_mock): def test_raw_to_rules(): from CiscoASA import raw_to_rules rules = raw_to_rules(MOCK_RULES_GLOBAL.get("items")) - assert RULES == rules + assert rules == RULES BASE_URL = 'https://example.com' @@ -211,7 +211,7 @@ def load_mock_response(file_name: str) -> str | io.TextIOWrapper: Returns: str: Mock file content. """ - with open(f'test_data/{file_name}', mode='r') as mock_file: + with open(f'test_data/{file_name}') as mock_file: return json.loads(mock_file.read()) diff --git a/Packs/CiscoASA/ReleaseNotes/1_1_12.md b/Packs/CiscoASA/ReleaseNotes/1_1_12.md new file mode 100644 index 000000000000..c0b4e3d54292 --- /dev/null +++ b/Packs/CiscoASA/ReleaseNotes/1_1_12.md @@ -0,0 +1,5 @@ +#### Integrations + +##### Cisco ASA +- Code functionality improvements. +- Updated the Docker image to: *demisto/python3:3.11.10.116949*. \ No newline at end of file diff --git a/Packs/CiscoASA/pack_metadata.json b/Packs/CiscoASA/pack_metadata.json index 469520897081..ee6e0de821a5 100644 --- a/Packs/CiscoASA/pack_metadata.json +++ b/Packs/CiscoASA/pack_metadata.json @@ -2,7 +2,7 @@ "name": "Cisco ASA", "description": "Cisco Adaptive Security Appliance Software is the core operating system for the Cisco ASA Family. It delivers enterprise-class firewall capabilities for ASA devices.", "support": "xsoar", - "currentVersion": "1.1.11", + "currentVersion": "1.1.12", "author": "Cortex XSOAR", "url": "https://www.paloaltonetworks.com/cortex", "email": "", diff --git a/Packs/CiscoSMA/Integrations/CiscoSMA/CiscoSMA.py b/Packs/CiscoSMA/Integrations/CiscoSMA/CiscoSMA.py index a27cb1adbf51..8e7ad14d852b 100644 --- a/Packs/CiscoSMA/Integrations/CiscoSMA/CiscoSMA.py +++ b/Packs/CiscoSMA/Integrations/CiscoSMA/CiscoSMA.py @@ -799,6 +799,10 @@ def pagination(request_command: Callable, args: Dict[str, Any], **kwargs) -> tup limit -= REQUEST_MAX_PULL offset += REQUEST_MAX_PULL pagination_message = f"Showing {len(output)} rows." if len(output) > 0 else None # type: ignore + else: + pagination_message = 'No pagination.' + output = [] + demisto.debug(f"No pagination params -> {pagination_message}") return output, pagination_message diff --git a/Packs/CiscoSMA/Integrations/CiscoSMA/CiscoSMA.yml b/Packs/CiscoSMA/Integrations/CiscoSMA/CiscoSMA.yml index 78f34374437e..5675328a145e 100644 --- a/Packs/CiscoSMA/Integrations/CiscoSMA/CiscoSMA.yml +++ b/Packs/CiscoSMA/Integrations/CiscoSMA/CiscoSMA.yml @@ -100,7 +100,7 @@ script: script: '' type: python subtype: python3 - dockerimage: demisto/python3:3.11.10.115186 + dockerimage: demisto/python3:3.11.10.116949 isfetch: true commands: - name: cisco-sma-spam-quarantine-message-search diff --git a/Packs/CiscoSMA/ReleaseNotes/1_1_32.md b/Packs/CiscoSMA/ReleaseNotes/1_1_32.md new file mode 100644 index 000000000000..959484b8cf49 --- /dev/null +++ b/Packs/CiscoSMA/ReleaseNotes/1_1_32.md @@ -0,0 +1,5 @@ +#### Integrations + +##### Cisco Security Management Appliance +- Code functionality improvements. +- Updated the Docker image to: *demisto/python3:3.11.10.116949*. \ No newline at end of file diff --git a/Packs/CiscoSMA/pack_metadata.json b/Packs/CiscoSMA/pack_metadata.json index 8f3bba556773..e645945ab454 100644 --- a/Packs/CiscoSMA/pack_metadata.json +++ b/Packs/CiscoSMA/pack_metadata.json @@ -2,7 +2,7 @@ "name": "CiscoSMA", "description": "The Security Management Appliance (SMA) is used to centralize services from Email Security Appliances (ESAs) and Web Security Appliances (WSAs).", "support": "xsoar", - "currentVersion": "1.1.31", + "currentVersion": "1.1.32", "author": "Cortex XSOAR", "url": "https://www.paloaltonetworks.com/cortex", "email": "", diff --git a/Packs/CommunityCommonDashboards/ReleaseNotes/2_0_9.md b/Packs/CommunityCommonDashboards/ReleaseNotes/2_0_9.md new file mode 100644 index 000000000000..6c09f099382e --- /dev/null +++ b/Packs/CommunityCommonDashboards/ReleaseNotes/2_0_9.md @@ -0,0 +1,4 @@ +#### Scripts + +##### XSOARValueMetrics +Code functionality improvements. \ No newline at end of file diff --git a/Packs/CommunityCommonDashboards/Scripts/XSOARValueMetrics/XSOARValueMetrics.py b/Packs/CommunityCommonDashboards/Scripts/XSOARValueMetrics/XSOARValueMetrics.py index 2e17ff1966ac..e2245fbd9e61 100644 --- a/Packs/CommunityCommonDashboards/Scripts/XSOARValueMetrics/XSOARValueMetrics.py +++ b/Packs/CommunityCommonDashboards/Scripts/XSOARValueMetrics/XSOARValueMetrics.py @@ -7,7 +7,6 @@ from datetime import datetime from calendar import monthrange from collections import defaultdict -from typing import Tuple MAXINC = 2000 XDEBUG = True @@ -71,13 +70,12 @@ def IncidentRecord(inc: dict, slatimers: list, windowstart: str, windowend: str, if timer in inc['CustomFields'] and inc['CustomFields'][timer]['runStatus'] == "ended": record[timer] = inc['CustomFields'][timer]['totalDuration'] - if windowstart != "" and windowend != "": - if windowstart in inc['CustomFields'] and windowend in inc['CustomFields']: - if inc['CustomFields'][windowstart]['runStatus'] == "ended" and \ - inc['CustomFields'][windowend]['runStatus'] == "ended": - winduration = ToDatetime(inc['CustomFields'][windowend]['endDate']) - \ - ToDatetime(inc['CustomFields'][windowstart]['startDate']) - record['UserWindow'] = winduration.total_seconds() + if (windowstart != "" and windowend != "" and windowstart in inc['CustomFields'] and windowend in inc['CustomFields'] + and inc['CustomFields'][windowstart]['runStatus'] == "ended" and + inc['CustomFields'][windowend]['runStatus'] == "ended"): + winduration = ToDatetime(inc['CustomFields'][windowend]['endDate']) - \ + ToDatetime(inc['CustomFields'][windowstart]['startDate']) + record['UserWindow'] = winduration.total_seconds() return record @@ -105,6 +103,7 @@ def BuildWindows(start_date_str, end_date_str): # Increment the window and store the first and last dates until reaching the end date while current_date <= end_date: # Get the first day of the current month + day = 1 # initializing the parameter if current_date != start_date: start = current_date else: @@ -228,12 +227,12 @@ def SlaMetrics(records: list, slatimers: list) -> str: def BuildCsv(key: str, data: dict) -> str: df = pd.DataFrame(data).fillna(0).astype(int) df[key] = df.index - df.set_index(key, inplace=True) + df = df.set_index(key) csv_data_string = df.to_csv() return csv_data_string -def SplitRecords(records: list) -> Tuple[list, list]: +def SplitRecords(records: list) -> tuple[list, list]: curyear = "" thisyear: list = [] lastyear: list = [] @@ -250,7 +249,7 @@ def SplitRecords(records: list) -> Tuple[list, list]: return lastyear, thisyear -def GenerateTables(startday: str, endday: str, records: list, slatimers: list) -> Tuple[str, dict, str, dict]: +def GenerateTables(startday: str, endday: str, records: list, slatimers: list) -> tuple[str, dict, str, dict]: json_met: dict = {} json_met2: dict = {} json_met['YEAR'] = startday.split("-")[0] @@ -348,10 +347,7 @@ def ProcessResponse(w, response, monthly, period, inccount, slatimers, windowsta def ValidArgs(args: dict) -> bool: array_args = ['status', 'notstatus', 'severity', 'owner', 'type'] - for key, value in args.items(): - if key not in array_args: - return False - return True + return all(key in array_args for key, value in args.items()) def ValidFilter(fil: list) -> bool: @@ -405,12 +401,10 @@ def CsvToJson(csv_text: str) -> dict: def RollYearList(thisyearlist: str, lastyearlist: str, curmetrics: dict): existing_metrics = LoadJsonList(thisyearlist) - if 'YEAR' in existing_metrics: - if existing_metrics['YEAR'] != curmetrics['YEAR']: - SaveJsonList(lastyearlist, existing_metrics) - existing_metrics = {} + if 'YEAR' in existing_metrics and existing_metrics['YEAR'] != curmetrics['YEAR']: + SaveJsonList(lastyearlist, existing_metrics) + existing_metrics = {} SaveJsonList(thisyearlist, existing_metrics) - return def UpdateMetricsList(listname: str, curmetrics: dict, mode: str): @@ -426,7 +420,6 @@ def UpdateMetricsList(listname: str, curmetrics: dict, mode: str): existing_metrics[key] = val SaveJsonList(listname, existing_metrics) - return def UpdateDict(existing_dict: dict, new_dict: dict, mode: str) -> dict: @@ -468,7 +461,6 @@ def SaveJsonList(list_name: str, json_data: dict): 'listName': list_name, 'listData': json.dumps(json_data) }) - return def NormalDate(date_str: str, first_day=True) -> str: @@ -489,6 +481,7 @@ def FoundIncidents(res: List): elif res[0]['Contents']['data'] is None: return False return True + return None def main(): @@ -556,7 +549,7 @@ def main(): curday = 0 break # On the first day of the 2 day window, step to the second day - else: + else: # noqa: RET508 curday = 1 XLOG += LogMessage(f"Total Found Incident Count {inccount}") diff --git a/Packs/CommunityCommonDashboards/pack_metadata.json b/Packs/CommunityCommonDashboards/pack_metadata.json index 2ab1107dcd56..659c594f4eb3 100644 --- a/Packs/CommunityCommonDashboards/pack_metadata.json +++ b/Packs/CommunityCommonDashboards/pack_metadata.json @@ -2,7 +2,7 @@ "name": "Community Common Dashboards", "description": "A pack that contains community dashboards", "support": "community", - "currentVersion": "2.0.8", + "currentVersion": "2.0.9", "author": "Randy Uhrlaub", "url": "", "email": "", diff --git a/Packs/ContentManagement/ReleaseNotes/1_2_27.md b/Packs/ContentManagement/ReleaseNotes/1_2_27.md new file mode 100644 index 000000000000..c0044eeb2fa3 --- /dev/null +++ b/Packs/ContentManagement/ReleaseNotes/1_2_27.md @@ -0,0 +1,4 @@ +#### Scripts +##### CommitFiles +- Code functionality improvements. +- Updated the Docker image to: *demisto/xsoar-tools:1.0.0.1895346*. \ No newline at end of file diff --git a/Packs/ContentManagement/Scripts/CommitFiles/CommitFiles.py b/Packs/ContentManagement/Scripts/CommitFiles/CommitFiles.py index cfca37f8bd7a..6f4078e544a0 100644 --- a/Packs/ContentManagement/Scripts/CommitFiles/CommitFiles.py +++ b/Packs/ContentManagement/Scripts/CommitFiles/CommitFiles.py @@ -241,6 +241,9 @@ def split_yml_file(content_file: ContentFile): # pragma: no cover script_extention = 'js' elif script_type == 'powershell': script_extention = 'ps1' + else: + script_extention = '' + demisto.debug(f"{script_type=} didn't match any condition. {script_extention=}") with redirect_stdout(output_capture), redirect_stderr(output_capture): yml_splitter.extract_to_package_format() diff --git a/Packs/ContentManagement/Scripts/CommitFiles/CommitFiles.yml b/Packs/ContentManagement/Scripts/CommitFiles/CommitFiles.yml index 52dbe03cb1fb..fe671710d4a2 100644 --- a/Packs/ContentManagement/Scripts/CommitFiles/CommitFiles.yml +++ b/Packs/ContentManagement/Scripts/CommitFiles/CommitFiles.yml @@ -31,7 +31,7 @@ commonfields: contentitemexportablefields: contentitemfields: fromServerVersion: '' -dockerimage: demisto/xsoar-tools:1.0.0.115559 +dockerimage: demisto/xsoar-tools:1.0.0.1895346 enabled: true name: CommitFiles outputs: diff --git a/Packs/ContentManagement/pack_metadata.json b/Packs/ContentManagement/pack_metadata.json index 7aca430b1d49..b7266e5bfaf4 100644 --- a/Packs/ContentManagement/pack_metadata.json +++ b/Packs/ContentManagement/pack_metadata.json @@ -2,7 +2,7 @@ "name": "XSOAR CI/CD", "description": "This pack enables you to orchestrate your XSOAR system configuration.", "support": "xsoar", - "currentVersion": "1.2.26", + "currentVersion": "1.2.27", "author": "Cortex XSOAR", "url": "https://www.paloaltonetworks.com/cortex", "email": "", diff --git a/Packs/ContentTesting/ReleaseNotes/2_1_7.md b/Packs/ContentTesting/ReleaseNotes/2_1_7.md new file mode 100644 index 000000000000..285e2f6e7c89 --- /dev/null +++ b/Packs/ContentTesting/ReleaseNotes/2_1_7.md @@ -0,0 +1,17 @@ +#### Scripts + +##### UnitTest +- Code functionality improvements. +- Updated the Docker image to: *demisto/python3:3.11.10.116949*. + +##### UnitTestPBAStats +- Code functionality improvements. +- Updated the Docker image to: *demisto/python3:3.11.10.116949*. + +##### UnitTestPBATaskAvg +- Code functionality improvements. +- Updated the Docker image to: *demisto/python3:3.11.10.116949*. + +##### UnitTestPBATaskMax +- Code functionality improvements. +- Updated the Docker image to: *demisto/python3:3.11.10.116949*. \ No newline at end of file diff --git a/Packs/ContentTesting/Scripts/UnitTest/UnitTest.py b/Packs/ContentTesting/Scripts/UnitTest/UnitTest.py index 2ace8d3b9fc1..e6b0174a1a07 100644 --- a/Packs/ContentTesting/Scripts/UnitTest/UnitTest.py +++ b/Packs/ContentTesting/Scripts/UnitTest/UnitTest.py @@ -222,6 +222,9 @@ def main(): if listName != "": listlines = demisto.executeCommand("getList", {'listName': listName})[0]['Contents'] buf = io.StringIO(listlines) + else: + buf = None + demisto.debug(f"{listName=} -> {buf=}") # Add the tasks to the playbook and execute it if testType == "Automation": diff --git a/Packs/ContentTesting/Scripts/UnitTest/UnitTest.yml b/Packs/ContentTesting/Scripts/UnitTest/UnitTest.yml index cc185ee726ec..fd46a26a467b 100644 --- a/Packs/ContentTesting/Scripts/UnitTest/UnitTest.yml +++ b/Packs/ContentTesting/Scripts/UnitTest/UnitTest.yml @@ -19,7 +19,7 @@ commonfields: contentitemexportablefields: contentitemfields: fromServerVersion: "" -dockerimage: demisto/python3:3.11.10.115186 +dockerimage: demisto/python3:3.11.10.116949 enabled: true name: UnitTest comment: "Provides for automated testing of automations, playbooks, and sub-playbooks." diff --git a/Packs/ContentTesting/Scripts/UnitTestPBAStats/UnitTestPBAStats.py b/Packs/ContentTesting/Scripts/UnitTestPBAStats/UnitTestPBAStats.py index f917607dc0e6..9f6d59a2e323 100644 --- a/Packs/ContentTesting/Scripts/UnitTestPBAStats/UnitTestPBAStats.py +++ b/Packs/ContentTesting/Scripts/UnitTestPBAStats/UnitTestPBAStats.py @@ -43,6 +43,9 @@ def NewWidgetStatGroup(name: str, data: list) -> dict: def NewWidget(format: str, layout: str, wstat: list) -> dict: if format in FORMATS and layout in LAYOUTS: widget = {'Type': 17, 'ContentsFormat': format, 'Contents': {'stats': wstat, 'params': {'layout': layout}}} + else: + widget = {} + demisto.debug(f"{format=} and {layout=} don't match any condition. {widget=}") return widget @@ -55,7 +58,7 @@ def main(): if len(stats) == 0: return wstats: list = [] - for key, val in stats.items(): + for _key, val in stats.items(): tw = TaskWidget(val) wstats = TaskWidgetGroup(wstats, val['name'], tw) widget = NewWidget("bar", "vertical", wstats) diff --git a/Packs/ContentTesting/Scripts/UnitTestPBAStats/UnitTestPBAStats.yml b/Packs/ContentTesting/Scripts/UnitTestPBAStats/UnitTestPBAStats.yml index d645124eff5f..57999d45162f 100644 --- a/Packs/ContentTesting/Scripts/UnitTestPBAStats/UnitTestPBAStats.yml +++ b/Packs/ContentTesting/Scripts/UnitTestPBAStats/UnitTestPBAStats.yml @@ -5,7 +5,7 @@ contentitemexportablefields: contentitemfields: fromServerVersion: "" comment: Playbook statistics. -dockerimage: demisto/python3:3.11.10.116439 +dockerimage: demisto/python3:3.11.10.116949 enabled: true name: UnitTestPBAStats runas: DBotWeakRole diff --git a/Packs/ContentTesting/Scripts/UnitTestPBATaskAvg/UnitTestPBATaskAvg.py b/Packs/ContentTesting/Scripts/UnitTestPBATaskAvg/UnitTestPBATaskAvg.py index 92bc28238840..00c4449a7a90 100644 --- a/Packs/ContentTesting/Scripts/UnitTestPBATaskAvg/UnitTestPBATaskAvg.py +++ b/Packs/ContentTesting/Scripts/UnitTestPBATaskAvg/UnitTestPBATaskAvg.py @@ -23,6 +23,9 @@ def NewWidgetStat(name: str, color: str, label: str, data: list) -> dict: def NewWidget(formatt: str, layout: str, wstat: list) -> dict: if formatt in FORMATS and layout in LAYOUTS: widget = {'Type': 17, 'ContentsFormat': formatt, 'Contents': {'stats': wstat, 'params': {'layout': layout}}} + else: + widget = {} + demisto.debug(f"{format=} and {layout=} don't match any condition. {widget=}") return widget @@ -37,7 +40,7 @@ def main(): wstats: list = [] length = len(COLORS) i = length - for key, val in stats.items(): + for _key, val in stats.items(): if val[STATFIELD] == 0: continue newstat = NewWidgetStat("", COLORS[i % length], val['name'], val[STATFIELD]) diff --git a/Packs/ContentTesting/Scripts/UnitTestPBATaskAvg/UnitTestPBATaskAvg.yml b/Packs/ContentTesting/Scripts/UnitTestPBATaskAvg/UnitTestPBATaskAvg.yml index 8ac68c00b3e0..3409ea21e85a 100644 --- a/Packs/ContentTesting/Scripts/UnitTestPBATaskAvg/UnitTestPBATaskAvg.yml +++ b/Packs/ContentTesting/Scripts/UnitTestPBATaskAvg/UnitTestPBATaskAvg.yml @@ -4,7 +4,7 @@ commonfields: contentitemexportablefields: contentitemfields: fromServerVersion: "" -dockerimage: demisto/python3:3.11.10.116439 +dockerimage: demisto/python3:3.11.10.116949 enabled: true name: UnitTestPBATaskAvg comment: '' diff --git a/Packs/ContentTesting/Scripts/UnitTestPBATaskMax/UnitTestPBATaskMax.py b/Packs/ContentTesting/Scripts/UnitTestPBATaskMax/UnitTestPBATaskMax.py index 6497327a5831..d9ff9267242b 100644 --- a/Packs/ContentTesting/Scripts/UnitTestPBATaskMax/UnitTestPBATaskMax.py +++ b/Packs/ContentTesting/Scripts/UnitTestPBATaskMax/UnitTestPBATaskMax.py @@ -24,6 +24,9 @@ def NewWidgetStat(name: str, color: str, label: str, data: list) -> dict: def NewWidget(formatt: str, layout: str, wstat: list) -> dict: if formatt in FORMATS and layout in LAYOUTS: widget = {'Type': 17, 'ContentsFormat': formatt, 'Contents': {'stats': wstat, 'params': {'layout': layout}}} + else: + widget = {} + demisto.debug(f"{format=} and {layout=} don't match any condition. {widget=}") return widget @@ -38,7 +41,7 @@ def main(): wstats: list = [] length = len(COLORS) i = length - for key, val in stats.items(): + for _key, val in stats.items(): if val[STATFIELD] == 0: continue newstat = NewWidgetStat("", COLORS[i % length], val['name'], val[STATFIELD]) diff --git a/Packs/ContentTesting/Scripts/UnitTestPBATaskMax/UnitTestPBATaskMax.yml b/Packs/ContentTesting/Scripts/UnitTestPBATaskMax/UnitTestPBATaskMax.yml index 42ec9d9f96bd..0f15c629bf3c 100644 --- a/Packs/ContentTesting/Scripts/UnitTestPBATaskMax/UnitTestPBATaskMax.yml +++ b/Packs/ContentTesting/Scripts/UnitTestPBATaskMax/UnitTestPBATaskMax.yml @@ -5,7 +5,7 @@ contentitemexportablefields: contentitemfields: fromServerVersion: "" comment: '' -dockerimage: demisto/python3:3.11.10.116439 +dockerimage: demisto/python3:3.11.10.116949 enabled: true name: UnitTestPBATaskMax runas: DBotWeakRole diff --git a/Packs/ContentTesting/pack_metadata.json b/Packs/ContentTesting/pack_metadata.json index 04422b872548..73d7c81ba29f 100644 --- a/Packs/ContentTesting/pack_metadata.json +++ b/Packs/ContentTesting/pack_metadata.json @@ -2,7 +2,7 @@ "name": "Content Testing", "description": "Supports assessment of upgraded Marketplace content packs against custom content and enables content testing within XSOAR. Dynamically select and test automations, playbooks, and sub-playbooks as required prior to push to production. Create a \"UnitTesting\" incident type and review the \"Help\" tab in the layout for description of the tools available and the examples using the testing tools.", "support": "community", - "currentVersion": "2.1.6", + "currentVersion": "2.1.7", "author": "rurhrlaub", "url": "", "email": "", diff --git a/Packs/CortexAttackSurfaceManagement/ReleaseNotes/1_7_64.md b/Packs/CortexAttackSurfaceManagement/ReleaseNotes/1_7_64.md new file mode 100644 index 000000000000..05a882daa4fe --- /dev/null +++ b/Packs/CortexAttackSurfaceManagement/ReleaseNotes/1_7_64.md @@ -0,0 +1,5 @@ +#### Scripts + +##### GenerateASMReport +- Code functionality improvements. +- Updated the Docker image to: *demisto/python3:3.11.10.116949*. \ No newline at end of file diff --git a/Packs/CortexAttackSurfaceManagement/Scripts/GenerateASMReport/GenerateASMReport.py b/Packs/CortexAttackSurfaceManagement/Scripts/GenerateASMReport/GenerateASMReport.py index 5d3f12251e27..18039e4e34a7 100644 --- a/Packs/CortexAttackSurfaceManagement/Scripts/GenerateASMReport/GenerateASMReport.py +++ b/Packs/CortexAttackSurfaceManagement/Scripts/GenerateASMReport/GenerateASMReport.py @@ -628,6 +628,11 @@ def build_template(args: dict[str, Any]) -> list[dict[str, Any]]: placeholder = 15 optional_order = ["asm_service_owner", "asm_private_ip", "asm_cloud", "asm_tags", "asm_system_ids"] + else: + placeholder = 0 + optional_order = [] + template = [] + demisto.debug(f"No condition was met -> {placeholder=} {optional_order=} {template=}") optional_template = optional_report_fields(placeholder, optional_order, args) template.extend(optional_template) diff --git a/Packs/CortexAttackSurfaceManagement/Scripts/GenerateASMReport/GenerateASMReport.yml b/Packs/CortexAttackSurfaceManagement/Scripts/GenerateASMReport/GenerateASMReport.yml index 3c5e29422c3a..485a8dc80f1d 100644 --- a/Packs/CortexAttackSurfaceManagement/Scripts/GenerateASMReport/GenerateASMReport.yml +++ b/Packs/CortexAttackSurfaceManagement/Scripts/GenerateASMReport/GenerateASMReport.yml @@ -58,7 +58,7 @@ comment: Generate an ASM Alert Summary report. commonfields: id: GenerateASMReport version: -1 -dockerimage: demisto/python3:3.11.10.116439 +dockerimage: demisto/python3:3.11.10.116949 enabled: true name: GenerateASMReport runas: DBotWeakRole diff --git a/Packs/CortexAttackSurfaceManagement/pack_metadata.json b/Packs/CortexAttackSurfaceManagement/pack_metadata.json index 1dc5444c3898..f45e9157eea8 100644 --- a/Packs/CortexAttackSurfaceManagement/pack_metadata.json +++ b/Packs/CortexAttackSurfaceManagement/pack_metadata.json @@ -2,7 +2,7 @@ "name": "Cortex Attack Surface Management", "description": "Content for working with Attack Surface Management (ASM).", "support": "xsoar", - "currentVersion": "1.7.63", + "currentVersion": "1.7.64", "author": "Cortex XSOAR", "url": "https://www.paloaltonetworks.com/cortex", "email": "", diff --git a/Packs/CovalenceManagedSecurity/Integrations/CovalenceManagedSecurity/CovalenceManagedSecurity.py b/Packs/CovalenceManagedSecurity/Integrations/CovalenceManagedSecurity/CovalenceManagedSecurity.py index 1e4f477e1560..58ab70c7c2fa 100644 --- a/Packs/CovalenceManagedSecurity/Integrations/CovalenceManagedSecurity/CovalenceManagedSecurity.py +++ b/Packs/CovalenceManagedSecurity/Integrations/CovalenceManagedSecurity/CovalenceManagedSecurity.py @@ -544,6 +544,9 @@ def main(): # Initialize Broker client only if required, allowing the Portal commands to still function if the Broker # connection is down or unwanted. broker_instance = BrokerClient(host=broker_url, api_key=API_KEY) + else: + demisto.debug("No condition was met. Initializing BrokerClient") + broker_instance = BrokerClient(host=broker_url, api_key=API_KEY) try: if command == 'test-module': diff --git a/Packs/CovalenceManagedSecurity/Integrations/CovalenceManagedSecurity/CovalenceManagedSecurity.yml b/Packs/CovalenceManagedSecurity/Integrations/CovalenceManagedSecurity/CovalenceManagedSecurity.yml index d0b5372cf00b..a1c8c6b16254 100644 --- a/Packs/CovalenceManagedSecurity/Integrations/CovalenceManagedSecurity/CovalenceManagedSecurity.yml +++ b/Packs/CovalenceManagedSecurity/Integrations/CovalenceManagedSecurity/CovalenceManagedSecurity.yml @@ -503,7 +503,7 @@ script: - contextPath: FESBroker.result description: Result. type: String - dockerimage: demisto/python3:3.11.10.115186 + dockerimage: demisto/python3:3.11.10.116949 isfetch: true runonce: false script: '' diff --git a/Packs/CovalenceManagedSecurity/ReleaseNotes/1_3_2.md b/Packs/CovalenceManagedSecurity/ReleaseNotes/1_3_2.md new file mode 100644 index 000000000000..e471d79c739e --- /dev/null +++ b/Packs/CovalenceManagedSecurity/ReleaseNotes/1_3_2.md @@ -0,0 +1,5 @@ +#### Integrations + +##### Covalence Managed Security +- Code functionality improvements. +- Updated the Docker image to: *demisto/python3:3.11.10.116949*. \ No newline at end of file diff --git a/Packs/CovalenceManagedSecurity/pack_metadata.json b/Packs/CovalenceManagedSecurity/pack_metadata.json index e56bbed6eb75..05a3b81da553 100644 --- a/Packs/CovalenceManagedSecurity/pack_metadata.json +++ b/Packs/CovalenceManagedSecurity/pack_metadata.json @@ -2,7 +2,7 @@ "name": "Covalence Managed Security", "description": "Triggers by triaged alerts from endpoint, cloud, and network security monitoring. Contains event details and easy-to-follow mitigation steps.", "support": "partner", - "currentVersion": "1.3.1", + "currentVersion": "1.3.2", "author": "Field Effect Security", "url": "https://fieldeffect.com/products/covalence-cyber-security/", "email": "support@fieldeffect.com", diff --git a/Packs/CybleThreatIntel/Integrations/CybleThreatIntel/CybleThreatIntel.py b/Packs/CybleThreatIntel/Integrations/CybleThreatIntel/CybleThreatIntel.py index b9b91dc8f91d..4aa2c75fab0f 100644 --- a/Packs/CybleThreatIntel/Integrations/CybleThreatIntel/CybleThreatIntel.py +++ b/Packs/CybleThreatIntel/Integrations/CybleThreatIntel/CybleThreatIntel.py @@ -292,6 +292,9 @@ def fetch_indicators(client: Client): last_run = demisto.getLastRun() if isinstance(last_run, dict): last_fetch_time = last_run.get(f'lastRun_{client.collection_name}', None) + else: + last_fetch_time = '' + demisto.debug(f"{last_run=} isn't of type dict. {last_fetch_time=}") if last_fetch_time: args['begin'] = str(parser.parse(last_fetch_time).replace(tzinfo=pytz.UTC)) @@ -325,18 +328,16 @@ def validate_input(args: Dict[str, Any]): raise ValueError(f"Limit should be positive, limit: {args.get('limit')}") try: - if args.get('begin', None): - _start_date = parser.parse(args.get('begin', '')).replace(tzinfo=pytz.UTC) - if args.get('end', None): - _end_date = parser.parse(args.get('end', '')).replace(tzinfo=pytz.UTC) + _start_date = parser.parse(args.get('begin', '')).replace(tzinfo=pytz.UTC) if args.get('begin', None) else None + _end_date = parser.parse(args.get('end', '')).replace(tzinfo=pytz.UTC) if args.get('end', None) else None except Exception as e: raise ValueError(f"Invalid date format received, [{e}]") - if args.get('begin', None) and _start_date > datetime.now(timezone.utc): + if _start_date and _start_date > datetime.now(timezone.utc): raise ValueError("Start date must be a date before or equal to current") - if args.get('end', None) and _end_date > datetime.now(timezone.utc): + if _end_date and _end_date > datetime.now(timezone.utc): raise ValueError("End date must be a date before or equal to current") - if args.get('begin', None) and args.get('end', None) and _start_date > _end_date: + if _start_date and _end_date and _start_date > _end_date: raise ValueError("Start date cannot be after end date") if not args.get('collection', False): diff --git a/Packs/CybleThreatIntel/Integrations/CybleThreatIntel/CybleThreatIntel.yml b/Packs/CybleThreatIntel/Integrations/CybleThreatIntel/CybleThreatIntel.yml index 2d931526302e..3074790b859e 100644 --- a/Packs/CybleThreatIntel/Integrations/CybleThreatIntel/CybleThreatIntel.yml +++ b/Packs/CybleThreatIntel/Integrations/CybleThreatIntel/CybleThreatIntel.yml @@ -136,7 +136,7 @@ script: - contextPath: CybleIntel.collection.names description: Available collection names for the feed service. description: Get the data feed collection names for the taxii feed. - dockerimage: demisto/taxii-server:1.0.0.117317 + dockerimage: demisto/taxii-server:1.0.0.1860835 subtype: python3 feed: true fromversion: 6.2.0 diff --git a/Packs/CybleThreatIntel/ReleaseNotes/2_0_25.md b/Packs/CybleThreatIntel/ReleaseNotes/2_0_25.md new file mode 100644 index 000000000000..3010a451008b --- /dev/null +++ b/Packs/CybleThreatIntel/ReleaseNotes/2_0_25.md @@ -0,0 +1,4 @@ +#### Integrations +##### Cyble Threat Intel +- Code functionality improvements. +- Updated the Docker image to: *demisto/taxii-server:1.0.0.1860835*. \ No newline at end of file diff --git a/Packs/CybleThreatIntel/pack_metadata.json b/Packs/CybleThreatIntel/pack_metadata.json index 0974bf04d29a..84d491d6fb0e 100644 --- a/Packs/CybleThreatIntel/pack_metadata.json +++ b/Packs/CybleThreatIntel/pack_metadata.json @@ -2,7 +2,7 @@ "name": "Cyble Threat Intel", "description": "Cyble Threat Intelligence for Vision Users. Must have access to Vision Taxii feed to access the threat intelligence.", "support": "partner", - "currentVersion": "2.0.24", + "currentVersion": "2.0.25", "author": "Cyble Infosec", "url": "https://cyble.com", "email": "", diff --git a/Packs/Cylance_Protect/Integrations/Cylance_Protect_v2/Cylance_Protect_v2.py b/Packs/Cylance_Protect/Integrations/Cylance_Protect_v2/Cylance_Protect_v2.py index 023ef5da8aa3..1c3b0d25a598 100644 --- a/Packs/Cylance_Protect/Integrations/Cylance_Protect_v2/Cylance_Protect_v2.py +++ b/Packs/Cylance_Protect/Integrations/Cylance_Protect_v2/Cylance_Protect_v2.py @@ -89,12 +89,12 @@ def api_call(uri, method='post', headers={}, body={}, params={}, accept_404=Fals 'Authorization': 'Bearer ' + access_token } - url = '{}/{}'.format(SERVER_URL, uri) + url = f'{SERVER_URL}/{uri}' res = requests.request(method, url, headers=headers, data=json.dumps(body), params=params, verify=USE_SSL) if res.status_code < 200 or res.status_code >= 300: if res.status_code == 409 and str(res.content).find('already an entry for this threat') != -1: raise Warning(res.content) - if not res.status_code == 404 and not accept_404: + if res.status_code != 404 and not accept_404: return_error( 'Got status code ' + str(res.status_code) + ' with body ' + str(res.content) + ' with headers ' + str( res.headers)) @@ -313,7 +313,7 @@ def get_device(): def get_device_request(device_id): # pragma: no cover access_token = get_authentication_token(scope=SCOPE_DEVICE_READ) - uri = '{}/{}'.format(URI_DEVICES, device_id) + uri = f'{URI_DEVICES}/{device_id}' res = api_call(uri=uri, method='get', access_token=access_token) return res @@ -387,7 +387,7 @@ def get_hostname_request(hostname): # pragma: no cover access_token = get_authentication_token(scope=SCOPE_DEVICE_READ) - uri = '{}/{}'.format(URI_HOSTNAME, hostname) + uri = f'{URI_HOSTNAME}/{hostname}' res = api_call(uri=uri, method='get', access_token=access_token) if not res: return None @@ -447,7 +447,7 @@ def update_device_request(device_id, name=None, policy_id=None, add_zones=None, if not body: raise Exception('No changes detected') - uri = '{}/{}'.format(URI_DEVICES, device_id) + uri = f'{URI_DEVICES}/{device_id}' res = api_call(uri=uri, method='put', access_token=access_token, body=body) return res @@ -471,7 +471,7 @@ def get_device_threats(): if device_threats: dbot_score_dict = {Common.DBotScore.get_context_path(): []} # type: Dict[str, List[Dict[str, str]]] for dbot_score_entry in dbot_score_array: - for key, value in list(dbot_score_entry.items()): + for _key, value in list(dbot_score_entry.items()): dbot_score_dict[Common.DBotScore.get_context_path()].append(value) threats_context = createContext(data=device_threats, keyTransform=underscoreToCamelCase) @@ -500,7 +500,7 @@ def get_device_threats_request(device_id, page=None, page_size=None): # pragma: params['page'] = page if page_size: params['page_size'] = page_size - uri = '{}/{}/threats'.format(URI_DEVICES, device_id) + uri = f'{URI_DEVICES}/{device_id}/threats' res = api_call(uri=uri, method='get', access_token=access_token, params=params) return res @@ -629,7 +629,7 @@ def get_zone(): def get_zone_request(zone_id): # pragma: no cover access_token = get_authentication_token(scope=SCOPE_ZONE_READ) - uri = '{}/{}'.format(URI_ZONES, zone_id) + uri = f'{URI_ZONES}/{zone_id}' res = api_call(uri=uri, method='get', access_token=access_token) return res @@ -678,7 +678,7 @@ def update_zone_request(zone_id, name, policy_id, criticality): # pragma: no co if not body: raise Exception('No changes detected') - uri = '{}/{}'.format(URI_ZONES, zone_id) + uri = f'{URI_ZONES}/{zone_id}' res = api_call(uri=uri, method='put', access_token=access_token, body=body) return res @@ -715,7 +715,7 @@ def get_threat(): def get_threat_request(sha256): # pragma: no cover access_token = get_authentication_token(scope=SCOPE_THREAT_READ) - uri = '{}/{}'.format(URI_THREATS, sha256) + uri = f'{URI_THREATS}/{sha256}' res = api_call(uri=uri, method='get', access_token=access_token, body={}, params={}, accept_404=False) return res @@ -746,7 +746,7 @@ def get_threats(): dbot_score_dict = {Common.DBotScore.get_context_path(): []} # type: Dict[str, List[Dict[str, str]]] for dbot_score_entry in dbot_score_array: - for key, value in list(dbot_score_entry.items()): + for _key, value in list(dbot_score_entry.items()): dbot_score_dict[Common.DBotScore.get_context_path()].append(value) context_threat = createContext(data=threats, keyTransform=underscoreToCamelCase, removeNull=True) @@ -855,7 +855,7 @@ def get_threat_devices_request(threat_hash, page=None, page_size=None): # pragm if page_size: params['page_size'] = page_size - uri = '{}/{}/devices'.format(URI_THREATS, threat_hash) + uri = f'{URI_THREATS}/{threat_hash}/devices' res = api_call(uri=uri, method='get', access_token=access_token, params=params) return res @@ -877,7 +877,7 @@ def get_list(): if lst: dbot_score_dict = {Common.DBotScore.get_context_path(): []} # type: Dict[str, List[Dict[str, str]]] for dbot_score_entry in dbot_score_array: - for key, value in list(dbot_score_entry.items()): + for _key, value in list(dbot_score_entry.items()): dbot_score_dict[Common.DBotScore.get_context_path()].append(value) context_list = createContext(data=lst, keyTransform=underscoreToCamelCase, removeNull=True) @@ -950,8 +950,10 @@ def get_list_entry_by_hash(sha256=None, list_type_id=None): removeNull=True), 'EntryContext': ec }) + return None else: demisto.results("Hash not found") + return None else: return found_hash @@ -980,7 +982,7 @@ def update_device_threats_request(device_id, threat_id, event): # pragma: no co 'event': event } - uri = '{}/{}/threats'.format(URI_DEVICES, device_id) + uri = f'{URI_DEVICES}/{device_id}/threats' res = api_call(uri=uri, method='post', access_token=access_token, body=body) return res @@ -1342,7 +1344,7 @@ def get_policy_details(): def get_policy_details_request(policy_id): # pragma: no cover access_token = get_authentication_token(scope=SCOPE_POLICY_READ) - uri = '{}/{}'.format(URI_POLICIES, policy_id) + uri = f'{URI_POLICIES}/{policy_id}' res = api_call(uri=uri, method='get', access_token=access_token) return res @@ -1385,6 +1387,7 @@ def create_instaquery(): if artifact in match_value_type: value_type = re.findall(r'(?<=\.).*', match_value_type)[0] # Remove the artifact prefix else: + value_type = [] demisto.error('The value type is not suitable with the selected artifact') # Create request diff --git a/Packs/Cylance_Protect/Integrations/Cylance_Protect_v2/Cylance_Protect_v2.yml b/Packs/Cylance_Protect/Integrations/Cylance_Protect_v2/Cylance_Protect_v2.yml index 10f27558f74a..690b82bbb4f9 100644 --- a/Packs/Cylance_Protect/Integrations/Cylance_Protect_v2/Cylance_Protect_v2.yml +++ b/Packs/Cylance_Protect/Integrations/Cylance_Protect_v2/Cylance_Protect_v2.yml @@ -968,7 +968,7 @@ script: - contextPath: InstaQuery.List description: The list of InstaQuery. type: string - dockerimage: demisto/auth-utils:1.0.0.116752 + dockerimage: demisto/auth-utils:1.0.0.1839651 isfetch: true script: '' subtype: python3 diff --git a/Packs/Cylance_Protect/Integrations/Cylance_Protect_v2/Cylance_Protect_v2_test.py b/Packs/Cylance_Protect/Integrations/Cylance_Protect_v2/Cylance_Protect_v2_test.py index 8fa7e41529e3..8b45edf34ec6 100644 --- a/Packs/Cylance_Protect/Integrations/Cylance_Protect_v2/Cylance_Protect_v2_test.py +++ b/Packs/Cylance_Protect/Integrations/Cylance_Protect_v2/Cylance_Protect_v2_test.py @@ -340,10 +340,8 @@ def test_get_device(mocker): get_device() contents = demisto_results.call_args[0][0] - assert sorted(list(EXPECTED_DEVICE.items())) == sorted( - list( - contents.get('EntryContext').get('CylanceProtect.Device(val.ID && val.ID === obj.ID)').items() - ) + assert sorted(EXPECTED_DEVICE.items()) == sorted( + contents.get('EntryContext').get('CylanceProtect.Device(val.ID && val.ID === obj.ID)').items() ) @@ -363,8 +361,8 @@ def test_get_device_by_hostname(mocker): get_device_by_hostname() contents = demisto_results.call_args[0][0] - assert sorted(list(EXPECTED_HOSTNAME.items())) == sorted( - list(contents.get('EntryContext').get('CylanceProtect.Device(val.ID && val.ID === ' 'obj.ID)').items())) + assert sorted(EXPECTED_HOSTNAME.items()) == sorted( + contents.get('EntryContext').get('CylanceProtect.Device(val.ID && val.ID === ' 'obj.ID)').items()) # noqa: ISC001 def test_update_device(mocker): @@ -410,8 +408,8 @@ def test_get_device_threats(mocker): get_device_threats() contents = demisto_results.call_args[0][0] - assert '0F427B33B824110427B2BA7BE20740B45EA4DA41BC1416DD55771EDFB0C18F09' == \ - contents.get('EntryContext').get('File')[0].get('SHA256') + assert contents.get('EntryContext').get('File')[0].get('SHA256') == \ + '0F427B33B824110427B2BA7BE20740B45EA4DA41BC1416DD55771EDFB0C18F09' def test_get_policies(mocker): @@ -431,10 +429,8 @@ def test_get_policies(mocker): get_policies() contents = demisto_results.call_args[0][0] - assert sorted(list(EXPECTED_POLICIES.items())) == sorted( - list( - contents.get('EntryContext').get('CylanceProtect.Policies(val.id && val.id === obj.id)')[0].items() - ) + assert sorted(EXPECTED_POLICIES.items()) == sorted( + contents.get('EntryContext').get('CylanceProtect.Policies(val.id && val.id === obj.id)')[0].items() ) @@ -477,8 +473,8 @@ def test_get_zones(mocker): get_zones() contents = demisto_results.call_args[0][0] - assert sorted(list(EXPECTED_ZONES.items())) == \ - sorted(list(contents.get('EntryContext').get('CylanceProtect.Zones(val.Id && val.Id === obj.Id)')[0].items())) + assert sorted(EXPECTED_ZONES.items()) == \ + sorted(contents.get('EntryContext').get('CylanceProtect.Zones(val.Id && val.Id === obj.Id)')[0].items()) def test_get_zone(mocker): @@ -498,10 +494,8 @@ def test_get_zone(mocker): get_zone() contents = demisto_results.call_args[0][0] - assert sorted(list(EXPECTED_ZONES.items())) == sorted( - list( - contents.get('EntryContext').get('CylanceProtect.Zones(val.Id && val.Id === obj.Id)').items() - ) + assert sorted(EXPECTED_ZONES.items()) == sorted( + contents.get('EntryContext').get('CylanceProtect.Zones(val.Id && val.Id === obj.Id)').items() ) @@ -546,8 +540,8 @@ def test_get_threat(mocker): get_threat() contents = demisto_results.call_args[0][0] - assert '055D7A25DECF6769BF4FB2F3BC9FD3159C8B42972818177E44975929D97292DE' == \ - contents.get('EntryContext').get('File')[0].get('SHA256') + assert contents.get('EntryContext').get('File')[0].get('SHA256') == \ + '055D7A25DECF6769BF4FB2F3BC9FD3159C8B42972818177E44975929D97292DE' def test_get_threats(mocker): @@ -567,8 +561,8 @@ def test_get_threats(mocker): get_threats() contents = demisto_results.call_args[0][0] - assert '055D7A25DECF6769BF4FB2F3BC9FD3159C8B42972818177E44975929D97292DE' == contents.get('EntryContext').get( - 'File')[0].get('SHA256') + assert contents.get('EntryContext').get( + 'File')[0].get('SHA256') == '055D7A25DECF6769BF4FB2F3BC9FD3159C8B42972818177E44975929D97292DE' def test_get_threat_devices(mocker): @@ -591,9 +585,8 @@ def test_get_threat_devices(mocker): get_threat_devices() contents = demisto_results.call_args[0][0] - assert sorted(list(EXPECTED_THREAT_DEVICES.items())) == sorted( - list(contents.get('EntryContext').get('File').items()) - ) + assert sorted(EXPECTED_THREAT_DEVICES.items()) == sorted( + contents.get('EntryContext').get('File').items()) def test_get_list(mocker): @@ -616,7 +609,7 @@ def test_get_list(mocker): get_list() contents = demisto_results.call_args[0][0] - assert EXPECTED_LIST == contents.get('EntryContext').get('File')[0] + assert contents.get('EntryContext').get('File')[0] == EXPECTED_LIST def test_get_list_entry_by_hash(mocker): diff --git a/Packs/Cylance_Protect/ReleaseNotes/1_1_39.md b/Packs/Cylance_Protect/ReleaseNotes/1_1_39.md new file mode 100644 index 000000000000..c036325857c8 --- /dev/null +++ b/Packs/Cylance_Protect/ReleaseNotes/1_1_39.md @@ -0,0 +1,5 @@ +#### Integrations + +##### Cylance Protect v2 +- Code functionality improvements. +- Updated the Docker image to: *demisto/auth-utils:1.0.0.1839651*. \ No newline at end of file diff --git a/Packs/Cylance_Protect/pack_metadata.json b/Packs/Cylance_Protect/pack_metadata.json index 646404d3c58b..a8e5d6d3539c 100644 --- a/Packs/Cylance_Protect/pack_metadata.json +++ b/Packs/Cylance_Protect/pack_metadata.json @@ -2,7 +2,7 @@ "name": "Cylance Protect", "description": "Manage Endpoints using Cylance protect", "support": "xsoar", - "currentVersion": "1.1.38", + "currentVersion": "1.1.39", "author": "Cortex XSOAR", "url": "https://www.paloaltonetworks.com/cortex", "email": "",