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

Jira issue is not created #2099

Closed
catalinvr opened this issue Mar 23, 2020 · 8 comments
Closed

Jira issue is not created #2099

catalinvr opened this issue Mar 23, 2020 · 8 comments
Labels

Comments

@catalinvr
Copy link

Bug description
I team.

I'm having troubles with jira integration. Looks like findings are not sent to Jira, evet it was configured correctly.

Steps to reproduce
Steps to reproduce the behavior:

  1. Go to one finding
  2. Edit it
  3. Click on Push to jira
  4. I'm not able to find any Jira ticket and not able to find any errors into logs

Expected behavior
A Jira ticket is created.

Deployment method (select with an X)

  • [ X] Docker

Environment information

Sample scan files (optional)
NMAP simple scan

Screenshots (optional)
If applicable, add screenshots to help explain your problem.

Console logs (optional)

celeryworker_1  | [2020-03-23 10:16:11,267: INFO/MainProcess] Received task: tool_issue_updater[c286738d-8714-446b-be25-30988773106d]
celeryworker_1  | [2020-03-23 10:16:11,270: INFO/MainProcess] tool_issue_updater[c286738d-8714-446b-be25-30988773106d]: running tool_issue_updater
celeryworker_1  | [2020-03-23 10:16:11,270: INFO/MainProcess] Task tool_issue_updater[c286738d-8714-446b-be25-30988773106d] succeeded in 0.0013653070200234652s: None
uwsgi_1         | applying rules
celeryworker_1  | [2020-03-23 10:16:11,300: INFO/MainProcess] Received task: add_issue_task[f9d97faa-c948-4ec0-a13d-2090394c436d]
celeryworker_1  | [2020-03-23 10:16:11,301: INFO/MainProcess] add_issue_task[f9d97faa-c948-4ec0-a13d-2090394c436d]: add issue task
uwsgi_1         | [pid: 1|app: 0|req: 16512/41914] 10.1.10.11 () {68 vars in 1390 bytes} [Mon Mar 23 10:16:11 2020] POST /finding/2/edit => generated 0 bytes in 124 msecs (HTTP/1.1 302) 8 headers in 400 bytes (1 switches on core 0)
nginx_1         | 10.1.10.11 - - [23/Mar/2020:10:16:11 +0000] "POST /finding/2/edit HTTP/1.1" 302 0 "https://mydefectdojo.com/finding/2/edit" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.149 Safari/537.36" "-"
celeryworker_1  | [2020-03-23 10:16:11,341: INFO/MainProcess] Task add_issue_task[f9d97faa-c948-4ec0-a13d-2090394c436d] succeeded in 0.0403217010316439s: None
uwsgi_1         | Successfuly imported extension module "markdown.extensions.nl2br".
uwsgi_1         | Successfully loaded extension "markdown.extensions.nl2br.Nl2BrExtension".
uwsgi_1         | Successfuly imported extension module "markdown.extensions.sane_lists".
uwsgi_1         | Successfully loaded extension "markdown.extensions.sane_lists.SaneListExtension".
uwsgi_1         | Successfuly imported extension module "markdown.extensions.codehilite".
uwsgi_1         | Successfully loaded extension "markdown.extensions.codehilite.CodeHiliteExtension".
uwsgi_1         | Successfuly imported extension module "markdown.extensions.fenced_code".
uwsgi_1         | Successfully loaded extension "markdown.extensions.fenced_code.FencedCodeExtension".
uwsgi_1         | Successfuly imported extension module "markdown.extensions.toc".
uwsgi_1         | Successfully loaded extension "markdown.extensions.toc.TocExtension".
uwsgi_1         | Successfuly imported extension module "markdown.extensions.tables".
uwsgi_1         | Successfully loaded extension "markdown.extensions.tables.TableExtension".
uwsgi_1         | Successfuly imported extension module "markdown.extensions.nl2br".
uwsgi_1         | Successfully loaded extension "markdown.extensions.nl2br.Nl2BrExtension".
uwsgi_1         | Successfuly imported extension module "markdown.extensions.sane_lists".
uwsgi_1         | Successfully loaded extension "markdown.extensions.sane_lists.SaneListExtension".
uwsgi_1         | Successfuly imported extension module "markdown.extensions.codehilite".
uwsgi_1         | Successfully loaded extension "markdown.extensions.codehilite.CodeHiliteExtension".
uwsgi_1         | Successfuly imported extension module "markdown.extensions.fenced_code".
uwsgi_1         | Successfully loaded extension "markdown.extensions.fenced_code.FencedCodeExtension".
uwsgi_1         | Successfuly imported extension module "markdown.extensions.toc".
uwsgi_1         | Successfully loaded extension "markdown.extensions.toc.TocExtension".
uwsgi_1         | Successfuly imported extension module "markdown.extensions.tables".
uwsgi_1         | Successfully loaded extension "markdown.extensions.tables.TableExtension".
uwsgi_1         | Successfuly imported extension module "markdown.extensions.nl2br".
uwsgi_1         | Successfully loaded extension "markdown.extensions.nl2br.Nl2BrExtension".
uwsgi_1         | Successfuly imported extension module "markdown.extensions.sane_lists".
uwsgi_1         | Successfully loaded extension "markdown.extensions.sane_lists.SaneListExtension".
uwsgi_1         | Successfuly imported extension module "markdown.extensions.codehilite".
uwsgi_1         | Successfully loaded extension "markdown.extensions.codehilite.CodeHiliteExtension".
uwsgi_1         | Successfuly imported extension module "markdown.extensions.fenced_code".
uwsgi_1         | Successfully loaded extension "markdown.extensions.fenced_code.FencedCodeExtension".
uwsgi_1         | Successfuly imported extension module "markdown.extensions.toc".
uwsgi_1         | Successfully loaded extension "markdown.extensions.toc.TocExtension".
uwsgi_1         | Successfuly imported extension module "markdown.extensions.tables".
uwsgi_1         | Successfully loaded extension "markdown.extensions.tables.TableExtension".
uwsgi_1         | Successfuly imported extension module "markdown.extensions.nl2br".
uwsgi_1         | Successfully loaded extension "markdown.extensions.nl2br.Nl2BrExtension".
uwsgi_1         | Successfuly imported extension module "markdown.extensions.sane_lists".
uwsgi_1         | Successfully loaded extension "markdown.extensions.sane_lists.SaneListExtension".
uwsgi_1         | Successfuly imported extension module "markdown.extensions.codehilite".
uwsgi_1         | Successfully loaded extension "markdown.extensions.codehilite.CodeHiliteExtension".
uwsgi_1         | Successfuly imported extension module "markdown.extensions.fenced_code".
uwsgi_1         | Successfully loaded extension "markdown.extensions.fenced_code.FencedCodeExtension".
uwsgi_1         | Successfuly imported extension module "markdown.extensions.toc".
uwsgi_1         | Successfully loaded extension "markdown.extensions.toc.TocExtension".
uwsgi_1         | Successfuly imported extension module "markdown.extensions.tables".
uwsgi_1         | Successfully loaded extension "markdown.extensions.tables.TableExtension".
uwsgi_1         | [pid: 1|app: 0|req: 16513/41915] 10.1.10.11 () {62 vars in 1360 bytes} [Mon Mar 23 10:16:11 2020] GET /finding/2 => generated 79053 bytes in 333 msecs (HTTP/1.1 200) 8 headers in 453 bytes (1 switches on core 1)
nginx_1         | 10.1.10.11 - - [23/Mar/2020:10:16:11 +0000] "GET /finding/2 HTTP/1.1" 200 79053 "https://mydefectdojo.com/finding/2/edit" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.149 Safari/537.36" "-"

