Skip to content

Commit

Permalink
Fix Pylint errors in C packs (#38048)
Browse files Browse the repository at this point in the history
* c packs pylint

* fix rn

* pack version
  • Loading branch information
RotemAmit authored Jan 9, 2025
1 parent a1cb7ac commit 36eb3c9
Show file tree
Hide file tree
Showing 64 changed files with 392 additions and 198 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 6 additions & 0 deletions Packs/CIRCLHashlookup/ReleaseNotes/1_0_7.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@

#### Integrations

##### CIRCLEHashlookup
- Code functionality improvements.
- Updated the Docker image to: *demisto/python3:3.11.10.116949*.
2 changes: 1 addition & 1 deletion Packs/CIRCLHashlookup/pack_metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": "",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
86 changes: 86 additions & 0 deletions Packs/CSCDomainManager/Integrations/CSCDomainManager/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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,<br/>dns2.cscdns.net | CSC_BASIC | Domain | Administrator | [email protected] |

### 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. |
5 changes: 5 additions & 0 deletions Packs/CSCDomainManager/ReleaseNotes/1_0_5.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#### Integrations

##### CSCDomainManager
- Code functionality improvements.
- Updated the Docker image to: *demisto/python3:3.11.10.116949*.
2 changes: 1 addition & 1 deletion Packs/CSCDomainManager/pack_metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": "[email protected]",
Expand Down
4 changes: 4 additions & 0 deletions Packs/Campaign/ReleaseNotes/3_4_14.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#### Scripts
##### FindEmailCampaign
- Code functionality improvements.
- Updated the Docker image to *demisto/sklearn:1.0.0.1858294*.
4 changes: 2 additions & 2 deletions Packs/Campaign/Scripts/FindEmailCampaign/FindEmailCampaign.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 + ' ...'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion Packs/Campaign/pack_metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": "",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
Loading

0 comments on commit 36eb3c9

Please sign in to comment.