tenable / integration-jira-cloud

69 stars 51 forks source link

Unable to retrieve Vulnerbilites #205

Closed jkuangForge closed 1 year ago

jkuangForge commented 1 year ago

Hi there,

Permissions were granted in all Jira that was mentioned on the readme.md and the only difference is I add a group on the tenable and granted that group to a tag that scanner takes.

Now I caught between an invalid priority error

2022-11-14 05:11:16,122 restfly.errors.BadRequestError ERROR [400: POST] https://<JIRA_CLOUD_HOST>/rest/api/3/issue?update_history=False body=b'{"errorMessages":[],"errors":{"priority":"The priority selected is invalid."}}'
2022-11-14 05:11:16,123 root ERROR Caught the following Exception
Traceback (most recent call last):
  File "/home/ubuntu/.local/lib/python3.10/site-packages/tenable_jira/transform.py", line 409, in _process_open_vuln
    i = self._jira.issues.upsert(fields=issue, jql=' and '.join(jql))
  File "/home/ubuntu/.local/lib/python3.10/site-packages/tenable_jira/jira/issues.py", line 48, in upsert
    issue = self.create(**kwargs)
  File "/home/ubuntu/.local/lib/python3.10/site-packages/tenable_jira/jira/issues.py", line 18, in create
    return self._api.post('issue',
  File "/usr/local/lib/python3.10/dist-packages/restfly/session.py", line 631, in post
    return self._req('POST', path, **kwargs)
  File "/usr/local/lib/python3.10/dist-packages/restfly/session.py", line 559, in _req
    raise error_resp
restfly.errors.BadRequestError: [400: POST] https://<JIRA_CLOUD_HOST>/rest/api/3/issue?update_history=False body=b'{"errorMessages":[],"errors":{"priority":"The priority selected is invalid."}}'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/ubuntu/.local/lib/python3.10/site-packages/tenable_jira/cli.py", line 156, in cli
    ingest.ingest(int(observed_since), first_discovery)
  File "/home/ubuntu/.local/lib/python3.10/site-packages/tenable_jira/transform.py", line 670, in ingest
    self.create_issues(self._src.exports.vulns(**vexport))
  File "/home/ubuntu/.local/lib/python3.10/site-packages/tenable_jira/transform.py", line 529, in create_issues
    self._process_open_vuln(v, fid)
  File "/home/ubuntu/.local/lib/python3.10/site-packages/tenable_jira/transform.py", line 412, in _process_open_vuln
    sys.exit(2)
SystemExit: 2
### Configuration File:
```yaml
issue_types:
- jira_id: 10002
  name: Task
  search:
  - Tenable Plugin ID
  type: standard
- jira_id: 10200
  name: Sub-task
  search:
  - Tenable Platform
  - Tenable Plugin ID
  - Tenable Asset UUID
  - Device IPv4 Addresses
  - Device IPv6 Addresses
  - Vulnerability Port
  - Vulnerability Protocol
  type: subtask
jira:
  address: <REDACTED>
  api_token: <REDACTED>
  api_username: <REDACTED>
log:
  filename: /home/ubuntu/tenableio/integration-jira-cloud/tenableio.log
  format: '%(asctime)-15s %(name)s %(levelname)s %(message)s'
  level: 10
project:
  leadAccountId: <REDACTED>
screen:
  jira_ids:
  - 11038
  - 11039
tenable:
  access_key: <REDACTED>
  secret_key: <REDACTED>
tio_severities:
- critical
- high
- medium
- low

Debug Logs

2022-11-14 05:10:53,755 root INFO Tenable2JiraCloud Version 1.2.3
2022-11-14 05:10:53,755 root INFO Using configuration file config.yaml
2022-11-14 05:10:53,757 root INFO Running on Python3.10.6Linux/x86_64
2022-11-14 05:10:53,757 root DEBUG Severity Prioritization set to: {'critical': 1, 'high': 2, 'medium': 3, 'low': 4}
2022-11-14 05:10:53,757 tenable.io.TenableIO DEBUG Request: {"method": "GET", "url": "https://cloud.tenable.com/session", "params": {}, "body": {}}
2022-11-14 05:10:53,759 urllib3.connectionpool DEBUG Starting new HTTPS connection (1): cloud.tenable.com:443
2022-11-14 05:10:54,105 urllib3.connectionpool DEBUG https://cloud.tenable.com:443 "GET /session HTTP/1.1" 200 None
2022-11-14 05:10:54,107 tenable_jira.jira.Jira DEBUG Request: {"method": "GET", "url": "https://<JIRA_CLOUD_HOST>/rest/api/3/project/VULN", "params": {}, "body": {}}
2022-11-14 05:10:54,107 urllib3.connectionpool DEBUG Starting new HTTPS connection (1): <JIRA_CLOUD_HOST>:443
2022-11-14 05:10:54,408 urllib3.connectionpool DEBUG https://<JIRA_CLOUD_HOST>:443 "GET /rest/api/3/project/VULN HTTP/1.1" 200 None
2022-11-14 05:10:54,411 tenable_jira.jira.Jira DEBUG Request: {"method": "GET", "url": "https://<JIRA_CLOUD_HOST>/rest/api/3/field", "params": {}, "body": {}}
2022-11-14 05:10:54,631 urllib3.connectionpool DEBUG https://<JIRA_CLOUD_HOST>:443 "GET /rest/api/3/field HTTP/1.1" 200 None
2022-11-14 05:10:54,642 tenable_jira.jira.Jira INFO Tenable Platform is customfield_11062 (existing)
2022-11-14 05:10:54,642 tenable_jira.jira.Jira INFO CVEs is customfield_11063 (existing)
2022-11-14 05:10:54,642 tenable_jira.jira.Jira INFO CVSSv2 Base Score is customfield_11064 (existing)
2022-11-14 05:10:54,642 tenable_jira.jira.Jira INFO CVSSv2 Temporal Score is customfield_11065 (existing)
2022-11-14 05:10:54,642 tenable_jira.jira.Jira INFO CVSSv3 Base Score is customfield_11066 (existing)
2022-11-14 05:10:54,642 tenable_jira.jira.Jira INFO CVSSv3 Temporal Score is customfield_11067 (existing)
2022-11-14 05:10:54,642 tenable_jira.jira.Jira INFO Patch Publication Date is customfield_11019 (existing)
2022-11-14 05:10:54,642 tenable_jira.jira.Jira INFO Tenable Plugin ID is customfield_11068 (existing)
2022-11-14 05:10:54,642 tenable_jira.jira.Jira INFO Tenable Plugin Family is customfield_11069 (existing)
2022-11-14 05:10:54,643 tenable_jira.jira.Jira INFO Tenable Plugin Name is customfield_11070 (existing)
2022-11-14 05:10:54,643 tenable_jira.jira.Jira INFO Vulnerability Severity is customfield_11071 (existing)
2022-11-14 05:10:54,643 tenable_jira.jira.Jira INFO Finding Severity is customfield_11024 (existing)
2022-11-14 05:10:54,643 tenable_jira.jira.Jira INFO Tenable Asset UUID is customfield_11072 (existing)
2022-11-14 05:10:54,643 tenable_jira.jira.Jira INFO Tenable Asset Tags is customfield_11060 (existing)
2022-11-14 05:10:54,643 tenable_jira.jira.Jira INFO Device MAC Addresses is customfield_11073 (existing)
2022-11-14 05:10:54,643 tenable_jira.jira.Jira INFO Device IPv4 Addresses is customfield_11074 (existing)
2022-11-14 05:10:54,643 tenable_jira.jira.Jira INFO Device IPv6 Addresses is customfield_11075 (existing)
2022-11-14 05:10:54,643 tenable_jira.jira.Jira INFO Device Hostname is customfield_11076 (existing)
2022-11-14 05:10:54,643 tenable_jira.jira.Jira INFO Device NetBIOS Name is customfield_11077 (existing)
2022-11-14 05:10:54,643 tenable_jira.jira.Jira INFO Device DNS Name is customfield_11078 (existing)
2022-11-14 05:10:54,643 tenable_jira.jira.Jira INFO Device Network ID is customfield_11079 (existing)
2022-11-14 05:10:54,643 tenable_jira.jira.Jira INFO Vulnerability First Seen is customfield_11080 (existing)
2022-11-14 05:10:54,643 tenable_jira.jira.Jira INFO Vulnerability Last Seen is customfield_11081 (existing)
2022-11-14 05:10:54,643 tenable_jira.jira.Jira INFO Vulnerability Last Fixed is customfield_11082 (existing)
2022-11-14 05:10:54,643 tenable_jira.jira.Jira INFO Vulnerability State is customfield_11083 (existing)
2022-11-14 05:10:54,644 tenable_jira.jira.Jira INFO Vulnerability Port is customfield_11084 (existing)
2022-11-14 05:10:54,644 tenable_jira.jira.Jira INFO Vulnerability Protocol is customfield_11085 (existing)
2022-11-14 05:10:54,644 tenable_jira.jira.Jira INFO Vulnerability Repository ID is customfield_11086 (existing)
2022-11-14 05:10:54,644 tenable_jira.jira.Jira INFO Vulnerability Repository Name is customfield_11087 (existing)
2022-11-14 05:10:54,644 tenable_jira.jira.Jira INFO Tenable VPR Score is customfield_11088 (existing)
2022-11-14 05:10:54,644 tenable_jira.jira.Jira DEBUG Request: {"method": "GET", "url": "https://<JIRA_CLOUD_HOST>/rest/api/3/project/VULN", "params": {}, "body": {}}
2022-11-14 05:10:54,817 urllib3.connectionpool DEBUG https://<JIRA_CLOUD_HOST>:443 "GET /rest/api/3/project/VULN HTTP/1.1" 200 None
2022-11-14 05:10:54,819 tenable_jira.jira.Jira DEBUG Request: {"method": "GET", "url": "https://<JIRA_CLOUD_HOST>/rest/api/3/issuetype/project", "params": {"projectId": "10784"}, "body": {}}
2022-11-14 05:10:54,957 urllib3.connectionpool DEBUG https://<JIRA_CLOUD_HOST>:443 "GET /rest/api/3/issuetype/project?projectId=10784 HTTP/1.1" 200 None
2022-11-14 05:10:54,959 tenable_jira.transform.Tio2Jira DEBUG Issuetypes standard={'name': 'Task', 'jira_id': 10002, 'type': 'standard', 'search': ['Tenable Plugin ID']}, subtask={'name': 'Sub-task', 'jira_id': 10200, 'type': 'subtask', 'search': ['Tenable Platform', 'Tenable Plugin ID', 'Tenable Asset UUID', 'Device IPv4 Addresses', 'Device IPv6 Addresses', 'Vulnerability Port', 'Vulnerability Protocol']}
2022-11-14 05:10:54,959 tenable_jira.transform.Tio2Jira INFO Using JIRA Screens [11038, 11039]
2022-11-14 05:10:54,959 tenable_jira.jira.Jira DEBUG Request: {"method": "GET", "url": "https://<JIRA_CLOUD_HOST>/rest/api/3/screens/11038/tabs", "params": {}, "body": {}}
2022-11-14 05:10:55,109 urllib3.connectionpool DEBUG https://<JIRA_CLOUD_HOST>:443 "GET /rest/api/3/screens/11038/tabs HTTP/1.1" 200 None
2022-11-14 05:10:55,113 tenable_jira.jira.Jira DEBUG Request: {"method": "GET", "url": "https://<JIRA_CLOUD_HOST>/rest/api/3/screens/11038/tabs/11150/fields", "params": {}, "body": {}}
2022-11-14 05:10:55,304 urllib3.connectionpool DEBUG https://<JIRA_CLOUD_HOST>:443 "GET /rest/api/3/screens/11038/tabs/11150/fields HTTP/1.1" 200 None
2022-11-14 05:10:55,307 tenable_jira.transform.Tio2Jira INFO CVEs already exists in 11038:11150
2022-11-14 05:10:55,308 tenable_jira.transform.Tio2Jira INFO Tenable VPR Score already exists in 11038:11150
2022-11-14 05:10:55,308 tenable_jira.transform.Tio2Jira INFO CVSSv2 Base Score already exists in 11038:11150
2022-11-14 05:10:55,308 tenable_jira.transform.Tio2Jira INFO CVSSv2 Temporal Score already exists in 11038:11150
2022-11-14 05:10:55,308 tenable_jira.transform.Tio2Jira INFO CVSSv3 Base Score already exists in 11038:11150
2022-11-14 05:10:55,308 tenable_jira.transform.Tio2Jira INFO CVSSv3 Temporal Score already exists in 11038:11150
2022-11-14 05:10:55,308 tenable_jira.transform.Tio2Jira INFO Tenable Plugin ID already exists in 11038:11150
2022-11-14 05:10:55,308 tenable_jira.transform.Tio2Jira INFO Tenable Plugin Family already exists in 11038:11150
2022-11-14 05:10:55,308 tenable_jira.transform.Tio2Jira INFO Tenable Plugin Name already exists in 11038:11150
2022-11-14 05:10:55,308 tenable_jira.transform.Tio2Jira INFO Vulnerability Severity already exists in 11038:11150
2022-11-14 05:10:55,308 tenable_jira.transform.Tio2Jira INFO Vulnerability First Seen already exists in 11038:11150
2022-11-14 05:10:55,308 tenable_jira.transform.Tio2Jira INFO Vulnerability Last Seen already exists in 11038:11150
2022-11-14 05:10:55,308 tenable_jira.transform.Tio2Jira INFO Vulnerability Last Fixed already exists in 11038:11150
2022-11-14 05:10:55,308 tenable_jira.transform.Tio2Jira INFO Vulnerability State already exists in 11038:11150
2022-11-14 05:10:55,308 tenable_jira.transform.Tio2Jira INFO Vulnerability Port already exists in 11038:11150
2022-11-14 05:10:55,308 tenable_jira.transform.Tio2Jira INFO Vulnerability Protocol already exists in 11038:11150
2022-11-14 05:10:55,308 tenable_jira.transform.Tio2Jira INFO Patch Publication Date already exists in 11038:11150
2022-11-14 05:10:55,308 tenable_jira.transform.Tio2Jira INFO Finding Severity already exists in 11038:11150
2022-11-14 05:10:55,308 tenable_jira.jira.Jira DEBUG Request: {"method": "GET", "url": "https://<JIRA_CLOUD_HOST>/rest/api/3/screens/11038/tabs/11151/fields", "params": {}, "body": {}}
2022-11-14 05:10:55,522 urllib3.connectionpool DEBUG https://<JIRA_CLOUD_HOST>:443 "GET /rest/api/3/screens/11038/tabs/11151/fields HTTP/1.1" 200 None
2022-11-14 05:10:55,523 tenable_jira.transform.Tio2Jira INFO Tenable Asset UUID already exists in 11038:11151
2022-11-14 05:10:55,523 tenable_jira.transform.Tio2Jira INFO Tenable Asset Tags already exists in 11038:11151
2022-11-14 05:10:55,523 tenable_jira.transform.Tio2Jira INFO Tenable Platform already exists in 11038:11151
2022-11-14 05:10:55,523 tenable_jira.transform.Tio2Jira INFO Device Hostname already exists in 11038:11151
2022-11-14 05:10:55,523 tenable_jira.transform.Tio2Jira INFO Device NetBIOS Name already exists in 11038:11151
2022-11-14 05:10:55,523 tenable_jira.transform.Tio2Jira INFO Device DNS Name already exists in 11038:11151
2022-11-14 05:10:55,523 tenable_jira.transform.Tio2Jira INFO Device IPv4 Addresses already exists in 11038:11151
2022-11-14 05:10:55,523 tenable_jira.transform.Tio2Jira INFO Device IPv6 Addresses already exists in 11038:11151
2022-11-14 05:10:55,523 tenable_jira.transform.Tio2Jira INFO Device MAC Addresses already exists in 11038:11151
2022-11-14 05:10:55,523 tenable_jira.transform.Tio2Jira INFO Device Network ID already exists in 11038:11151
2022-11-14 05:10:55,524 tenable_jira.transform.Tio2Jira INFO Vulnerability Repository ID already exists in 11038:11151
2022-11-14 05:10:55,524 tenable_jira.transform.Tio2Jira INFO Vulnerability Repository Name already exists in 11038:11151
2022-11-14 05:10:55,524 tenable_jira.jira.Jira DEBUG Request: {"method": "GET", "url": "https://<JIRA_CLOUD_HOST>/rest/api/3/screens/11039/tabs", "params": {}, "body": {}}
2022-11-14 05:10:55,650 urllib3.connectionpool DEBUG https://<JIRA_CLOUD_HOST>:443 "GET /rest/api/3/screens/11039/tabs HTTP/1.1" 200 None
2022-11-14 05:10:55,654 tenable_jira.jira.Jira DEBUG Request: {"method": "GET", "url": "https://<JIRA_CLOUD_HOST>/rest/api/3/screens/11039/tabs/11152/fields", "params": {}, "body": {}}
2022-11-14 05:10:55,844 urllib3.connectionpool DEBUG https://<JIRA_CLOUD_HOST>:443 "GET /rest/api/3/screens/11039/tabs/11152/fields HTTP/1.1" 200 None
2022-11-14 05:10:55,846 tenable_jira.transform.Tio2Jira INFO CVEs already exists in 11039:11152
2022-11-14 05:10:55,846 tenable_jira.transform.Tio2Jira INFO Tenable VPR Score already exists in 11039:11152
2022-11-14 05:10:55,846 tenable_jira.transform.Tio2Jira INFO CVSSv2 Base Score already exists in 11039:11152
2022-11-14 05:10:55,846 tenable_jira.transform.Tio2Jira INFO CVSSv2 Temporal Score already exists in 11039:11152
2022-11-14 05:10:55,846 tenable_jira.transform.Tio2Jira INFO CVSSv3 Base Score already exists in 11039:11152
2022-11-14 05:10:55,846 tenable_jira.transform.Tio2Jira INFO CVSSv3 Temporal Score already exists in 11039:11152
2022-11-14 05:10:55,846 tenable_jira.transform.Tio2Jira INFO Tenable Plugin ID already exists in 11039:11152
2022-11-14 05:10:55,846 tenable_jira.transform.Tio2Jira INFO Tenable Plugin Family already exists in 11039:11152
2022-11-14 05:10:55,846 tenable_jira.transform.Tio2Jira INFO Tenable Plugin Name already exists in 11039:11152
2022-11-14 05:10:55,846 tenable_jira.transform.Tio2Jira INFO Vulnerability Severity already exists in 11039:11152
2022-11-14 05:10:55,847 tenable_jira.transform.Tio2Jira INFO Vulnerability First Seen already exists in 11039:11152
2022-11-14 05:10:55,847 tenable_jira.transform.Tio2Jira INFO Vulnerability Last Seen already exists in 11039:11152
2022-11-14 05:10:55,847 tenable_jira.transform.Tio2Jira INFO Vulnerability Last Fixed already exists in 11039:11152
2022-11-14 05:10:55,847 tenable_jira.transform.Tio2Jira INFO Vulnerability State already exists in 11039:11152
2022-11-14 05:10:55,847 tenable_jira.transform.Tio2Jira INFO Vulnerability Port already exists in 11039:11152
2022-11-14 05:10:55,847 tenable_jira.transform.Tio2Jira INFO Vulnerability Protocol already exists in 11039:11152
2022-11-14 05:10:55,847 tenable_jira.transform.Tio2Jira INFO Patch Publication Date already exists in 11039:11152
2022-11-14 05:10:55,847 tenable_jira.transform.Tio2Jira INFO Finding Severity already exists in 11039:11152
2022-11-14 05:10:55,847 tenable_jira.jira.Jira DEBUG Request: {"method": "GET", "url": "https://<JIRA_CLOUD_HOST>/rest/api/3/screens/11039/tabs/11153/fields", "params": {}, "body": {}}
2022-11-14 05:10:56,030 urllib3.connectionpool DEBUG https://<JIRA_CLOUD_HOST>:443 "GET /rest/api/3/screens/11039/tabs/11153/fields HTTP/1.1" 200 None
2022-11-14 05:10:56,032 tenable_jira.transform.Tio2Jira INFO Tenable Asset UUID already exists in 11039:11153
2022-11-14 05:10:56,032 tenable_jira.transform.Tio2Jira INFO Tenable Asset Tags already exists in 11039:11153
2022-11-14 05:10:56,032 tenable_jira.transform.Tio2Jira INFO Tenable Platform already exists in 11039:11153
2022-11-14 05:10:56,032 tenable_jira.transform.Tio2Jira INFO Device Hostname already exists in 11039:11153
2022-11-14 05:10:56,032 tenable_jira.transform.Tio2Jira INFO Device NetBIOS Name already exists in 11039:11153
2022-11-14 05:10:56,032 tenable_jira.transform.Tio2Jira INFO Device DNS Name already exists in 11039:11153
2022-11-14 05:10:56,032 tenable_jira.transform.Tio2Jira INFO Device IPv4 Addresses already exists in 11039:11153
2022-11-14 05:10:56,032 tenable_jira.transform.Tio2Jira INFO Device IPv6 Addresses already exists in 11039:11153
2022-11-14 05:10:56,032 tenable_jira.transform.Tio2Jira INFO Device MAC Addresses already exists in 11039:11153
2022-11-14 05:10:56,032 tenable_jira.transform.Tio2Jira INFO Device Network ID already exists in 11039:11153
2022-11-14 05:10:56,032 tenable_jira.transform.Tio2Jira INFO Vulnerability Repository ID already exists in 11039:11153
2022-11-14 05:10:56,032 tenable_jira.transform.Tio2Jira INFO Vulnerability Repository Name already exists in 11039:11153
2022-11-14 05:10:56,033 tenable.io.TenableIO DEBUG Request: {"method": "POST", "url": "https://cloud.tenable.com/assets/export", "params": {}, "body": {"chunk_size": 1000, "filters": {"updated_at": 1660626653}}}
2022-11-14 05:10:56,714 urllib3.connectionpool DEBUG https://cloud.tenable.com:443 "POST /assets/export HTTP/1.1" 200 54
2022-11-14 05:10:56,716 tenable.io.TenableIO DEBUG assets export job a374a662-9fae-428b-8be8-58b85918cecd initiated
2022-11-14 05:10:56,716 tenable.io.TenableIO DEBUG Request: {"method": "POST", "url": "https://cloud.tenable.com/assets/export", "params": {}, "body": {"chunk_size": 1000, "filters": {"deleted_at": 1660626653}}}
2022-11-14 05:10:57,984 urllib3.connectionpool DEBUG https://cloud.tenable.com:443 "POST /assets/export HTTP/1.1" 200 54
2022-11-14 05:10:57,985 tenable.io.TenableIO DEBUG assets export job 21881215-ec6f-4fd4-92d2-10bf6f57a97b initiated
2022-11-14 05:10:57,986 tenable.io.TenableIO DEBUG Request: {"method": "POST", "url": "https://cloud.tenable.com/assets/export", "params": {}, "body": {"chunk_size": 1000, "filters": {"terminated_at": 1660626653}}}
2022-11-14 05:10:59,602 urllib3.connectionpool DEBUG https://cloud.tenable.com:443 "POST /assets/export HTTP/1.1" 200 54
2022-11-14 05:10:59,603 tenable.io.TenableIO DEBUG assets export job a5ee3059-6474-439a-bac3-61b104eb6431 initiated
2022-11-14 05:10:59,603 tenable.io.TenableIO DEBUG Request: {"method": "GET", "url": "https://cloud.tenable.com/assets/export/a5ee3059-6474-439a-bac3-61b104eb6431/status", "params": {}, "body": {}}
2022-11-14 05:10:59,792 urllib3.connectionpool DEBUG https://cloud.tenable.com:443 "GET /assets/export/a5ee3059-6474-439a-bac3-61b104eb6431/status HTTP/1.1" 200 45
2022-11-14 05:10:59,793 tenable.io.exports.iterator.ExportsIterator DEBUG assets export a5ee3059-6474-439a-bac3-61b104eb6431 is currenty PROCESSING
2022-11-14 05:11:01,795 tenable.io.TenableIO DEBUG Request: {"method": "GET", "url": "https://cloud.tenable.com/assets/export/a5ee3059-6474-439a-bac3-61b104eb6431/status", "params": {}, "body": {}}
2022-11-14 05:11:01,951 urllib3.connectionpool DEBUG https://cloud.tenable.com:443 "GET /assets/export/a5ee3059-6474-439a-bac3-61b104eb6431/status HTTP/1.1" 200 44
2022-11-14 05:11:01,952 tenable.io.exports.iterator.ExportsIterator DEBUG assets export a5ee3059-6474-439a-bac3-61b104eb6431 is currenty FINISHED
2022-11-14 05:11:01,953 tenable.io.exports.iterator.ExportsIterator DEBUG {'status': 'FINISHED', 'chunks_available': [1], 'chunks_unfinished': [1]} and [1]
2022-11-14 05:11:01,953 tenable.io.TenableIO DEBUG Request: {"method": "GET", "url": "https://cloud.tenable.com/assets/export/a5ee3059-6474-439a-bac3-61b104eb6431/chunks/1", "params": {}, "body": {}}
2022-11-14 05:11:03,262 urllib3.connectionpool DEBUG https://cloud.tenable.com:443 "GET /assets/export/a5ee3059-6474-439a-bac3-61b104eb6431/chunks/1 HTTP/1.1" 200 None
2022-11-14 05:11:03,263 tenable.io.TenableIO DEBUG Request: {"method": "GET", "url": "https://cloud.tenable.com/assets/export/a5ee3059-6474-439a-bac3-61b104eb6431/status", "params": {}, "body": {}}
2022-11-14 05:11:04,354 urllib3.connectionpool DEBUG https://cloud.tenable.com:443 "GET /assets/export/a5ee3059-6474-439a-bac3-61b104eb6431/status HTTP/1.1" 200 44
2022-11-14 05:11:04,355 tenable.io.exports.iterator.ExportsIterator DEBUG assets export a5ee3059-6474-439a-bac3-61b104eb6431 is currenty FINISHED
2022-11-14 05:11:04,355 tenable.io.exports.iterator.ExportsIterator DEBUG {'status': 'FINISHED', 'chunks_available': [1], 'chunks_unfinished': []} and []
2022-11-14 05:11:04,355 tenable.io.TenableIO DEBUG Request: {"method": "GET", "url": "https://cloud.tenable.com/assets/export/21881215-ec6f-4fd4-92d2-10bf6f57a97b/status", "params": {}, "body": {}}
2022-11-14 05:11:05,565 urllib3.connectionpool DEBUG https://cloud.tenable.com:443 "GET /assets/export/21881215-ec6f-4fd4-92d2-10bf6f57a97b/status HTTP/1.1" 200 43
2022-11-14 05:11:05,566 tenable.io.exports.iterator.ExportsIterator DEBUG assets export 21881215-ec6f-4fd4-92d2-10bf6f57a97b is currenty FINISHED
2022-11-14 05:11:05,567 tenable.io.exports.iterator.ExportsIterator DEBUG {'status': 'FINISHED', 'chunks_available': [], 'chunks_unfinished': []} and []
2022-11-14 05:11:05,567 tenable.io.TenableIO DEBUG Request: {"method": "GET", "url": "https://cloud.tenable.com/assets/export/a374a662-9fae-428b-8be8-58b85918cecd/status", "params": {}, "body": {}}
2022-11-14 05:11:06,782 urllib3.connectionpool DEBUG https://cloud.tenable.com:443 "GET /assets/export/a374a662-9fae-428b-8be8-58b85918cecd/status HTTP/1.1" 200 44
2022-11-14 05:11:06,783 tenable.io.exports.iterator.ExportsIterator DEBUG assets export a374a662-9fae-428b-8be8-58b85918cecd is currenty FINISHED
2022-11-14 05:11:06,783 tenable.io.exports.iterator.ExportsIterator DEBUG {'status': 'FINISHED', 'chunks_available': [1], 'chunks_unfinished': [1]} and [1]
2022-11-14 05:11:06,783 tenable.io.TenableIO DEBUG Request: {"method": "GET", "url": "https://cloud.tenable.com/assets/export/a374a662-9fae-428b-8be8-58b85918cecd/chunks/1", "params": {}, "body": {}}
2022-11-14 05:11:08,056 urllib3.connectionpool DEBUG https://cloud.tenable.com:443 "GET /assets/export/a374a662-9fae-428b-8be8-58b85918cecd/chunks/1 HTTP/1.1" 200 None
2022-11-14 05:11:08,058 tenable.io.TenableIO DEBUG Request: {"method": "GET", "url": "https://cloud.tenable.com/assets/export/a374a662-9fae-428b-8be8-58b85918cecd/status", "params": {}, "body": {}}
2022-11-14 05:11:09,165 urllib3.connectionpool DEBUG https://cloud.tenable.com:443 "GET /assets/export/a374a662-9fae-428b-8be8-58b85918cecd/status HTTP/1.1" 200 44
2022-11-14 05:11:09,166 tenable.io.exports.iterator.ExportsIterator DEBUG assets export a374a662-9fae-428b-8be8-58b85918cecd is currenty FINISHED
2022-11-14 05:11:09,167 tenable.io.exports.iterator.ExportsIterator DEBUG {'status': 'FINISHED', 'chunks_available': [1], 'chunks_unfinished': []} and []
2022-11-14 05:11:09,167 tenable_jira.transform.Tio2Jira INFO Updating and creating issues marked as Open
2022-11-14 05:11:09,167 tenable.io.TenableIO DEBUG Request: {"method": "POST", "url": "https://cloud.tenable.com/vulns/export", "params": {}, "body": {"num_assets": 1000, "include_unlicensed": true, "filters": {"first_found": 1660626653, "severity": ["high", "critical"]}}}
2022-11-14 05:11:10,365 urllib3.connectionpool DEBUG https://cloud.tenable.com:443 "POST /vulns/export HTTP/1.1" 200 54
2022-11-14 05:11:10,367 tenable.io.TenableIO DEBUG vulns export job 2a3d10e1-8873-4cec-ae58-342c8f053419 initiated
2022-11-14 05:11:10,367 tenable.io.TenableIO DEBUG Request: {"method": "GET", "url": "https://cloud.tenable.com/vulns/export/2a3d10e1-8873-4cec-ae58-342c8f053419/status", "params": {}, "body": {}}
2022-11-14 05:11:11,577 urllib3.connectionpool DEBUG https://cloud.tenable.com:443 "GET /vulns/export/2a3d10e1-8873-4cec-ae58-342c8f053419/status HTTP/1.1" 200 461
2022-11-14 05:11:11,578 tenable.io.exports.iterator.ExportsIterator DEBUG vulns export 2a3d10e1-8873-4cec-ae58-342c8f053419 is currenty PROCESSING
2022-11-14 05:11:13,581 tenable.io.TenableIO DEBUG Request: {"method": "GET", "url": "https://cloud.tenable.com/vulns/export/2a3d10e1-8873-4cec-ae58-342c8f053419/status", "params": {}, "body": {}}
2022-11-14 05:11:13,776 urllib3.connectionpool DEBUG https://cloud.tenable.com:443 "GET /vulns/export/2a3d10e1-8873-4cec-ae58-342c8f053419/status HTTP/1.1" 200 460
2022-11-14 05:11:13,777 tenable.io.exports.iterator.ExportsIterator DEBUG vulns export 2a3d10e1-8873-4cec-ae58-342c8f053419 is currenty FINISHED
2022-11-14 05:11:13,777 tenable.io.exports.iterator.ExportsIterator DEBUG {'uuid': '2a3d10e1-8873-4cec-ae58-342c8f053419', 'status': 'FINISHED', 'chunks_available': [1], 'chunks_failed': [], 'chunks_cancelled': [], 'total_chunks': 1, 'chunks_available_count': 1, 'empty_chunks_count': 0, 'finished_chunks': 1, 'filters': {'severity': ['HIGH', 'CRITICAL'], 'state': ['OPEN', 'REOPENED'], 'tags': {}, 'since': 0, 'first_found': 1660626653, 'last_found': 0, 'last_fixed': 0, 'first_seen': 0, 'last_seen': 0, 'indexed_at': 0}, 'num_assets_per_chunk': 1000, 'created': 1668402670325, 'chunks_unfinished': [1]} and [1]
2022-11-14 05:11:13,777 tenable.io.TenableIO DEBUG Request: {"method": "GET", "url": "https://cloud.tenable.com/vulns/export/2a3d10e1-8873-4cec-ae58-342c8f053419/chunks/1", "params": {}, "body": {}}
2022-11-14 05:11:15,406 urllib3.connectionpool DEBUG https://cloud.tenable.com:443 "GET /vulns/export/2a3d10e1-8873-4cec-ae58-342c8f053419/chunks/1 HTTP/1.1" 200 32363
2022-11-14 05:11:15,407 tenable_jira.transform.Tio2Jira DEBUG Setting Vuln Sev to high
2022-11-14 05:11:15,408 tenable_jira.transform.Tio2Jira DEBUG Setting Finding Sev to high
2022-11-14 05:11:15,411 tenable_jira.jira.Jira DEBUG Request: {"method": "POST", "url": "https://<JIRA_CLOUD_HOST>/rest/api/3/search", "params": {}, "body": {"jql": "project = \"VULN\" and issuetype = \"Task\" and status not in (Closed, Done, Resolved) and \"Tenable Plugin ID\" ~ \"139574\""}}
2022-11-14 05:11:15,703 urllib3.connectionpool DEBUG https://<JIRA_CLOUD_HOST>:443 "POST /rest/api/3/search HTTP/1.1" 200 None
2022-11-14 05:11:15,707 tenable_jira.jira.Jira DEBUG Request: {"method": "POST", "url": "https://<JIRA_CLOUD_HOST>/rest/api/3/issue", "params": {"update_history": false}, "body": {"fields": {"project": {"key": "VULN"}, "issuetype": {"id": 10002}, "customfield_11063": ["CVE-2020-11984", "CVE-2020-11993", "CVE-2020-9490"], "customfield_11064": "7.5", "customfield_11065": "5.9", "customfield_11066": "9.8", "customfield_11067": "8.8", "customfield_11019": "2020-08-07T00:00:00Z", "customfield_11068": "139574", "customfield_11069": "Web Servers", "customfield_11070": "Apache 2.4.x < 2.4.46 Multiple Vulnerabilities", "priority": {"id": "2"}, "customfield_11071": "High", "customfield_11088": "6.7", "summary": "[139574] Apache 2.4.x < 2.4.46 Multiple Vulnerabilities", "description": {"version": 1, "type": "doc", "content": [{"type": "heading", "attrs": {"level": 1}, "content": [{"type": "text", "text": "Description"}]}, {"type": "paragraph", "content": [{"type": "text", "text": "The version of Apache httpd installed on the remote host is prior to 2.4.46. It is, therefore, affected by multiple vulnerabilities as referenced in the 2.4.46 advisory.\n\n  - Apache HTTP server 2.4.32 to 2.4.44 mod_proxy_uwsgi info     disclosure and possible RCE (CVE-2020-11984)\n\n  - Apache HTTP Server versions 2.4.20 to 2.4.43 When     trace/debug was enabled for the HTTP/2 module and on     certain traffic edge patterns, logging statements were     made on the wrong connection, causing concurrent use of     memory pools. Configuring the LogLevel of mod_http2     above info will mitigate this vulnerability for     unpatched servers. (CVE-2020-11993)\n\n  - Apache HTTP Server versions 2.4.20 to 2.4.43. A     specially crafted value for the 'Cache-Digest' header in     a HTTP/2 request would result in a crash when the server     actually tries to HTTP/2 PUSH a resource afterwards.\n    Configuring the HTTP/2 feature via H2Push off will     mitigate this vulnerability for unpatched servers.\n    (CVE-2020-9490)\n\nNote that Nessus has not tested for this issue but has instead relied only on the application's self-reported version number. "}]}, {"type": "heading", "attrs": {"level": 1}, "content": [{"type": "text", "text": "Solution"}]}, {"type": "paragraph", "content": [{"type": "text", "text": "Upgrade to Apache version 2.4.46 or later. "}]}]}}}}
2022-11-14 05:11:16,119 urllib3.connectionpool DEBUG https://<JIRA_CLOUD_HOST>:443 "POST /rest/api/3/issue?update_history=False HTTP/1.1" 400 None
2022-11-14 05:11:16,122 restfly.errors.BadRequestError ERROR [400: POST] https://<JIRA_CLOUD_HOST>/rest/api/3/issue?update_history=False body=b'{"errorMessages":[],"errors":{"priority":"The priority selected is invalid."}}'
2022-11-14 05:11:16,123 root ERROR Caught the following Exception
Traceback (most recent call last):
  File "/home/ubuntu/.local/lib/python3.10/site-packages/tenable_jira/transform.py", line 409, in _process_open_vuln
    i = self._jira.issues.upsert(fields=issue, jql=' and '.join(jql))
  File "/home/ubuntu/.local/lib/python3.10/site-packages/tenable_jira/jira/issues.py", line 48, in upsert
    issue = self.create(**kwargs)
  File "/home/ubuntu/.local/lib/python3.10/site-packages/tenable_jira/jira/issues.py", line 18, in create
    return self._api.post('issue',
  File "/usr/local/lib/python3.10/dist-packages/restfly/session.py", line 631, in post
    return self._req('POST', path, **kwargs)
  File "/usr/local/lib/python3.10/dist-packages/restfly/session.py", line 559, in _req
    raise error_resp
restfly.errors.BadRequestError: [400: POST] https://<JIRA_CLOUD_HOST>/rest/api/3/issue?update_history=False body=b'{"errorMessages":[],"errors":{"priority":"The priority selected is invalid."}}'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/ubuntu/.local/lib/python3.10/site-packages/tenable_jira/cli.py", line 156, in cli
    ingest.ingest(int(observed_since), first_discovery)
  File "/home/ubuntu/.local/lib/python3.10/site-packages/tenable_jira/transform.py", line 670, in ingest
    self.create_issues(self._src.exports.vulns(**vexport))
  File "/home/ubuntu/.local/lib/python3.10/site-packages/tenable_jira/transform.py", line 529, in create_issues
    self._process_open_vuln(v, fid)
  File "/home/ubuntu/.local/lib/python3.10/site-packages/tenable_jira/transform.py", line 412, in _process_open_vuln
    sys.exit(2)
SystemExit: 2

Available IssueTypes

10458: Subtask
10455: Subtask
10497: Sub-task
10516: Subtask
10487: Subtask
10479: Subtask
10436: Subtask
10499: Sub-task
10475: Subtask
10510: Sub-task
10504: Subtask
10467: Subtask
10513: Subtask
10200: Sub-task
10472: Task
10465: Task
10456: Task
10496: Task
10501: Task
10498: Task
10511: Task
10453: Task
10434: Task
10002: Task
10477: Task
10509: Task
10485: Task
10514: Task
jkuangForge commented 1 year ago

Resolved.

It was missing severity_prioritization under tenable in the config file. the number is based on our jira.

  severity_prioritization:
    critical: 10000
    high: 10001
    medium: 10002
    low: 10003