Additional context (optional)
Add any other context about the problem here.

@catalinvr catalinvr added the bug label Mar 23, 2020
@Apipia
Copy link
Contributor

Apipia commented Mar 24, 2020

I have spent a great deal of time debugging JIRA and updating how it all works. There are a few reasons why it wouldn't create an issue. If you can add any more information, that would be helpful.
First of all, is your severity greater than Informational? Because Informational findings don't get tickets in JIRA. Also, does your system settings have a minimum severity set for JIRA items? Make sure that this is set appropriately as well.
Your log lines:
celeryworker_1 | [2020-03-23 10:16:11,301: INFO/MainProcess] add_issue_task[f9d97faa-c948-4ec0-a13d-2090394c436d]: add issue task

celeryworker_1 | [2020-03-23 10:16:11,341: INFO/MainProcess] Task add_issue_task[f9d97faa-c948-4ec0-a13d-2090394c436d] succeeded in 0.0403217010316439s: None
Say to me that it was probably not a high enough severity level. The task seemed to do nothing and exit immediately.

@catalinvr
Copy link
Author

Here are my configs:
Jira config
Jira config

Product config
product

System Settings
System settings

Finding
Finding

@catalinvr
Copy link
Author

hi @Apipia
Today I removed everything from DD and I started again the integration.
Now, under notification I saw the following message:

Finding: 1, No project could be found with key 'TEN'.

I'm 100% sure that the project exists. Please can you help me to debug this issue?

Thank you

@madchap
Copy link
Collaborator

madchap commented Mar 26, 2020

@catalinvr You should use the "Permission helper" of JIRA itself to find out if the user you've configured in DefectDojo has the necessary rights to create issues in that project.

@catalinvr
Copy link
Author

The user that I used has admin access.
Status: X Account has the 'Create Issues' permission

@Apipia
Copy link
Contributor

Apipia commented Mar 26, 2020

The user that I used has admin access.
Status: X Account has the 'Create Issues' permission

You could attempt to reproduce this by running some quick Python code with the JIRA module.

from jira import JIRA
client = JIRA(server="URL-FROM-SETTINGS", basic_auth=("USERNAME", "PASSWORD"))
proj = client.project("TEN")

See if you get the same error and if any more information is provided. Perhaps it's a 401 or 403?

@catalinvr
Copy link
Author

Thank you guys for your help. It looks like changes from dev branch work. Are there any chances to merge it into master?

@madchap
Copy link
Collaborator

madchap commented Mar 26, 2020

We'll likely release a rc branch early next month, and a few weeks later into master. Working on a more stable release schedule (see #2003)

@madchap madchap closed this as completed Mar 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants