Skip to content

Commit

Permalink
remove o
Browse files Browse the repository at this point in the history
  • Loading branch information
RotemAmit committed Jan 9, 2025
1 parent 96566f9 commit 5429bb4
Show file tree
Hide file tree
Showing 12 changed files with 46 additions and 22 deletions.
11 changes: 6 additions & 5 deletions Packs/Okta/Integrations/Okta_IAM/Okta_IAM.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,10 +114,10 @@ def get_okta_fields(self):
)

base_properties = res.get('definitions', {}).get('base', {}).get('properties', {})
okta_fields.update({k: base_properties[k].get('title') for k in base_properties.keys()})
okta_fields.update({k: base_properties[k].get('title') for k in base_properties})

custom_properties = res.get('definitions', {}).get('custom', {}).get('properties', {})
okta_fields.update({k: custom_properties[k].get('title') for k in custom_properties.keys()})
okta_fields.update({k: custom_properties[k].get('title') for k in custom_properties})

return okta_fields

Expand Down Expand Up @@ -489,7 +489,7 @@ def get_user_command(client, args, mapper_in, mapper_out):
user_profile.set_result(
action=IAMActions.GET_USER,
success=True,
active=False if okta_user.get('status') == DEPROVISIONED_STATUS else True,
active=okta_user.get('status') != DEPROVISIONED_STATUS,
iden=okta_user.get('id'),
email=okta_user.get('profile', {}).get('email'),
username=okta_user.get('profile', {}).get('login'),
Expand Down Expand Up @@ -559,7 +559,7 @@ def create_user_command(client, args, mapper_out, is_command_enabled, is_update_
user_profile.set_result(
action=IAMActions.CREATE_USER,
success=True,
active=False if created_user.get('status') == DEPROVISIONED_STATUS else True,
active=created_user.get('status') != DEPROVISIONED_STATUS,
iden=created_user.get('id'),
email=created_user.get('profile', {}).get('email'),
username=created_user.get('profile', {}).get('login'),
Expand Down Expand Up @@ -607,7 +607,7 @@ def update_user_command(client, args, mapper_out, is_command_enabled, is_enable_
user_profile.set_result(
action=IAMActions.UPDATE_USER,
success=True,
active=False if okta_user.get('status') == DEPROVISIONED_STATUS else True,
active=okta_user.get('status') != DEPROVISIONED_STATUS,
iden=updated_user.get('id'),
email=updated_user.get('profile', {}).get('email'),
username=updated_user.get('profile', {}).get('login'),
Expand Down Expand Up @@ -841,6 +841,7 @@ def get_group_command(client, args):
generic_iam_context = OutputContext(success=False, displayName=group_name, errorCode=404,
errorMessage="Group Not Found", details=res_json)
else:
generic_iam_context = OutputContext()
group_search_result = res_json
else:
generic_iam_context = OutputContext(success=False, displayName=group_name, id=group_id,
Expand Down
2 changes: 1 addition & 1 deletion Packs/Okta/Integrations/Okta_IAM/Okta_IAM.yml
Original file line number Diff line number Diff line change
Expand Up @@ -535,7 +535,7 @@ script:
- contextPath: Okta.Logs.Events.target.displayName
description: Display name of a target.
type: String
dockerimage: demisto/python3:3.11.10.115186
dockerimage: demisto/python3:3.11.10.116949
isfetch: true
runonce: false
script: '-'
Expand Down
5 changes: 5 additions & 0 deletions Packs/Okta/ReleaseNotes/3_3_10.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#### Integrations

##### Okta IAM
- Code functionality improvements.
- Updated the Docker image to: *demisto/python3:3.11.10.116949*.
2 changes: 1 addition & 1 deletion Packs/Okta/pack_metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "Okta",
"description": "Integration with Okta's cloud-based identity management service.",
"support": "xsoar",
"currentVersion": "3.3.9",
"currentVersion": "3.3.10",
"author": "Cortex XSOAR",
"url": "https://www.paloaltonetworks.com/cortex",
"email": "",
Expand Down
2 changes: 2 additions & 0 deletions Packs/OpenSourceVulnerabilities/Integrations/OSV/OSV.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ def osv_get_vuln_by_id_command(client: Client, args: Dict[str, Any]) -> CommandR


def osv_query_affected_by_commit_command(client: Client, args: Dict[str, Any]) -> CommandResults:
command_results = CommandResults()
v1query_commit = str(args.get('commit', ''))

response = client.osv_query_affected_by_commit_request(v1query_commit)
Expand All @@ -61,6 +62,7 @@ def osv_query_affected_by_commit_command(client: Client, args: Dict[str, Any]) -


def osv_query_affected_by_package_command(client: Client, args: Dict[str, Any]) -> CommandResults:
command_results = CommandResults()
v1query_version = str(args.get('version', ''))
v1query_package = str(args.get('packageName', ''))
v1query_ecosystem = str(args.get('ecosystem', ''))
Expand Down
20 changes: 10 additions & 10 deletions Packs/OpenSourceVulnerabilities/Integrations/OSV/OSV.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,20 +16,20 @@ configuration:
name: proxy
type: 8
required: false
description: 'OSV (Open Source Vulnerability) is a vulnerability database for open source projects. For each vulnerability, it perform bisects to figure out the exact commit that introduces the bug, as well the exact commit that fixes it. This is cross referenced against upstream repositories to figure out the affected tags and commit ranges '
description: 'OSV (Open Source Vulnerability) is a vulnerability database for open source projects. For each vulnerability, it perform bisects to figure out the exact commit that introduces the bug, as well the exact commit that fixes it. This is cross referenced against upstream repositories to figure out the affected tags and commit ranges.'
display: OSV
name: OSV
script:
commands:
- arguments:
- description: 'The `id` field is a unique identifier for the vulnerability entry. For example: OSV-2020-111'
- description: 'The `id` field is a unique identifier for the vulnerability entry. For example: OSV-2020-111.'
name: id_
required: true
description: Return a `Vulnerability` object for a given OSV ID. All list of vulnerabilities can be found at https://osv.dev/list
name: osv-get-vuln-by-id
outputs:
- contextPath: OSV.Vulnerability.id
description: The `id` field is a unique identifier for the vulnerability entry
description: The `id` field is a unique identifier for the vulnerability entry.
type: String
- contextPath: OSV.Vulnerability.published
description: The RFC3339 timestamp indicating when this entry was published.
Expand Down Expand Up @@ -62,10 +62,10 @@ script:
description: Reference URL for more details.
type: String
- arguments:
- description: The commit hash to query for. E.g 6879efc2c1596d11a6a6ad296f80063b558d5e0f
- description: The commit hash to query for. E.g 6879efc2c1596d11a6a6ad296f80063b558d5e0f.
name: commit
required: true
description: Query vulnerabilities for a particular project at a given commit
description: Query vulnerabilities for a particular project at a given commit.
name: osv-query-affected-by-commit
outputs:
- contextPath: OSV.VulnerabilityList.vulns.id
Expand Down Expand Up @@ -102,15 +102,15 @@ script:
description: Reference URL for more details.
type: String
- arguments:
- description: ' The version string to query for. A fuzzy match is done against upstream versions. Eg. 3.3.0'
- description: 'The version string to query for. A fuzzy match is done against upstream versions. Eg. 3.3.0.'
name: version
required: true
- description: The name of the package/project to query for. Eg. django-tinymce
- description: The name of the package/project to query for. Eg. django-tinymce.
name: packageName
required: true
- description: The ecosystem of the package. Eg. PyPI
- description: The ecosystem of the package. Eg. PyPI.
name: ecosystem
description: Query vulnerabilities for a particular project based on package name and verion
description: Query vulnerabilities for a particular project based on package name and verion.
name: osv-query-affected-by-package
outputs:
- contextPath: OSV.VulnerabilityList.vulns.id
Expand Down Expand Up @@ -146,7 +146,7 @@ script:
- contextPath: OSV.VulnerabilityList.vulns.references.url
description: Reference URL for more details.
type: string
dockerimage: demisto/python3:3.11.10.115186
dockerimage: demisto/python3:3.11.10.116949
script: ''
subtype: python3
type: python
Expand Down
5 changes: 5 additions & 0 deletions Packs/OpenSourceVulnerabilities/ReleaseNotes/1_0_4.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#### Integrations

##### OSV
- Code functionality improvements.
- Updated the Docker image to: *demisto/python3:3.11.10.116949*.
2 changes: 1 addition & 1 deletion Packs/OpenSourceVulnerabilities/pack_metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "OpenSourceVulnerabilities",
"description": "OSV (Open Source Vulnerability) is a vulnerability database for open source projects. For each vulnerability, it perform bisects to figure out the exact commit that introduces the bug, as well the exact commit that fixes it. This is cross referenced against upstream repositories to figure out the affected tags and commit ranges",
"support": "community",
"currentVersion": "1.0.3",
"currentVersion": "1.0.4",
"author": "Anil Agrawal",
"url": "https://live.paloaltonetworks.com/t5/cortex-xsoar-discussions/bd-p/Cortex_XSOAR_Discussions",
"email": "",
Expand Down
10 changes: 8 additions & 2 deletions Packs/Oracle_IAM/Integrations/OracleIAM/OracleIAM.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def build_body_request_for_update_user(old_user_data, new_user_data):
operations = []
for key, value in new_user_data.items():
operation = {
'op': 'replace' if key in old_user_data.keys() else 'add',
'op': 'replace' if key in old_user_data else 'add',
'path': key,
'value': [value] if key in ('emails', 'phoneNumbers') and not isinstance(value, list) else value,
}
Expand All @@ -35,7 +35,7 @@ def build_body_request_for_update_user(old_user_data, new_user_data):
class Client(BaseClient):
""" A client class that implements logic to authenticate with the application. """

def __init__(self, base_url, verify=True, proxy=False, ok_codes=tuple(), headers=None, client_id=None,
def __init__(self, base_url, verify=True, proxy=False, ok_codes=(), headers=None, client_id=None,
client_secret=None):
super().__init__(base_url, verify, proxy, ok_codes, headers)
self.base_url = base_url
Expand Down Expand Up @@ -606,6 +606,9 @@ def update_group_command(client, args):
res_json = res.json()
if res.status_code == 200:
generic_iam_context = OutputContext(success=True, id=group_id, displayName=group_name, details=res_json)
else:
generic_iam_context = OutputContext()
demisto.debug(f"{res.status_code=} , not 200. Initializing generic_iam_context.")
except DemistoException as exc:
if exc.res.status_code == 404:
generic_iam_context = OutputContext(success=False, id=group_id, displayName=group_name, errorCode=404,
Expand Down Expand Up @@ -640,6 +643,9 @@ def delete_group_command(client, args):
try:
if res.status_code == 204:
generic_iam_context = OutputContext(success=True, id=group_id, displayName=group_name)
else:
generic_iam_context = OutputContext()
demisto.debug(f"{res.status_code=} , not 204. Initializing generic_iam_context.")
except DemistoException as exc:
if exc.res.status_code == 404:
generic_iam_context = OutputContext(success=False, id=group_id, displayName=group_name, errorCode=404,
Expand Down
2 changes: 1 addition & 1 deletion Packs/Oracle_IAM/Integrations/OracleIAM/OracleIAM.yml
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,7 @@ script:
type: Unknown
- description: Retrieves a User Profile schema, which holds all of the user fields within the application. Used for outgoing-mapping through the Get Schema option.
name: get-mapping-fields
dockerimage: demisto/python3:3.11.10.115186
dockerimage: demisto/python3:3.11.10.116949
runonce: false
script: '-'
subtype: python3
Expand Down
5 changes: 5 additions & 0 deletions Packs/Oracle_IAM/ReleaseNotes/1_0_26.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#### Integrations

##### Oracle IAM
- Code functionality improvements.
- Updated the Docker image to: *demisto/python3:3.11.10.116949*.
2 changes: 1 addition & 1 deletion Packs/Oracle_IAM/pack_metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "Oracle IAM",
"description": "Oracle IAM",
"support": "xsoar",
"currentVersion": "1.0.25",
"currentVersion": "1.0.26",
"author": "Cortex XSOAR",
"url": "https://www.paloaltonetworks.com/cortex",
"email": "",
Expand Down

0 comments on commit 5429bb4

Please sign in to comment.