From 36eb3c942ef68836505a25d1f09e4b865d6de61e Mon Sep 17 00:00:00 2001 From: RotemAmit Date: Thu, 9 Jan 2025 16:12:11 +0200 Subject: [PATCH] Fix Pylint errors in C packs (#38048) * c packs pylint * fix rn * pack version --- .../CIRCLEHashlookup/CIRCLEHashlookup.py | 3 + .../CIRCLEHashlookup/CIRCLEHashlookup.yml | 2 +- Packs/CIRCLHashlookup/ReleaseNotes/1_0_7.md | 6 + Packs/CIRCLHashlookup/pack_metadata.json | 2 +- .../CSCDomainManager/CSCDomainManager.py | 1 + .../CSCDomainManager/CSCDomainManager.yml | 2 +- .../Integrations/CSCDomainManager/README.md | 86 +++++++++++++ Packs/CSCDomainManager/ReleaseNotes/1_0_5.md | 5 + Packs/CSCDomainManager/pack_metadata.json | 2 +- Packs/Campaign/ReleaseNotes/3_4_14.md | 4 + .../FindEmailCampaign/FindEmailCampaign.py | 4 +- .../FindEmailCampaign/FindEmailCampaign.yml | 2 +- Packs/Campaign/pack_metadata.json | 2 +- .../CentrifyVault/CentrifyVault.py | 1 + .../CentrifyVault/CentrifyVault.yml | 120 +++++++++--------- Packs/CentrifyVault/ReleaseNotes/1_0_10.md | 5 + Packs/CentrifyVault/pack_metadata.json | 2 +- .../CheckPointFirewallV2.py | 6 +- .../CheckPointFirewallV2.yml | 18 +-- .../CheckpointFirewall/ReleaseNotes/2_3_25.md | 5 + Packs/CheckpointFirewall/pack_metadata.json | 2 +- .../Integrations/CiscoASA/CiscoASA.py | 15 ++- .../Integrations/CiscoASA/CiscoASA.yml | 28 ++-- .../Integrations/CiscoASA/CiscoASA_test.py | 10 +- Packs/CiscoASA/ReleaseNotes/1_1_12.md | 5 + Packs/CiscoASA/pack_metadata.json | 2 +- .../Integrations/CiscoSMA/CiscoSMA.py | 4 + .../Integrations/CiscoSMA/CiscoSMA.yml | 2 +- Packs/CiscoSMA/ReleaseNotes/1_1_32.md | 5 + Packs/CiscoSMA/pack_metadata.json | 2 +- .../ReleaseNotes/2_0_9.md | 4 + .../XSOARValueMetrics/XSOARValueMetrics.py | 39 +++--- .../pack_metadata.json | 2 +- .../ContentManagement/ReleaseNotes/1_2_27.md | 4 + .../Scripts/CommitFiles/CommitFiles.py | 3 + .../Scripts/CommitFiles/CommitFiles.yml | 2 +- Packs/ContentManagement/pack_metadata.json | 2 +- Packs/ContentTesting/ReleaseNotes/2_1_7.md | 17 +++ .../Scripts/UnitTest/UnitTest.py | 3 + .../Scripts/UnitTest/UnitTest.yml | 2 +- .../UnitTestPBAStats/UnitTestPBAStats.py | 5 +- .../UnitTestPBAStats/UnitTestPBAStats.yml | 2 +- .../UnitTestPBATaskAvg/UnitTestPBATaskAvg.py | 5 +- .../UnitTestPBATaskAvg/UnitTestPBATaskAvg.yml | 2 +- .../UnitTestPBATaskMax/UnitTestPBATaskMax.py | 5 +- .../UnitTestPBATaskMax/UnitTestPBATaskMax.yml | 2 +- Packs/ContentTesting/pack_metadata.json | 2 +- .../ReleaseNotes/1_7_64.md | 5 + .../GenerateASMReport/GenerateASMReport.py | 5 + .../GenerateASMReport/GenerateASMReport.yml | 2 +- .../pack_metadata.json | 2 +- .../CovalenceManagedSecurity.py | 3 + .../CovalenceManagedSecurity.yml | 2 +- .../ReleaseNotes/1_3_2.md | 5 + .../pack_metadata.json | 2 +- .../CybleThreatIntel/CybleThreatIntel.py | 15 ++- .../CybleThreatIntel/CybleThreatIntel.yml | 2 +- Packs/CybleThreatIntel/ReleaseNotes/2_0_25.md | 4 + Packs/CybleThreatIntel/pack_metadata.json | 2 +- .../Cylance_Protect_v2/Cylance_Protect_v2.py | 33 ++--- .../Cylance_Protect_v2/Cylance_Protect_v2.yml | 2 +- .../Cylance_Protect_v2_test.py | 45 +++---- Packs/Cylance_Protect/ReleaseNotes/1_1_39.md | 5 + Packs/Cylance_Protect/pack_metadata.json | 2 +- 64 files changed, 392 insertions(+), 198 deletions(-) create mode 100644 Packs/CIRCLHashlookup/ReleaseNotes/1_0_7.md create mode 100644 Packs/CSCDomainManager/ReleaseNotes/1_0_5.md create mode 100644 Packs/Campaign/ReleaseNotes/3_4_14.md create mode 100644 Packs/CentrifyVault/ReleaseNotes/1_0_10.md create mode 100644 Packs/CheckpointFirewall/ReleaseNotes/2_3_25.md create mode 100644 Packs/CiscoASA/ReleaseNotes/1_1_12.md create mode 100644 Packs/CiscoSMA/ReleaseNotes/1_1_32.md create mode 100644 Packs/CommunityCommonDashboards/ReleaseNotes/2_0_9.md create mode 100644 Packs/ContentManagement/ReleaseNotes/1_2_27.md create mode 100644 Packs/ContentTesting/ReleaseNotes/2_1_7.md create mode 100644 Packs/CortexAttackSurfaceManagement/ReleaseNotes/1_7_64.md create mode 100644 Packs/CovalenceManagedSecurity/ReleaseNotes/1_3_2.md create mode 100644 Packs/CybleThreatIntel/ReleaseNotes/2_0_25.md create mode 100644 Packs/Cylance_Protect/ReleaseNotes/1_1_39.md 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": "",