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

PSAAS-20418 update packages #39

Merged
merged 5 commits into from
Dec 23, 2024
Merged
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
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.17
rev: v1.24
hooks:
- id: org-hook
- id: package-app-dependencies
- repo: https://github.com/Yelp/detect-secrets
rev: v1.4.0
rev: v1.5.0
hooks:
- id: detect-secrets
args: ['--no-verify', '--exclude-files', '^jira.json$']
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -198,4 +198,4 @@
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
limitations under the License.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Connector Version: 3.7.2
Product Vendor: Atlassian
Product Name: Jira
Product Version Supported (regex): ".\*"
Minimum Product Version: 6.1.1
Minimum Product Version: 6.3.0

This app integrates with JIRA to perform several ticket management actions

Expand Down Expand Up @@ -342,8 +342,8 @@ ports used by the Splunk SOAR Connector.
| https | tcp | 443 |


### Configuration Variables
The below configuration variables are required for this Connector to operate. These variables are specified when configuring a Jira asset in SOAR.
### Configuration variables
This table lists the configuration variables required to operate Jira. These variables are specified when configuring a Jira asset in Splunk SOAR.

VARIABLE | REQUIRED | TYPE | DESCRIPTION
-------- | -------- | ---- | -----------
Expand Down
20 changes: 4 additions & 16 deletions jira.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"product_vendor": "Atlassian",
"product_name": "Jira",
"product_version_regex": ".*",
"min_phantom_version": "6.1.1",
"min_phantom_version": "6.3.0",
"latest_tested_versions": [
"On prem v8.21.0",
"Cloud Copyright (c) 2002 - 2023 Atlassian Corporation Pty Ltd."
Expand Down Expand Up @@ -10669,10 +10669,6 @@
"module": "PyJWT",
"input_file": "wheels/py3/PyJWT-2.6.0-py3-none-any.whl"
},
{
"module": "beautifulsoup4",
"input_file": "wheels/py3/beautifulsoup4-4.9.1-py3-none-any.whl"
},
{
"module": "defusedxml",
"input_file": "wheels/shared/defusedxml-0.7.1-py2.py3-none-any.whl"
Expand All @@ -10687,16 +10683,12 @@
},
{
"module": "packaging",
"input_file": "wheels/py3/packaging-24.0-py3-none-any.whl"
"input_file": "wheels/py3/packaging-24.2-py3-none-any.whl"
},
{
"module": "pbr",
"input_file": "wheels/shared/pbr-5.4.4-py2.py3-none-any.whl"
},
{
"module": "python_dateutil",
"input_file": "wheels/shared/python_dateutil-2.8.1-py2.py3-none-any.whl"
},
{
"module": "pytz",
"input_file": "wheels/shared/pytz-2021.1-py2.py3-none-any.whl"
Expand All @@ -10710,12 +10702,8 @@
"input_file": "wheels/shared/requests_toolbelt-0.10.1-py2.py3-none-any.whl"
},
{
"module": "six",
"input_file": "wheels/shared/six-1.16.0-py2.py3-none-any.whl"
},
{
"module": "soupsieve",
"input_file": "wheels/py3/soupsieve-2.5-py3-none-any.whl"
"module": "typing_extensions",
"input_file": "wheels/py3/typing_extensions-4.12.2-py3-none-any.whl"
}
]
}
Expand Down
718 changes: 378 additions & 340 deletions jira_connector.py

Large diffs are not rendered by default.

48 changes: 30 additions & 18 deletions jira_consts.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,28 +51,34 @@
JIRA_JSON_TO_ID = "to_id"
JIRA_JSON_LINK_TYPE = "link_type"
JIRA_JSON_UPDATED_AT = "updated_at"
JIRA_JSON_CONTAINER = 'container'
JIRA_JSON_SDI = 'source_data_identifier'
JIRA_JSON_LABEL = 'label'
JIRA_JSON_CEF = 'cef'
JIRA_JSON_UNRESOLVED = 'Unresolved'
JIRA_JSON_CUSTOM_FIELDS = 'custom_fields'
JIRA_JSON_USERNAME = 'username'
JIRA_JSON_DISPLAY_NAME = 'display_name'
JIRA_JSON_USER_ACCOUNT_ID = 'user_account_id'
JIRA_JSON_TIMESPENT = 'time_spent'
JIRA_JSON_CONTAINER = "container"
JIRA_JSON_SDI = "source_data_identifier"
JIRA_JSON_LABEL = "label"
JIRA_JSON_CEF = "cef"
JIRA_JSON_UNRESOLVED = "Unresolved"
JIRA_JSON_CUSTOM_FIELDS = "custom_fields"
JIRA_JSON_USERNAME = "username"
JIRA_JSON_DISPLAY_NAME = "display_name"
JIRA_JSON_USER_ACCOUNT_ID = "user_account_id"
JIRA_JSON_TIMESPENT = "time_spent"

JIRA_RESPONSE_ERROR_MESSAGES_KEY = "errorMessages"
JIRA_RESPONSE_ERRORS_KEY = "errors"

