{"action":"created","issue":{"url":"https://api.github.com/repos/zricethezav/gitleaks/issues/50","repository_url":"https://api.github.com/repos/zricethezav/gitleaks","labels_url":"https://api.github.com/repos/zricethezav/gitleaks/issues/50/labels{/name}","comments_url":"https://api.github.com/repos/zricethezav/gitleaks/issues/50/comments","events_url":"https://api.github.com/repos/zricethezav/gitleaks/issues/50/events","html_url":"https://github.com/zricethezav/gitleaks/issues/50","id":300439708,"number":50,"title":"Git leaks - Usability feedback ","user":{"login":"keirans","id":1220700,"avatar_url":"https://avatars2.githubusercontent.com/u/1220700?v=4","gravatar_id":"","url":"https://api.github.com/users/keirans","html_url":"https://github.com/keirans","followers_url":"https://api.github.com/users/keirans/followers","following_url":"https://api.github.com/users/keirans/following{/other_user}","gists_url":"https://api.github.com/users/keirans/gists{/gist_id}","starred_url":"https://api.github.com/users/keirans/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/keirans/subscriptions","organizations_url":"https://api.github.com/users/keirans/orgs","repos_url":"https://api.github.com/users/keirans/repos","events_url":"https://api.github.com/users/keirans/events{/privacy}","received_events_url":"https://api.github.com/users/keirans/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-02-26T23:44:12Z","updated_at":"2018-02-27T07:51:51Z","closed_at":null,"author_association":"NONE","body":"Hey There,\r\nThanks again for a really great tool.  I'm providing this feedback here, as per our discussions on reddit DM's.\r\n\r\nI've got a bit of feedback that i think would help greatly with general usability. I'm slightly selfish in that these would greatly help me, however, I think it would also help other peoples adoption as well.\r\n\r\n* Customise the datadir / workdir directory on the CLI\r\nCurrently all data produced by the tool goes into ~/.gitleaks/ , however, for larger audits, it would be really great to be able to specify this directory so that the user could target a different location for performance or archival reasons. \r\n\r\n* JSON data output enhancements \r\nThis is a really great capability, possibly one of the killer features of your implementation.\r\nRight now, for repositories that contain no results, you create a JSON file with a null value.\r\nIdeally this should either not be created, or it should contain an empty array. This would ease parsing capabilities for those using your tool to generate large batches of results then post process them using something like Ruby (Which is what I am doing). My general feeling is that no report should be created if there are no matches, however, I think consistency is key however.\r\n\r\n* --quiet mode / --logfile \r\nA quiet mode or logfile capability would help with automating your tool further, alongside more detailed exit codes as detailed below.\r\n\r\n* Return code definitions / Extended return code capability ?\r\nRight now, from what I understand, the tool returns 0 for successful execution, and non-zero for unsuccessful execution. It would be great to have a bit more detail exposed as exit codes for different circumstances, such as if a scan executed, and returned matches, etc.\r\n\r\nThis would help greatly with automating your tool further. However, I'd love to hear what you and other users think about this.\r\nA good example of this implemented well is in [Puppet's --detailed-exit-codes](https://puppet.com/docs/puppet/5.4/man/agent.html) functionality.\r\n\r\n* Externalising the regex matches ?\r\nI'm not sure if this is something that will greatly affect performance, but it would be great to externalise the REGEX matches into a configuration file so that you don't have to rebuild the binary when updating rules. Putting them into a runtime configuration file (Maybe YAML) would really help usability. Being able to specify the datadir / workdir in this same file would also be great.\r\n\r\nA very basic example could look like this:\r\n\r\n```\r\n---\r\nconfig:\r\n  workdir: /somewhere/else\r\nregex:\r\n  AWS:\r\n    pattern: <REGEX>\r\n```\r\n\r\nOnce again, thanks again for a great tool :)\r\n\r\nK"},"comment":{"url":"https://api.github.com/repos/zricethezav/gitleaks/issues/comments/368777114","html_url":"https://github.com/zricethezav/gitleaks/issues/50#issuecomment-368777114","issue_url":"https://api.github.com/repos/zricethezav/gitleaks/issues/50","id":368777114,"user":{"login":"keirans","id":1220700,"avatar_url":"https://avatars2.githubusercontent.com/u/1220700?v=4","gravatar_id":"","url":"https://api.github.com/users/keirans","html_url":"https://github.com/keirans","followers_url":"https://api.github.com/users/keirans/followers","following_url":"https://api.github.com/users/keirans/following{/other_user}","gists_url":"https://api.github.com/users/keirans/gists{/gist_id}","starred_url":"https://api.github.com/users/keirans/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/keirans/subscriptions","organizations_url":"https://api.github.com/users/keirans/orgs","repos_url":"https://api.github.com/users/keirans/repos","events_url":"https://api.github.com/users/keirans/events{/privacy}","received_events_url":"https://api.github.com/users/keirans/received_events","type":"User","site_admin":false},"created_at":"2018-02-27T07:51:51Z","updated_at":"2018-02-27T07:51:51Z","author_association":"NONE","body":"Absolutely.\r\n\r\nLet me get a sample set of exit codes over to you tomorrow.\r\n\r\nI'll take the latest build for a spin then as well.\r\n\r\nThis is going to be great when its in, escpecially for pipelines and audits.\r\n\r\n\r\nK"}}
{"actor":{"display_login":"keirans"}}