Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Docker Image To demisto/fastapi #28834

Merged
merged 21 commits into from Aug 9, 2023
Merged
Show file tree
Hide file tree
Changes from 12 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion Packs/ApiModules/Scripts/SiemApiModule/SiemApiModule.py
Expand Up @@ -40,7 +40,7 @@
url: AnyUrl
verify: bool = True
headers: dict = dict() # type: ignore[type-arg]
auth: Optional[HTTPBasicAuth]
auth: HTTPBasicAuth | None
data: Any = None
params: dict = dict() # type: ignore[type-arg]

Expand Down Expand Up @@ -163,6 +163,6 @@
return {'after': events[-1]['created']}

@abstractmethod
def _iter_events(self):
"""Create iterators with Yield"""
pass

Check failure on line 168 in Packs/ApiModules/Scripts/SiemApiModule/SiemApiModule.py

View workflow job for this annotation

GitHub Actions / pre-commit

Ruff (B027)

Packs/ApiModules/Scripts/SiemApiModule/SiemApiModule.py:166:5: B027 `IntegrationGetEvents._iter_events` is an empty method in an abstract base class, but has no abstract decorator
Expand Up @@ -106,8 +106,8 @@ class CyberArkIdentityEventsOptions(IntegrationOptions):


class CyberArkIdentityEventsRequest(IntegrationHTTPRequest):
method = Method.POST
headers = {'Accept': '*/*', 'Content-Type': 'application/json'}
method: Method = Method.POST
headers: dict = {'Accept': '*/*', 'Content-Type': 'application/json'}


class CyberArkIdentityEventsClient(IntegrationEventsClient):
Expand Down Expand Up @@ -169,7 +169,8 @@ def _iter_events(self):

result = self.client.call(self.client.request).json()['Result']

if events := result.get('Results'):
events = result.get('Results')
if events:
fetched_events_ids = demisto.getLastRun().get('ids', [])
yield [event.get('Row') for event in events if event.get('Row', {}).get('ID') not in fetched_events_ids]

Expand Down
Expand Up @@ -76,7 +76,7 @@ script:
isfetchevents: true
type: python
subtype: python3
dockerimage: demisto/fastapi:1.0.0.64153
dockerimage: demisto/fastapi:1.0.0.68195
marketplaces:
- marketplacev2
fromversion: 6.8.0
Expand Down
3 changes: 3 additions & 0 deletions Packs/CyberArkIdentity/ReleaseNotes/1_0_27.md
@@ -0,0 +1,3 @@
#### Integrations
##### CyberArk Identity Event Collector
- Updated the Docker image to: *demisto/fastapi:1.0.0.68195*.
2 changes: 1 addition & 1 deletion Packs/CyberArkIdentity/pack_metadata.json
Expand Up @@ -2,7 +2,7 @@
"name": "CyberArk Identity",
"description": "This integration collects events from the Idaptive Next-Gen Access (INGA) using REST APIs.",
"support": "xsoar",
"currentVersion": "1.0.26",
"currentVersion": "1.0.27",
"author": "Cortex XSOAR",
"url": "https://www.paloaltonetworks.com/cortex",
"email": "",
Expand Down
Expand Up @@ -15,11 +15,11 @@

class DropboxEventsRequestConfig(IntegrationHTTPRequest):
# Endpoint: https://api.dropbox.com/2/team_log/get_events
url = parse_obj_as(AnyUrl, 'https://api.dropbox.com')
method = Method.POST
headers = {'Content-Type': 'application/json'}
url: AnyUrl = parse_obj_as(AnyUrl, 'https://api.dropbox.com')
method: Method = Method.POST
headers: dict = {'Content-Type': 'application/json'}
data: str
verify = not demisto.params().get('insecure')
verify: bool = not demisto.params().get('insecure')


class DropboxEventsClient(IntegrationEventsClient):
Expand Down Expand Up @@ -72,9 +72,8 @@ def _iter_events(self):
# endregion

# region Yield Response
while events := results.get('events'): # Run as long there are logs

yield sorted(events, key=lambda d: d['timestamp'])
while results.get('events'): # Run as long there are logs
yield sorted(results.get('events', []), key=lambda d: d.get('timestamp'))

if results.get('has_more'):
self.client.set_request_filter(results.get('cursor'))
Expand Down
Expand Up @@ -78,7 +78,7 @@ script:
defaultValue: 3 days
description: Get events.
name: dropbox-get-events
dockerimage: demisto/fastapi:1.0.0.64153
dockerimage: demisto/fastapi:1.0.0.68195
runonce: false
script: '-'
subtype: python3
Expand Down
3 changes: 3 additions & 0 deletions Packs/Dropbox/ReleaseNotes/1_0_25.md
@@ -0,0 +1,3 @@
#### Integrations
##### Dropbox Event Collector
- Updated the Docker image to: *demisto/fastapi:1.0.0.68195*.
2 changes: 1 addition & 1 deletion Packs/Dropbox/pack_metadata.json
Expand Up @@ -2,7 +2,7 @@
"name": "Dropbox",
"description": "Use the Dropbox integration to fetch events",
"support": "xsoar",
"currentVersion": "1.0.24",
"currentVersion": "1.0.25",
"author": "Cortex XSOAR",
"url": "https://www.paloaltonetworks.com/cortex",
"email": "",
Expand Down