tenable / integration-jira-cloud

68 stars 52 forks source link

Jira Cloud not creating custom fields #156

Closed MSSP-BLKing closed 2 years ago

MSSP-BLKing commented 2 years ago

I'm getting this error in the logs for my first run. The project was created but it appears as though no data is being loaded.

'''2022-01-05 13:44:34,683 restfly.errors.BadRequestError ERROR [400: POST] https://companyname.atlassian.net/rest/api/3/issue?update_history=False body=b'{"errorMessages":[],"errors":{"customfield_10853":"Field \'customfield_10853\' cannot be set. It is not on the appropriate screen, or unknown.","customfield_10854":"Field \'customfield_10854\' cannot be set. It is not on the appropriate screen, or unknown.","customfield_10855":"Field \'customfield_10855\' cannot be set. It is not on the appropriate screen, or unknown.","customfield_10856":"Field \'customfield_10856\' cannot be set. It is not on the appropriate screen, or unknown.","customfield_10857":"Field \'customfield_10857\' cannot be set. It is not on the appropriate screen, or unknown.","customfield_10858":"Field \'customfield_10858\' cannot be set. It is not on the appropriate screen, or unknown.","customfield_10859":"Field \'customfield_10859\' cannot be set. It is not on the appropriate screen, or unknown.","customfield_10881":"Field \'customfield_10881\' cannot be set. It is not on the appropriate screen, or unknown.","customfield_10860":"Field \'customfield_10860\' cannot be set. It is not on the appropriate screen, or unknown.","customfield_10861":"Field \'customfield_10861\' cannot be set. It is not on the appropriate screen, or unknown.","customfield_10862":"Field \'customfield_10862\' cannot be set. It is not on the appropriate screen, or unknown."}}''''

SteveMcGrath commented 2 years ago

can you please run with the --troubleshoot flag and post the output?

MSSP-BLKing commented 2 years ago

Configuration File:

jira:
  address: <REDACTED>
  api_token: <REDACTED>
  api_username: <REDACTED>
log:
  filename: /tmp/nessusjira.log
  format: '%(asctime)-15s %(name)s %(levelname)s %(message)s'
  level: 30
project:
  leadAccountId: <REDACTED>
service:
  interval: 0
tenable:
  access_key: <REDACTED>
  secret_key: <REDACTED>

Debug Logs

