Skip to content

Commit

Permalink
Merge pull request #13 from splunk-soar-connectors/next
Browse files Browse the repository at this point in the history
Merging next to main for release 2.4.14
  • Loading branch information
cpangam authored Feb 11, 2022
2 parents 526eb23 + 606a077 commit 4f4c1d8
Show file tree
Hide file tree
Showing 24 changed files with 96 additions and 32 deletions.
6 changes: 5 additions & 1 deletion .github/workflows/start-release.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
name: Start Release
on: workflow_dispatch
on:
workflow_dispatch:
push:
tags:
- '*-beta*'
jobs:
start-release:
runs-on: ubuntu-latest
Expand Down
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
repos:
- repo: https://github.com/phantomcyber/dev-cicd-tools
rev: v1.7
rev: v1.11
hooks:
- id: org-hook
- id: package-app-dependencies
Expand Down
5 changes: 2 additions & 3 deletions NOTICE
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,13 @@ Copyright (c) 2017-2022 Splunk Inc.
Third-party Software Attributions:

Library: Django
Version: 3.2.5
Version: 3.2.12
License: BSD 3
License: Python 2.0
0.9.0 thru 1.2 1991-1995 CWI yes
1.3 thru 1.5.2 1.2 1995-1999 CNRI yes
2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020 Python Software Foundation;
Copyright 1991-1995 Stichting Mathematisch Centrum Amsterdam
Copyright 2001 Python Software Foundation; All Rights Reserved
Copyright 2012-2020 ,
Copyright Django Software Foundation and individual contributors

Library: beautifulsoup4
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
# MS Graph for Office 365

Publisher: Splunk
Connector Version: 2\.4\.9
Connector Version: 2\.4\.14
Product Vendor: Microsoft
Product Name: Office 365 \(MS Graph\)
Product Version Supported (regex): "\.\*"
Minimum Product Version: 5\.0\.0
Minimum Product Version: 5\.1\.0

This app connects to Office 365 using the MS Graph API to support investigate and generic actions related to the email messages and calendar events

Expand Down Expand Up @@ -1017,4 +1017,4 @@ PARAMETER | REQUIRED | DESCRIPTION | TYPE | CONTAINS
**artifact\_count** | required | Maximum number of artifact to ingest | numeric |

#### Action Output
No Output
No Output
84 changes: 68 additions & 16 deletions office365.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@
"product_version_regex": ".*",
"publisher": "Splunk",
"license": "Copyright (c) 2017-2022 Splunk Inc.",
"app_version": "2.4.9",
"utctime_updated": "2022-01-19T19:06:27.000000Z",
"app_version": "2.4.14",
"utctime_updated": "2022-02-04T01:20:46.000000Z",
"package_name": "phantom_msgraphoffice365",
"main_module": "office365_connector.py",
"min_phantom_version": "5.0.0",
"min_phantom_version": "5.1.0",
"latest_tested_versions": [
"Cloud 2021-09-28"
],
Expand Down Expand Up @@ -4723,55 +4723,107 @@
"wheel": [
{
"module": "Django",
"input_file": "wheels/Django-3.2.5-py3-none-any.whl"
"input_file": "wheels/py3/Django-3.2.12-py3-none-any.whl"
},
{
"module": "asgiref",
"input_file": "wheels/asgiref-3.4.1-py3-none-any.whl"
"input_file": "wheels/py3/asgiref-3.4.1-py3-none-any.whl"
},
{
"module": "beautifulsoup4",
"input_file": "wheels/beautifulsoup4-4.9.1-py3-none-any.whl"
"input_file": "wheels/py3/beautifulsoup4-4.9.1-py3-none-any.whl"
},
{
"module": "certifi",
"input_file": "wheels/certifi-2021.10.8-py2.py3-none-any.whl"
"input_file": "wheels/shared/certifi-2021.10.8-py2.py3-none-any.whl"
},
{
"module": "chardet",
"input_file": "wheels/chardet-3.0.4-py2.py3-none-any.whl"
"input_file": "wheels/shared/chardet-3.0.4-py2.py3-none-any.whl"
},
{
"module": "idna",
"input_file": "wheels/idna-2.10-py2.py3-none-any.whl"
"input_file": "wheels/shared/idna-2.10-py2.py3-none-any.whl"
},
{
"module": "python_magic",
"input_file": "wheels/python_magic-0.4.18-py2.py3-none-any.whl"
"input_file": "wheels/shared/python_magic-0.4.18-py2.py3-none-any.whl"
},
{
"module": "pytz",
"input_file": "wheels/pytz-2021.3-py2.py3-none-any.whl"
"input_file": "wheels/shared/pytz-2021.3-py2.py3-none-any.whl"
},
{
"module": "requests",
"input_file": "wheels/requests-2.25.0-py2.py3-none-any.whl"
"input_file": "wheels/shared/requests-2.25.0-py2.py3-none-any.whl"
},
{
"module": "soupsieve",
"input_file": "wheels/soupsieve-2.3.1-py3-none-any.whl"
"input_file": "wheels/py3/soupsieve-2.3.1-py3-none-any.whl"
},
{
"module": "sqlparse",
"input_file": "wheels/sqlparse-0.4.2-py3-none-any.whl"
"input_file": "wheels/py3/sqlparse-0.4.2-py3-none-any.whl"
},
{
"module": "typing_extensions",
"input_file": "wheels/typing_extensions-4.0.1-py3-none-any.whl"
"input_file": "wheels/py3/typing_extensions-4.0.1-py3-none-any.whl"
},
{
"module": "urllib3",
"input_file": "wheels/urllib3-1.26.8-py2.py3-none-any.whl"
"input_file": "wheels/shared/urllib3-1.26.8-py2.py3-none-any.whl"
}
]
},
"pip39_dependencies": {
"wheel": [
{
"module": "Django",
"input_file": "wheels/py3/Django-3.2.12-py3-none-any.whl"
},
{
"module": "asgiref",
"input_file": "wheels/py3/asgiref-3.5.0-py3-none-any.whl"
},
{
"module": "beautifulsoup4",
"input_file": "wheels/py3/beautifulsoup4-4.9.1-py3-none-any.whl"
},
{
"module": "certifi",
"input_file": "wheels/shared/certifi-2021.10.8-py2.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": "python_magic",
"input_file": "wheels/shared/python_magic-0.4.18-py2.py3-none-any.whl"
},
{
"module": "pytz",
"input_file": "wheels/shared/pytz-2021.3-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.1-py3-none-any.whl"
},
{
"module": "sqlparse",
"input_file": "wheels/py3/sqlparse-0.4.2-py3-none-any.whl"
},
{
"module": "urllib3",
"input_file": "wheels/shared/urllib3-1.26.8-py2.py3-none-any.whl"
}
]
}
Expand Down
14 changes: 8 additions & 6 deletions office365_connector.py
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,7 @@ def __init__(self):
self._scope = None
self._access_token = None
self._refresh_token = None
self._REPLACE_CONST = "C53CEA8298BD401BA695F247633D0542"
self._REPLACE_CONST = "C53CEA8298BD401BA695F247633D0542" # pragma: allowlist secret

