Skip to content

Commit

Permalink
Merging next to main for release 2.2.1 (#15)
Browse files Browse the repository at this point in the history
* 'create generate-doc.yml file'

* 'update generate-doc.yml file'

* 'update generate-doc.yml file'

* 'update generate-doc.yml file with manual_readme_content.md'

* Remove semgrep workflow file

* 'convert readme.html to manual_readme_content.md'

* PAPP-30822: Updated requests modules (#14)

* Updated requests modules

* Update README.md

* updated copyright year and release notes

* Update README.md

* pre-commit changes

* Update README.md

* consistent variable changes

---------

Co-authored-by: splunk-soar-connectors-admin <admin@splunksoar>
Co-authored-by: aparekh-crest <[email protected]>

* Release notes for version 2.2.1

---------

Co-authored-by: splunk-soar-connectors-admin <admin@splunksoar>
Co-authored-by: achandya-crest <[email protected]>
Co-authored-by: aparekh-crest <[email protected]>
Co-authored-by: root <root@splunksoar>
  • Loading branch information
5 people authored Jan 18, 2024
1 parent 296e0cb commit d34d62f
Show file tree
Hide file tree
Showing 22 changed files with 1,009 additions and 828 deletions.
20 changes: 20 additions & 0 deletions .github/workflows/generate-doc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Generate Readme Doc
on:
workflow_dispatch:
push:
paths:
- '*.json'
- 'readme.html'
- 'manual_readme_content.md'
tags-ignore:
- '**'
branches-ignore:
- next
- main
jobs:
generate-doc:
runs-on: ubuntu-latest
steps:
- uses: 'phantomcyber/dev-cicd-tools/github-actions/generate-doc@main'
with:
GITHUB_TOKEN: ${{ secrets.SOAR_APPS_TOKEN }}
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
repos:
- repo: https://github.com/phantomcyber/dev-cicd-tools
rev: v1.13
rev: v1.17
hooks:
- id: org-hook
- id: package-app-dependencies
- repo: https://github.com/Yelp/detect-secrets
rev: v1.3.0
rev: v1.4.0
hooks:
- id: detect-secrets
args: ['--no-verify', '--exclude-files', '^taniumrest.json$', '^README.md$']
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@
same "printed page" as the copyright notice for easier
identification within third-party archives.

Copyright (c) 2019-2022 Splunk Inc.
Copyright (c) 2019-2024 Splunk Inc.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
7 changes: 1 addition & 6 deletions NOTICE
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Splunk SOAR Tanium REST
Copyright (c) 2019-2022 Splunk Inc.
Copyright (c) 2019-2024 Splunk Inc.

Third-party Software Attributions:

Expand All @@ -9,8 +9,3 @@ License: MIT
Copyright 2004-2017 Leonard Richardson
Copyright 2004-2019 Leonard Richardson
Copyright 2018 Isaac Muse

Library: requests
Version: 2.25.0
License: Apache 2.0
Kenneth Reitz
850 changes: 425 additions & 425 deletions README.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion __init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# File: __init__.py
#
# Copyright (c) 2019-2022 Splunk Inc.
# Copyright (c) 2019-2024 Splunk Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
527 changes: 527 additions & 0 deletions manual_readme_content.md

Large diffs are not rendered by default.

353 changes: 0 additions & 353 deletions readme.html

This file was deleted.

1 change: 1 addition & 0 deletions release_notes/2.2.1.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* Removed certifi and requests dependencies in order to use platform packages [PAPP-31096, PAPP-30822]
1 change: 0 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
beautifulsoup4==4.9.1
requests==2.25.0
32 changes: 12 additions & 20 deletions taniumrest.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@
"publisher": "Splunk",
"python_version": "3",
"fips_compliant": true,
"license": "Copyright (c) 2019-2022 Splunk Inc.",
"license": "Copyright (c) 2019-2024 Splunk Inc.",
"latest_tested_versions": [
"Build (Windows): 7.5.2.3503 | Console: 3.0.64"
],
"app_version": "2.2.0",
"app_version": "2.2.1",
"utctime_updated": "2022-01-07T20:22:22.000000Z",
"package_name": "phantom_taniumrest",
"main_module": "taniumrest_connector.py",
Expand Down Expand Up @@ -2993,29 +2993,21 @@
"module": "beautifulsoup4",
"input_file": "wheels/py3/beautifulsoup4-4.9.1-py3-none-any.whl"
},
{
"module": "certifi",
"input_file": "wheels/py3/certifi-2022.9.14-py3-none-any.whl"
},
{
"module": "chardet",
"input_file": "wheels/shared/chardet-3.0.4-py2.py3-none-any.whl"
},
{
"module": "idna",
"input_file": "wheels/shared/idna-2.10-py2.py3-none-any.whl"
},
{
"module": "requests",
"input_file": "wheels/shared/requests-2.25.0-py2.py3-none-any.whl"
},
{
"module": "soupsieve",
"input_file": "wheels/py3/soupsieve-2.3.2.post1-py3-none-any.whl"
}
]
},
"pip39_dependencies": {
"wheel": [
{
"module": "beautifulsoup4",
"input_file": "wheels/py3/beautifulsoup4-4.9.1-py3-none-any.whl"
},
{
"module": "urllib3",
"input_file": "wheels/shared/urllib3-1.26.12-py2.py3-none-any.whl"
"module": "soupsieve",
"input_file": "wheels/py3/soupsieve-2.5-py3-none-any.whl"
}
]
}
Expand Down
30 changes: 15 additions & 15 deletions taniumrest_connector.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# File: taniumrest_connector.py
#
# Copyright (c) 2019-2022 Splunk Inc.
# Copyright (c) 2019-2024 Splunk Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -184,10 +184,10 @@ def _process_json_response(self, r, action_result):
try:
resp_json = r.json()
except Exception as e:
error_msg = self._get_error_message_from_exception(e)
error_message = self._get_error_message_from_exception(e)
return RetVal(action_result.set_status(
phantom.APP_ERROR,
"Unable to parse JSON response. Error: {}".format(error_msg)), None)
"Unable to parse JSON response. Error: {}".format(error_message)), None)