2022-01-06 10:52:31,733 root INFO Tenable2JiraCloud Version 1.2.3
2022-01-06 10:52:31,733 root INFO Using configuration file ody.yaml
2022-01-06 10:52:31,736 root INFO Running on Python3.9.7Linux/x86_64
2022-01-06 10:52:31,736 root DEBUG Severity Prioritization set to: {'critical': 1, 'high': 2, 'medium': 3, 'low': 4}
2022-01-06 10:52:31,737 tenable.io.TenableIO DEBUG Request: {"method": "GET", "url": "https://cloud.tenable.com/session", "params": {}, "body": {}}
2022-01-06 10:52:31,739 urllib3.connectionpool DEBUG Starting new HTTPS connection (1): cloud.tenable.com:443
2022-01-06 10:52:32,427 urllib3.connectionpool DEBUG https://cloud.tenable.com:443 "GET /session HTTP/1.1" 200 None
2022-01-06 10:52:32,428 tenable_jira.jira.Jira DEBUG Request: {"method": "GET", "url": "https://<JIRA_CLOUD_HOST>/rest/api/3/project/VULN", "params": {}, "body": {}}
2022-01-06 10:52:32,430 urllib3.connectionpool DEBUG Starting new HTTPS connection (1): <JIRA_CLOUD_HOST>:443
2022-01-06 10:52:33,031 urllib3.connectionpool DEBUG https://<JIRA_CLOUD_HOST>:443 "GET /rest/api/3/project/VULN HTTP/1.1" 200 None
2022-01-06 10:52:33,034 tenable_jira.jira.Jira DEBUG Request: {"method": "GET", "url": "https://<JIRA_CLOUD_HOST>/rest/api/3/field", "params": {}, "body": {}}
2022-01-06 10:52:33,309 urllib3.connectionpool DEBUG https://<JIRA_CLOUD_HOST>:443 "GET /rest/api/3/field HTTP/1.1" 200 None
2022-01-06 10:52:33,315 tenable_jira.jira.Jira INFO Tenable Platform is customfield_10852 (existing)
2022-01-06 10:52:33,315 tenable_jira.jira.Jira INFO CVEs is customfield_10853 (existing)
2022-01-06 10:52:33,315 tenable_jira.jira.Jira INFO CVSSv2 Base Score is customfield_10854 (existing)
2022-01-06 10:52:33,315 tenable_jira.jira.Jira INFO CVSSv2 Temporal Score is customfield_10855 (existing)
2022-01-06 10:52:33,315 tenable_jira.jira.Jira INFO CVSSv3 Base Score is customfield_10856 (existing)
2022-01-06 10:52:33,315 tenable_jira.jira.Jira INFO CVSSv3 Temporal Score is customfield_10857 (existing)
2022-01-06 10:52:33,315 tenable_jira.jira.Jira INFO Patch Publication Date is customfield_10858 (existing)
2022-01-06 10:52:33,315 tenable_jira.jira.Jira INFO Tenable Plugin ID is customfield_10859 (existing)
2022-01-06 10:52:33,315 tenable_jira.jira.Jira INFO Tenable Plugin Family is customfield_10860 (existing)
2022-01-06 10:52:33,315 tenable_jira.jira.Jira INFO Tenable Plugin Name is customfield_10861 (existing)
2022-01-06 10:52:33,315 tenable_jira.jira.Jira INFO Vulnerability Severity is customfield_10862 (existing)
2022-01-06 10:52:33,315 tenable_jira.jira.Jira INFO Finding Severity is customfield_10863 (existing)
2022-01-06 10:52:33,315 tenable_jira.jira.Jira INFO Tenable Asset UUID is customfield_10864 (existing)
2022-01-06 10:52:33,315 tenable_jira.jira.Jira INFO Tenable Asset Tags is customfield_10865 (existing)
2022-01-06 10:52:33,315 tenable_jira.jira.Jira INFO Device MAC Addresses is customfield_10866 (existing)
2022-01-06 10:52:33,315 tenable_jira.jira.Jira INFO Device IPv4 Addresses is customfield_10867 (existing)
2022-01-06 10:52:33,315 tenable_jira.jira.Jira INFO Device IPv6 Addresses is customfield_10868 (existing)
2022-01-06 10:52:33,315 tenable_jira.jira.Jira INFO Device Hostname is customfield_10869 (existing)
2022-01-06 10:52:33,315 tenable_jira.jira.Jira INFO Device NetBIOS Name is customfield_10870 (existing)
2022-01-06 10:52:33,315 tenable_jira.jira.Jira INFO Device DNS Name is customfield_10871 (existing)
2022-01-06 10:52:33,315 tenable_jira.jira.Jira INFO Device Network ID is customfield_10872 (existing)
2022-01-06 10:52:33,315 tenable_jira.jira.Jira INFO Vulnerability First Seen is customfield_10873 (existing)
2022-01-06 10:52:33,315 tenable_jira.jira.Jira INFO Vulnerability Last Seen is customfield_10874 (existing)
2022-01-06 10:52:33,315 tenable_jira.jira.Jira INFO Vulnerability Last Fixed is customfield_10875 (existing)
2022-01-06 10:52:33,315 tenable_jira.jira.Jira INFO Vulnerability State is customfield_10876 (existing)
2022-01-06 10:52:33,315 tenable_jira.jira.Jira INFO Vulnerability Port is customfield_10877 (existing)
2022-01-06 10:52:33,316 tenable_jira.jira.Jira INFO Vulnerability Protocol is customfield_10878 (existing)
2022-01-06 10:52:33,316 tenable_jira.jira.Jira INFO Vulnerability Repository ID is customfield_10879 (existing)
2022-01-06 10:52:33,316 tenable_jira.jira.Jira INFO Vulnerability Repository Name is customfield_10880 (existing)
2022-01-06 10:52:33,316 tenable_jira.jira.Jira INFO Tenable VPR Score is customfield_10881 (existing)
2022-01-06 10:52:33,316 tenable_jira.jira.Jira DEBUG Request: {"method": "GET", "url": "https://<JIRA_CLOUD_HOST>/rest/api/3/project/VULN", "params": {}, "body": {}}
2022-01-06 10:52:33,437 urllib3.connectionpool DEBUG https://<JIRA_CLOUD_HOST>:443 "GET /rest/api/3/project/VULN HTTP/1.1" 200 None
2022-01-06 10:52:33,438 tenable_jira.jira.Jira DEBUG Request: {"method": "GET", "url": "https://<JIRA_CLOUD_HOST>/rest/api/3/issuetype/project", "params": {"projectId": "10427"}, "body": {}}
2022-01-06 10:52:33,577 urllib3.connectionpool DEBUG https://<JIRA_CLOUD_HOST>:443 "GET /rest/api/3/issuetype/project?projectId=10427 HTTP/1.1" 200 None
2022-01-06 10:52:33,577 tenable_jira.transform.Tio2Jira DEBUG Issuetypes standard={'name': 'Task', 'jira_id': 10002, 'type': 'standard', 'search': ['Tenable Plugin ID']}, subtask={'name': 'Sub-task', 'jira_id': 10003, 'type': 'subtask', 'search': ['Tenable Platform', 'Tenable Plugin ID', 'Tenable Asset UUID', 'Vulnerability Port', 'Vulnerability Protocol']}
2022-01-06 10:52:33,577 tenable_jira.jira.Jira DEBUG Request: {"method": "GET", "url": "https://<JIRA_CLOUD_HOST>/rest/api/3/screens", "params": {"startAt": -100, "maxResults": 100}, "body": {}}
2022-01-06 10:52:33,716 urllib3.connectionpool DEBUG https://<JIRA_CLOUD_HOST>:443 "GET /rest/api/3/screens?startAt=-100&maxResults=100 HTTP/1.1" 200 None
2022-01-06 10:52:33,720 tenable_jira.jira.Jira DEBUG Request: {"method": "GET", "url": "https://<JIRA_CLOUD_HOST>/rest/api/3/screens", "params": {"startAt": 0, "maxResults": 100}, "body": {}}
2022-01-06 10:52:33,910 urllib3.connectionpool DEBUG https://<JIRA_CLOUD_HOST>:443 "GET /rest/api/3/screens?startAt=0&maxResults=100 HTTP/1.1" 200 None
2022-01-06 10:52:33,915 tenable_jira.transform.Tio2Jira INFO Using JIRA Screens []
2022-01-06 10:52:33,915 tenable.io.TenableIO DEBUG Request: {"method": "POST", "url": "https://cloud.tenable.com/assets/export", "params": {}, "body": {"chunk_size": 1000, "filters": {"updated_at": 1638853200}}}
2022-01-06 10:52:34,909 urllib3.connectionpool DEBUG https://cloud.tenable.com:443 "POST /assets/export HTTP/1.1" 200 54
2022-01-06 10:52:34,910 tenable.io.TenableIO DEBUG assets export job be7c08c7-c1d2-41b2-b104-229e91a517ef initiated
2022-01-06 10:52:34,911 tenable.io.TenableIO DEBUG Request: {"method": "POST", "url": "https://cloud.tenable.com/assets/export", "params": {}, "body": {"chunk_size": 1000, "filters": {"deleted_at": 1638853200}}}
2022-01-06 10:52:35,910 urllib3.connectionpool DEBUG https://cloud.tenable.com:443 "POST /assets/export HTTP/1.1" 200 54
2022-01-06 10:52:35,911 tenable.io.TenableIO DEBUG assets export job dfb4af01-d4fe-4e69-9085-b4ca5c813ac7 initiated
2022-01-06 10:52:35,911 tenable.io.TenableIO DEBUG Request: {"method": "POST", "url": "https://cloud.tenable.com/assets/export", "params": {}, "body": {"chunk_size": 1000, "filters": {"terminated_at": 1638853200}}}
2022-01-06 10:52:36,542 urllib3.connectionpool DEBUG https://cloud.tenable.com:443 "POST /assets/export HTTP/1.1" 200 54
2022-01-06 10:52:36,542 tenable.io.TenableIO DEBUG assets export job 46c487d6-50d0-48d6-9970-f4e10ef62ce4 initiated
2022-01-06 10:52:36,543 tenable.io.TenableIO DEBUG Request: {"method": "GET", "url": "https://cloud.tenable.com/assets/export/46c487d6-50d0-48d6-9970-f4e10ef62ce4/status", "params": {}, "body": {}}
2022-01-06 10:52:37,683 urllib3.connectionpool DEBUG https://cloud.tenable.com:443 "GET /assets/export/46c487d6-50d0-48d6-9970-f4e10ef62ce4/status HTTP/1.1" 200 43
2022-01-06 10:52:37,683 tenable.io.exports.iterator.ExportsIterator DEBUG assets export 46c487d6-50d0-48d6-9970-f4e10ef62ce4 is currenty FINISHED
2022-01-06 10:52:37,684 tenable.io.exports.iterator.ExportsIterator DEBUG {'status': 'FINISHED', 'chunks_available': [], 'chunks_unfinished': []} and []
2022-01-06 10:52:37,684 tenable.io.TenableIO DEBUG Request: {"method": "GET", "url": "https://cloud.tenable.com/assets/export/dfb4af01-d4fe-4e69-9085-b4ca5c813ac7/status", "params": {}, "body": {}}
2022-01-06 10:52:38,944 urllib3.connectionpool DEBUG https://cloud.tenable.com:443 "GET /assets/export/dfb4af01-d4fe-4e69-9085-b4ca5c813ac7/status HTTP/1.1" 200 44
2022-01-06 10:52:38,945 tenable.io.exports.iterator.ExportsIterator DEBUG assets export dfb4af01-d4fe-4e69-9085-b4ca5c813ac7 is currenty FINISHED
2022-01-06 10:52:38,945 tenable.io.exports.iterator.ExportsIterator DEBUG {'status': 'FINISHED', 'chunks_available': [1], 'chunks_unfinished': [1]} and [1]
2022-01-06 10:52:38,945 tenable.io.TenableIO DEBUG Request: {"method": "GET", "url": "https://cloud.tenable.com/assets/export/dfb4af01-d4fe-4e69-9085-b4ca5c813ac7/chunks/1", "params": {}, "body": {}}
2022-01-06 10:52:40,171 urllib3.connectionpool DEBUG https://cloud.tenable.com:443 "GET /assets/export/dfb4af01-d4fe-4e69-9085-b4ca5c813ac7/chunks/1 HTTP/1.1" 200 None
2022-01-06 10:52:40,172 tenable.io.TenableIO DEBUG Request: {"method": "GET", "url": "https://cloud.tenable.com/assets/export/dfb4af01-d4fe-4e69-9085-b4ca5c813ac7/status", "params": {}, "body": {}}
2022-01-06 10:52:41,310 urllib3.connectionpool DEBUG https://cloud.tenable.com:443 "GET /assets/export/dfb4af01-d4fe-4e69-9085-b4ca5c813ac7/status HTTP/1.1" 200 44
2022-01-06 10:52:41,311 tenable.io.exports.iterator.ExportsIterator DEBUG assets export dfb4af01-d4fe-4e69-9085-b4ca5c813ac7 is currenty FINISHED
2022-01-06 10:52:41,311 tenable.io.exports.iterator.ExportsIterator DEBUG {'status': 'FINISHED', 'chunks_available': [1], 'chunks_unfinished': []} and []
2022-01-06 10:52:41,311 tenable.io.TenableIO DEBUG Request: {"method": "GET", "url": "https://cloud.tenable.com/assets/export/be7c08c7-c1d2-41b2-b104-229e91a517ef/status", "params": {}, "body": {}}
2022-01-06 10:52:42,474 urllib3.connectionpool DEBUG https://cloud.tenable.com:443 "GET /assets/export/be7c08c7-c1d2-41b2-b104-229e91a517ef/status HTTP/1.1" 200 44
2022-01-06 10:52:42,475 tenable.io.exports.iterator.ExportsIterator DEBUG assets export be7c08c7-c1d2-41b2-b104-229e91a517ef is currenty FINISHED
2022-01-06 10:52:42,475 tenable.io.exports.iterator.ExportsIterator DEBUG {'status': 'FINISHED', 'chunks_available': [1], 'chunks_unfinished': [1]} and [1]
2022-01-06 10:52:42,475 tenable.io.TenableIO DEBUG Request: {"method": "GET", "url": "https://cloud.tenable.com/assets/export/be7c08c7-c1d2-41b2-b104-229e91a517ef/chunks/1", "params": {}, "body": {}}
2022-01-06 10:52:43,888 urllib3.connectionpool DEBUG https://cloud.tenable.com:443 "GET /assets/export/be7c08c7-c1d2-41b2-b104-229e91a517ef/chunks/1 HTTP/1.1" 200 None
2022-01-06 10:52:43,931 tenable.io.TenableIO DEBUG Request: {"method": "GET", "url": "https://cloud.tenable.com/assets/export/be7c08c7-c1d2-41b2-b104-229e91a517ef/status", "params": {}, "body": {}}
2022-01-06 10:52:44,888 urllib3.connectionpool DEBUG https://cloud.tenable.com:443 "GET /assets/export/be7c08c7-c1d2-41b2-b104-229e91a517ef/status HTTP/1.1" 200 44
2022-01-06 10:52:44,889 tenable.io.exports.iterator.ExportsIterator DEBUG assets export be7c08c7-c1d2-41b2-b104-229e91a517ef is currenty FINISHED
2022-01-06 10:52:44,889 tenable.io.exports.iterator.ExportsIterator DEBUG {'status': 'FINISHED', 'chunks_available': [1], 'chunks_unfinished': []} and []
2022-01-06 10:52:44,889 tenable_jira.transform.Tio2Jira INFO Updating and creating issues marked as Open
2022-01-06 10:52:44,890 tenable.io.TenableIO DEBUG Request: {"method": "POST", "url": "https://cloud.tenable.com/vulns/export", "params": {}, "body": {"num_assets": 1000, "include_unlicensed": true, "filters": {"last_found": 1638853200, "severity": ["high", "critical"]}}}
2022-01-06 10:52:46,089 urllib3.connectionpool DEBUG https://cloud.tenable.com:443 "POST /vulns/export HTTP/1.1" 200 54
2022-01-06 10:52:46,090 tenable.io.TenableIO DEBUG vulns export job b68dcc51-0864-4d2e-969e-07959eed2125 initiated
2022-01-06 10:52:46,090 tenable.io.TenableIO DEBUG Request: {"method": "GET", "url": "https://cloud.tenable.com/vulns/export/b68dcc51-0864-4d2e-969e-07959eed2125/status", "params": {}, "body": {}}
2022-01-06 10:52:47,315 urllib3.connectionpool DEBUG https://cloud.tenable.com:443 "GET /vulns/export/b68dcc51-0864-4d2e-969e-07959eed2125/status HTTP/1.1" 200 461
2022-01-06 10:52:47,317 tenable.io.exports.iterator.ExportsIterator DEBUG vulns export b68dcc51-0864-4d2e-969e-07959eed2125 is currenty PROCESSING
2022-01-06 10:52:49,319 tenable.io.TenableIO DEBUG Request: {"method": "GET", "url": "https://cloud.tenable.com/vulns/export/b68dcc51-0864-4d2e-969e-07959eed2125/status", "params": {}, "body": {}}
2022-01-06 10:52:49,497 urllib3.connectionpool DEBUG https://cloud.tenable.com:443 "GET /vulns/export/b68dcc51-0864-4d2e-969e-07959eed2125/status HTTP/1.1" 200 461
2022-01-06 10:52:49,499 tenable.io.exports.iterator.ExportsIterator DEBUG vulns export b68dcc51-0864-4d2e-969e-07959eed2125 is currenty PROCESSING
2022-01-06 10:52:52,501 tenable.io.TenableIO DEBUG Request: {"method": "GET", "url": "https://cloud.tenable.com/vulns/export/b68dcc51-0864-4d2e-969e-07959eed2125/status", "params": {}, "body": {}}
2022-01-06 10:52:52,710 urllib3.connectionpool DEBUG https://cloud.tenable.com:443 "GET /vulns/export/b68dcc51-0864-4d2e-969e-07959eed2125/status HTTP/1.1" 200 460
2022-01-06 10:52:52,713 tenable.io.exports.iterator.ExportsIterator DEBUG vulns export b68dcc51-0864-4d2e-969e-07959eed2125 is currenty FINISHED
2022-01-06 10:52:52,713 tenable.io.exports.iterator.ExportsIterator DEBUG {'uuid': 'b68dcc51-0864-4d2e-969e-07959eed2125', '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': 0, 'last_found': 1638853200, 'last_fixed': 0, 'first_seen': 0, 'last_seen': 0, 'indexed_at': 0}, 'num_assets_per_chunk': 1000, 'created': 1641484366046, 'chunks_unfinished': [1]} and [1]
2022-01-06 10:52:52,714 tenable.io.TenableIO DEBUG Request: {"method": "GET", "url": "https://cloud.tenable.com/vulns/export/b68dcc51-0864-4d2e-969e-07959eed2125/chunks/1", "params": {}, "body": {}}
2022-01-06 10:52:54,021 urllib3.connectionpool DEBUG https://cloud.tenable.com:443 "GET /vulns/export/b68dcc51-0864-4d2e-969e-07959eed2125/chunks/1 HTTP/1.1" 200 726839
2022-01-06 10:52:54,575 tenable_jira.transform.Tio2Jira DEBUG Setting Vuln Sev to critical
2022-01-06 10:52:54,575 tenable_jira.transform.Tio2Jira DEBUG Setting Finding Sev to critical
2022-01-06 10:52:54,587 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\" ~ \"156011\""}}
2022-01-06 10:52:54,838 urllib3.connectionpool DEBUG https://<JIRA_CLOUD_HOST>:443 "POST /rest/api/3/search HTTP/1.1" 200 None
2022-01-06 10:52:54,840 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_10853": ["CVE-2021-4052", "CVE-2021-4063", "CVE-2021-4053", "CVE-2021-4064", "CVE-2021-4061", "CVE-2021-4062", "CVE-2021-4056", "CVE-2021-4067", "CVE-2021-4057", "CVE-2021-4068", "CVE-2021-4054", "CVE-2021-4065", "CVE-2021-4055", "CVE-2021-4066", "CVE-2021-4058", "CVE-2021-4059"], "customfield_10854": "10.0", "customfield_10855": "7.4", "customfield_10856": "9.8", "customfield_10857": "8.5", "customfield_10858": "2021-12-10T00:00:00Z", "customfield_10859": "156011", "customfield_10860": "Windows", "customfield_10861": "Microsoft Edge (Chromium) < 96.0.1054.53 Multiple Vulnerabilities", "priority": {"id": "1"}, "customfield_10862": "Critical", "customfield_10881": "8.4", "summary": "[156011] Microsoft Edge (Chromium) < 96.0.1054.53 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 Microsoft Edge installed on the remote Windows host is prior to 96.0.1054.53. It is, therefore, affected by multiple vulnerabilities as referenced in the December 10, 2021 advisory.\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 Microsoft Edge version 96.0.1054.53 or later. "}]}]}}}}
2022-01-06 10:52:55,060 urllib3.connectionpool DEBUG https://<JIRA_CLOUD_HOST>:443 "POST /rest/api/3/issue?update_history=False HTTP/1.1" 400 None
2022-01-06 10:52:55,061 restfly.errors.BadRequestError ERROR [400: POST] https://<JIRA_CLOUD_HOST>/rest/api/3/issue?update_history=False body=b'{"errorMessages":[],"errors":{"customfield_10853":"Field \'customfield_10853\' cannot be set. It is not on the appropriate screen, or unknown.","customfield_10854":"Field \'customfield_10854\' cannot be set. It is not on the appropriate screen, or unknown.","customfield_10855":"Field \'customfield_10855\' cannot be set. It is not on the appropriate screen, or unknown.","customfield_10856":"Field \'customfield_10856\' cannot be set. It is not on the appropriate screen, or unknown.","customfield_10857":"Field \'customfield_10857\' cannot be set. It is not on the appropriate screen, or unknown.","customfield_10858":"Field \'customfield_10858\' cannot be set. It is not on the appropriate screen, or unknown.","customfield_10859":"Field \'customfield_10859\' cannot be set. It is not on the appropriate screen, or unknown.","customfield_10881":"Field \'customfield_10881\' cannot be set. It is not on the appropriate screen, or unknown.","customfield_10860":"Field \'customfield_10860\' cannot be set. It is not on the appropriate screen, or unknown.","customfield_10861":"Field \'customfield_10861\' cannot be set. It is not on the appropriate screen, or unknown.","customfield_10862":"Field \'customfield_10862\' cannot be set. It is not on the appropriate screen, or unknown."}}'
2022-01-06 10:52:55,061 root ERROR Caught the following Exception
Traceback (most recent call last):
  File "/home/bobbyking/.local/lib/python3.9/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/bobbyking/.local/lib/python3.9/site-packages/tenable_jira/jira/issues.py", line 48, in upsert
    issue = self.create(**kwargs)
  File "/home/bobbyking/.local/lib/python3.9/site-packages/tenable_jira/jira/issues.py", line 18, in create
    return self._api.post('issue',
  File "/home/bobbyking/.local/lib/python3.9/site-packages/restfly/session.py", line 631, in post
    return self._req('POST', path, **kwargs)
  File "/home/bobbyking/.local/lib/python3.9/site-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":{"customfield_10853":"Field \'customfield_10853\' cannot be set. It is not on the appropriate screen, or unknown.","customfield_10854":"Field \'customfield_10854\' cannot be set. It is not on the appropriate screen, or unknown.","customfield_10855":"Field \'customfield_10855\' cannot be set. It is not on the appropriate screen, or unknown.","customfield_10856":"Field \'customfield_10856\' cannot be set. It is not on the appropriate screen, or unknown.","customfield_10857":"Field \'customfield_10857\' cannot be set. It is not on the appropriate screen, or unknown.","customfield_10858":"Field \'customfield_10858\' cannot be set. It is not on the appropriate screen, or unknown.","customfield_10859":"Field \'customfield_10859\' cannot be set. It is not on the appropriate screen, or unknown.","customfield_10881":"Field \'customfield_10881\' cannot be set. It is not on the appropriate screen, or unknown.","customfield_10860":"Field \'customfield_10860\' cannot be set. It is not on the appropriate screen, or unknown.","customfield_10861":"Field \'customfield_10861\' cannot be set. It is not on the appropriate screen, or unknown.","customfield_10862":"Field \'customfield_10862\' cannot be set. It is not on the appropriate screen, or unknown."}}'

