OWASP / glue

Application Security Automation
Other
522 stars 112 forks source link

Added option to set JIRA issue type in JIRA reporter #156

Closed tdshipley closed 5 years ago

tdshipley commented 5 years ago

Summary

Currently, Glue assumes when raising issues that they should be of type Bug. However not all JIRA projects might have this issue type so Glue should support overriding this if required.

Change

Added an option --jira-issue-type to allow a user to pass in the issue type they want to be used when the JIRA reporter raises issues in JIRA. If this is not set it uses the default value Bug.

cc @omerlh

tdshipley commented 5 years ago

Sure - are there any existing tests for the JIRA reporter or Options classes? I cannot find any.

omerlh commented 5 years ago

Probably not, this is why I'm asking :) Trying to make test coverage a bit better!

tdshipley commented 5 years ago

Ah ok - no problem will add a few tests and ping you once it is done.

tdshipley commented 5 years ago

@omerlh - Added a couple of tests for the jira_issue_type method I added. Testing the rest of the JiraReporter class would probably need some refactoring (or at least mocking the Jira Client) which seemed like a lot of work for this change!

Also didn't test the options class. Not sure how I would go about that in a way that would add value. Perhaps adding a test which checks a options object for shape? Anyway another one best left to you guys I think.

tdshipley commented 5 years ago

Hey, @omerlh is there anything else I need to do to get this merged? Keen to move my security testing pipeline on from its current form (zap, depcheck) to the new (zap, depcheck + glue and jira) but this would block it for me.

omerlh commented 5 years ago

Sorry, I thought you can merge it yourself. Merged, thanks!

tdshipley commented 5 years ago

👍 thanks