# Please specify the status codes here
if 200 <= r.status_code < 399:
Expand Down Expand Up @@ -276,11 +276,11 @@ def _make_rest_call(self, endpoint, action_result, verify=True, headers=None,
error_message = 'Error connecting to server. Connection Refused from the Server for %s' % endpoint
return RetVal(action_result.set_status(phantom.APP_ERROR, error_message), resp_json)
except Exception as e:
error_msg = self._get_error_message_from_exception(e)
error_message = self._get_error_message_from_exception(e)
return RetVal(action_result.set_status(
phantom.APP_ERROR,
"Error occurred while making the REST call to the Tanium server. Error: {}"
.format(error_msg)), None)
.format(error_message)), None)

return self._process_response(r, action_result)

Expand Down Expand Up @@ -513,10 +513,10 @@ def _execute_action_support(self, param, action_result): # noqa: 901
if parameter_definition and not isinstance(parameter_definition, dict):
parameter_definition = json.loads(parameter_definition)
except Exception as e:
error_msg = self._get_error_message_from_exception(e)
error_message = self._get_error_message_from_exception(e)
action_result.set_status(
phantom.APP_ERROR,
"Error while fetching package details. Error: {}".format(error_msg))
"Error while fetching package details. Error: {}".format(error_message))

if parameter_definition and len(parameter_definition.get("parameters")) != 0:
self.debug_print("Provided package is a parameterized package")
Expand All @@ -529,11 +529,11 @@ def _execute_action_support(self, param, action_result): # noqa: 901
try:
package_parameter = json.loads(package_parameter)
except Exception as e:
error_msg = self._get_error_message_from_exception(e)
error_message = self._get_error_message_from_exception(e)
return action_result.set_status(
phantom.APP_ERROR,
"Error while parsing the 'package_parameter' field. Error: {}"
.format(error_msg))
.format(error_message))

if len(package_parameter) != len(parameter_definition.get("parameters")):
return action_result.set_status(
Expand Down Expand Up @@ -1048,9 +1048,9 @@ def _parameterize_query(self, query, action_result):
try:
question_data = self._load_full_sensors_to_obj(action_result, question_data, param_list)
except Exception as e:
error_msg = self._get_error_message_from_exception(e)
error_message = self._get_error_message_from_exception(e)
self.debug_print(
"Error occurred while converting the sensors. Error: {}".format(error_msg))
"Error occurred while converting the sensors. Error: {}".format(error_message))
return

if self._param_idx and self._param_idx != len(param_list):
Expand Down Expand Up @@ -1097,10 +1097,10 @@ def _create_sensor_dict(self, action_result, sensor, param_list):
# Regular Sensor, can use as-is
return phantom.APP_SUCCESS, sensor
except Exception as e:
error_msg = self._get_error_message_from_exception(e)
error_msg = "Error while parsing the 'parameter_definition'. Error: {}".format(
error_msg)
return action_result.set_status(phantom.APP_ERROR, error_msg), {}
error_message = self._get_error_message_from_exception(e)
error_message = "Error while parsing the 'parameter_definition'. Error: {}".format(
error_message)
return action_result.set_status(phantom.APP_ERROR, error_message), {}

# Parameterized Sensor
parameter_keys = [parameter["key"] for parameter in parameter_definition["parameters"]]
Expand Down
2 changes: 1 addition & 1 deletion taniumrest_consts.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# File: taniumrest_consts.py
#
# Copyright (c) 2019-2022 Splunk Inc.
# Copyright (c) 2019-2024 Splunk Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion taniumrest_get_question_results.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
{% block widget_content %} <!-- Main Start Block -->

<!-- File: taniumrest_get_question_results.html
Copyright (c) 2019-2022 Splunk Inc.
Copyright (c) 2019-2024 Splunk Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
Expand Down
2 changes: 1 addition & 1 deletion taniumrest_run_query.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
{% block widget_content %} <!-- Main Start Block -->

<!-- File: taniumrest_run_query.html
Copyright (c) 2019-2022 Splunk Inc.
Copyright (c) 2019-2024 Splunk Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
Expand Down
2 changes: 1 addition & 1 deletion taniumrest_view.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# File: taniumrest_view.py
#
# Copyright (c) 2019-2022 Splunk Inc.
# Copyright (c) 2019-2024 Splunk Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
Binary file removed wheels/py3/certifi-2022.9.14-py3-none-any.whl
Binary file not shown.
Binary file added wheels/py3/soupsieve-2.5-py3-none-any.whl
Binary file not shown.
Binary file removed wheels/shared/chardet-3.0.4-py2.py3-none-any.whl
Binary file not shown.
Binary file removed wheels/shared/idna-2.10-py2.py3-none-any.whl
Binary file not shown.
Binary file removed wheels/shared/requests-2.25.0-py2.py3-none-any.whl
Binary file not shown.
Binary file removed wheels/shared/urllib3-1.26.12-py2.py3-none-any.whl
Binary file not shown.

0 comments on commit d34d62f

Please sign in to comment.