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

updated last run to latest incident time and allowed more than 1 day… #38867

Open
wants to merge 5 commits into
base: contrib/qmasters-ltd_bugfix/netskope-dlp-fetch
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 6 additions & 8 deletions Packs/Netskope/Integrations/NetskopeAPIv2/NetskopeAPIv2.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
import demistomock as demisto # noqa: F401
from CommonServerPython import * # noqa: F401
import copy
from collections.abc import Callable
from http import HTTPStatus
from typing import Any, NamedTuple
from collections.abc import Callable

import demistomock as demisto # noqa: F401
from CommonServerPython import * # noqa: F401

MAX_IDS_NUMBER = 289262
DEFAULT_WAIT_TIME = 5
Expand Down Expand Up @@ -1410,7 +1411,7 @@ def fetch_dlp_incidents_as_incidents(
# set the new incident IDs to avoid duplicates on next fetch
set_demisto_integration_context("dlp_incident_ids", new_incident_ids,
"append")

last_run_timestamp = max(new_incidents, key=lambda k: k["timestamp"])["timestamp"] + 1
else:
last_run_timestamp = end_time_number

Expand Down Expand Up @@ -1547,10 +1548,7 @@ def get_last_run(
last_run_time = ticket_last_run.get("time")
last_run_id = ticket_last_run.get("id")
else:
if incident_type == "dlp_incident":
last_run_time = "1 Day"
else:
last_run_time = args.get("first_fetch", "3 Days")
last_run_time = args.get("first_fetch", "3 Days")

first_fetch = arg_to_datetime(arg=last_run_time,
arg_name="First fetch time",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1285,7 +1285,7 @@ script:
name: lastUpdate
description: Gets the list of incidents that were modified since the last update time. Note that this method is here for debugging purposes. The get-modified-remote-data command is used as part of a Mirroring feature, which is available in Cortex XSOAR from version 6.1.
name: get-modified-remote-data
dockerimage: demisto/python3:3.11.10.116949
dockerimage: demisto/python3:3.12.8.1983910
isfetch: true
ismappable: true
isremotesyncin: true
Expand Down
8 changes: 8 additions & 0 deletions Packs/Netskope/ReleaseNotes/4_0_7.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@

#### Integrations

##### Netskope (API v2)

- Updated the Docker image to: *demisto/python3:3.12.8.1983910*.

Updated last run time for DLP incidents
2 changes: 1 addition & 1 deletion Packs/Netskope/pack_metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "Netskope",
"description": "Cloud access security broker that enables to find, understand, and secure cloud apps.",
"support": "xsoar",
"currentVersion": "4.0.6",
"currentVersion": "4.0.7",
"author": "Cortex XSOAR",
"url": "https://www.paloaltonetworks.com/cortex",
"email": "",
Expand Down
Loading