During handling of the above exception, another exception occurred:

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

Available IssueTypes

10003: Sub-task
10432: Subtask
10428: Subtask
10421: Subtask
10446: Subtask
10449: Subtask
10447: Task
10444: Task
10413: Task
10002: Task
10426: Task
10430: Task
/-------------------------------NOTICE-----------------------------------\ The output above is helpful for us to troubleshoot exactly what is happening within the code and offer a diagnosis for how to correct. Please note that while some basic redaction has already been performed that we ask you to review the information you're about to send and ensure that nothing deemed sensitive is transmitted.
-- Copy of output saved to "issue_debug.md"

------------------------------------------------------------------------/

codebop commented 2 years ago

In my Jira instance I am seeing that all the custom fields are being created, but they are not being associated with any of the VULN screens

djige-1111 commented 2 years ago

I am experiencing this issue too, have you been able to resolve it?

djige-1111 commented 2 years ago

I found the solution. Its a very painful process.You have to go to the Settings(gearbox at upper right of jira)-> issues -> custom fields(left side of screen). The you have to select every single custom field that tenable created and associate them with the screens that are in the screenshot attached

Screen Shot 2022-01-23 at 8 19 08 PM
SteveMcGrath commented 2 years ago

The actual solution is a bit more simple, and is on the main readme:

https://github.com/tenable/integration-jira-cloud/issues/23#issuecomment-604631753