JIRA_WATCHERS_ERROR = "Please provide either 'user_account_id' or 'username' action parameter. " \
JIRA_WATCHERS_ERROR = (
"Please provide either 'user_account_id' or 'username' action parameter. "
"For JIRA on-prem, use 'username' action parameter, and, for JIRA cloud, use 'user_account_id' action parameter"
JIRA_SEARCH_USERS_ERROR = "Please provide either 'display_name' or 'username' action parameter. " \
)
JIRA_SEARCH_USERS_ERROR = (
"Please provide either 'display_name' or 'username' action parameter. "
"For JIRA on-prem, use 'username' action parameter, and, for JIRA cloud, use 'display_name' action parameter"
)
JIRA_CUSTOM_FIELD_FORMAT_ERROR = "Could not load JSON formatted list from the custom_fields asset configuration parameter. {0}"
JIRA_CUSTOM_FIELD_NON_EMPTY_ERROR = "Please provide 'custom_fields' asset configuration parameter as a non-empty JSON formatted list"
JIRA_ASSIGNEE_ERROR = "Please provide either 'assignee' or 'assignee_account_id' action parameter. " \
JIRA_ASSIGNEE_ERROR = (
"Please provide either 'assignee' or 'assignee_account_id' action parameter. "
"For JIRA on-prem, use 'assignee' action parameter, and, for JIRA cloud, use 'assignee_account_id' action parameter"
)
JIRA_INVALID_LIMIT = "Please provide non-zero positive integer in limit"
JIRA_ERROR_STATE_FILE_CORRUPT_ERROR = "Error occurred while loading the state file due to its unexpected format.\
Resetting the state file with the default format. Please try again."
Expand All @@ -86,9 +92,11 @@
JIRA_ERROR_TICKET_ASSIGNMENT_FAILED = "Ticket assignment to user '{0}' failed. {1}"
JIRA_ERROR_CREATE_TICKET_FAILED = "Ticket creation failed"
JIRA_SUCCESS_TICKET_CREATED = "Created ticket with id: {id}, key: {key}"
JIRA_ERROR_ARTIFACT_NOT_FOUND_IN_CONTAINER = "Either the ticket artifact with issue key: {issue_key} got deleted " \
"from the container: {container_id} or the type of the issue has changed on the JIRA instance." \
JIRA_ERROR_ARTIFACT_NOT_FOUND_IN_CONTAINER = (
"Either the ticket artifact with issue key: {issue_key} got deleted "
"from the container: {container_id} or the type of the issue has changed on the JIRA instance."
"Please delete the container and re-run the ingestion."
)
JIRA_ERROR_FILE_NOT_IN_VAULT = "Could not find specified vault ID in vault"
JIRA_ERROR_ATTACH_FAILED = "Adding attachment failed. {0}"
JIRA_ERROR_LIST_TICKETS_FAILED = "Failed to get ticket listing"
Expand All @@ -98,13 +106,17 @@
JIRA_ERROR_ISSUE_VALID_RESOLUTION = "Input resolution does not seem to be valid"
JIRA_ERROR_UPDATE_NO_PARAM = "Either the Vault ID or the JSON field must be filled out to perform this action"
JIRA_ERROR_UPDATE_FAILED = "Unable to update the ticket with the given JSON"
JIRA_ERROR_COMMENT_SET_STATUS_FAILED = "Comment could not be added successfully due to either permissions or configuration issue " \
JIRA_ERROR_COMMENT_SET_STATUS_FAILED = (
"Comment could not be added successfully due to either permissions or configuration issue "
"(changing the status of the ticket to Closed and then, trying to add comment to it is one such scenario)."
)
JIRA_SUCCESS_TICKET_UPDATED = "Successfully updated the ticket"
JIRA_SUCCESS_TICKET_DELETED = "Successfully deleted the ticket"
JIRA_ERROR_INPUT_FIELDS_NOT_THE_ONLY_ONE = "Invalid fields value." \
" The input json has a 'fields' key in it in addition to other keys." \
JIRA_ERROR_INPUT_FIELDS_NOT_THE_ONLY_ONE = (
"Invalid fields value."
" The input json has a 'fields' key in it in addition to other keys."
" Either specify a dictionary with only one parent 'fields' key or multiple keys without the 'fields' key"
)
JIRA_ERROR_FAILED = "Some tickets had issues during ingestion, see logs for the details"
JIRA_ERROR_NEGATIVE_INPUT = "'start_index' cannot be a negative value"
JIRA_LIMIT_VALIDATION_ALLOW_ZERO_MESSAGE = "Please provide zero or positive integer value in the {parameter} parameter"
Expand Down
1 change: 1 addition & 0 deletions release_notes/unreleased.md
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
**Unreleased**
* Updated min_phantom_version and python packages for security [PSAAS-20418]
5 changes: 1 addition & 4 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
[flake8]
max-line-length = 145
max-complexity = 28
extend-ignore = F403,E128,E126,E111,E121,E127,E731,E201,E202,F405,E722,D,W292

[isort]
line_length = 145
extend-ignore = F403,E128,E126,E121,E127,E731,E201,E202,E203,E701,F405,E722,D,W503
Binary file removed wheels/py3/beautifulsoup4-4.9.1-py3-none-any.whl
Binary file not shown.
Binary file removed wheels/py3/packaging-24.0-py3-none-any.whl
Binary file not shown.
Binary file added wheels/py3/packaging-24.2-py3-none-any.whl
Binary file not shown.
Binary file removed wheels/py3/soupsieve-2.5-py3-none-any.whl
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed wheels/shared/six-1.16.0-py2.py3-none-any.whl
Binary file not shown.
Loading