def _process_empty_reponse(self, response, action_result):

Expand Down Expand Up @@ -2129,30 +2129,32 @@ def finalize(self):
argparser.add_argument('input_test_json', help='Input Test JSON file')
argparser.add_argument('-u', '--username', help='username', required=False)
argparser.add_argument('-p', '--password', help='password', required=False)
argparser.add_argument('-v', '--verify', action='store_true', help='verify', required=False, default=False)

args = argparser.parse_args()
session_id = None
verify = args.verify

if args.username and args.password:
login_url = BaseConnector._get_phantom_base_url() + "login"
try:
print("Accessing the Login page")
r = requests.get(login_url, verify=False)
r = requests.get(login_url, verify=verify, timeout=MSGOFFICE365_DEFAULT_REQUEST_TIMEOUT)
csrftoken = r.cookies['csrftoken']
data = {'username': args.username, 'password': args.password, 'csrfmiddlewaretoken': csrftoken}
headers = {'Cookie': 'csrftoken={0}'.format(csrftoken), 'Referer': login_url}

print("Logging into Platform to get the session id")
r2 = requests.post(login_url, verify=False, data=data, headers=headers)
r2 = requests.post(login_url, verify=verify, data=data, headers=headers, timeout=MSGOFFICE365_DEFAULT_REQUEST_TIMEOUT)
session_id = r2.cookies['sessionid']

except Exception as e:
print("Unable to get session id from the platform. Error: {0}".format(str(e)))
exit(1)
sys.exit(1)

if len(sys.argv) < 2:
print("No test json specified as input")
exit(0)
sys.exit(0)

with open(sys.argv[1]) as f:
in_json = f.read()
Expand All @@ -2168,4 +2170,4 @@ def finalize(self):
ret_val = connector._handle_action(json.dumps(in_json), None)
print(json.dumps(json.loads(ret_val), indent=4))

exit(0)
sys.exit(0)
2 changes: 2 additions & 0 deletions office365_consts.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,5 @@
MSGOFFICE365_INVALID_PERMISSION_ERR += " Please check the owner, owner group, and the permissions of the state file. The Phantom "
MSGOFFICE365_INVALID_PERMISSION_ERR += "user should have the correct access rights and ownership for the corresponding state file "\
"(refer to readme file for more information)."

MSGOFFICE365_DEFAULT_REQUEST_TIMEOUT = 30 # in seconds
1 change: 1 addition & 0 deletions release_notes/2.4.14.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* Added support for Python 3.9
6 changes: 5 additions & 1 deletion release_notes/release_notes.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
<b>MS Graph for Office 365 Release Notes - Published by Splunk January 20, 2022</b>
<b>MS Graph for Office 365 Release Notes - Published by Splunk February 14, 2022</b>
<br><br>
<b>Version 2.4.14 - Released February 11, 2022</b>
<ul>
<li>Added support for Python 3.9</li>
</ul>
<b>Version 2.4.9 - Released January 20, 2022</b>
<ul>
<li>Changed the hashing algorithm to SHA256 when running in FIPS mode [PAPP-22069]</li>
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
beautifulsoup4==4.9.1
Django==3.2.5
Django==3.2.12
python-magic==0.4.18
requests==2.25.0
Binary file not shown.
File renamed without changes.
Binary file added wheels/py3/asgiref-3.5.0-py3-none-any.whl
Binary file not shown.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 4f4c1d8

Please sign in to comment.