{"action":"created","comment":{"url":"https://api.github.com/repos/racodond/sonar-jproperties-plugin/pulls/comments/91862813","pull_request_review_id":12372616,"id":91862813,"diff_hunk":"@@ -38,18 +42,56 @@\n @ActivatedByDefault\n public class HardCodedCredentialsCheck extends DoubleDispatchVisitorCheck {\n \n+  private static final String DEFAULT_ENCRYPTED_CREDENTIALS_TO_IGNORE = \"\";\n+\n   private static final Pattern HARD_CODED_USERNAME = Pattern.compile(\".*(login|username).*\", Pattern.CASE_INSENSITIVE);\n   private static final Pattern HARD_CODED_PASSWORD = Pattern.compile(\".*(password|passwd|pwd).*\", Pattern.CASE_INSENSITIVE);\n \n+  @RuleProperty(\n+    key = \"encryptedCredentialsToIgnore\",\n+    description = \"Regular expression of encrypted credentials to ignore. \"\n+      + \"See \" + CheckUtils.LINK_TO_JAVA_REGEX_PATTERN_DOC + \" for detailed regular expression syntax. \"\n+      + \"For example, to ignore encrypted credentials starting with 'ENC(' and 'OBF:', set the parameter to '^(ENC\\\\(|OBF:).+$'. \"\n+      + \"Leave empty if encrypted credentials should not be ignored.\",\n+    defaultValue = DEFAULT_ENCRYPTED_CREDENTIALS_TO_IGNORE)\n+  private String encryptedCredentialsToIgnore = DEFAULT_ENCRYPTED_CREDENTIALS_TO_IGNORE;\n+\n   @Override\n-  public void visitKey(KeyTree tree) {\n-    if (HARD_CODED_USERNAME.matcher(tree.text()).matches()) {\n-      addPreciseIssue(tree, \"Remove this hard-coded username.\");\n+  public void visitProperty(PropertyTree tree) {","path":"jproperties-checks/src/main/java/org/sonar/jproperties/checks/generic/HardCodedCredentialsCheck.java","position":46,"original_position":46,"commit_id":"5d9c5dd9ce451faf19a32c74fbd06143c5e61413","original_commit_id":"5d9c5dd9ce451faf19a32c74fbd06143c5e61413","user":{"login":"racodond","id":1215713,"avatar_url":"https://avatars.githubusercontent.com/u/1215713?v=3","gravatar_id":"","url":"https://api.github.com/users/racodond","html_url":"https://github.com/racodond","followers_url":"https://api.github.com/users/racodond/followers","following_url":"https://api.github.com/users/racodond/following{/other_user}","gists_url":"https://api.github.com/users/racodond/gists{/gist_id}","starred_url":"https://api.github.com/users/racodond/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/racodond/subscriptions","organizations_url":"https://api.github.com/users/racodond/orgs","repos_url":"https://api.github.com/users/racodond/repos","events_url":"https://api.github.com/users/racodond/events{/privacy}","received_events_url":"https://api.github.com/users/racodond/received_events","type":"User","site_admin":false},"body":"![CRITICAL](https://raw.githubusercontent.com/SonarCommunity/sonar-github/master/images/severity-critical.png) The Cyclomatic Complexity of this method \"visitProperty\" is 11 which is greater than 10 authorized. [![rule](https://raw.githubusercontent.com/SonarCommunity/sonar-github/master/images/rule.png)](https://sonarqube.com/coding_rules#rule_key=squid%3AMethodCyclomaticComplexity)\n","created_at":"2016-12-11T19:15:02Z","updated_at":"2016-12-11T19:15:02Z","html_url":"https://github.com/racodond/sonar-jproperties-plugin/pull/74#discussion_r91862813","pull_request_url":"https://api.github.com/repos/racodond/sonar-jproperties-plugin/pulls/74","_links":{"self":{"href":"https://api.github.com/repos/racodond/sonar-jproperties-plugin/pulls/comments/91862813"},"html":{"href":"https://github.com/racodond/sonar-jproperties-plugin/pull/74#discussion_r91862813"},"pull_request":{"href":"https://api.github.com/repos/racodond/sonar-jproperties-plugin/pulls/74"}}},"pull_request":{"url":"https://api.github.com/repos/racodond/sonar-jproperties-plugin/pulls/74","id":97468922,"html_url":"https://github.com/racodond/sonar-jproperties-plugin/pull/74","diff_url":"https://github.com/racodond/sonar-jproperties-plugin/pull/74.diff","patch_url":"https://github.com/racodond/sonar-jproperties-plugin/pull/74.patch","issue_url":"https://api.github.com/repos/racodond/sonar-jproperties-plugin/issues/74","number":74,"state":"open","locked":false,"title":"Fix #73 Credentials should not be hard-coded(jproperties:S2068) - Add…","user":{"login":"racodond","id":1215713,"avatar_url":"https://avatars.githubusercontent.com/u/1215713?v=3","gravatar_id":"","url":"https://api.github.com/users/racodond","html_url":"https://github.com/racodond","followers_url":"https://api.github.com/users/racodond/followers","following_url":"https://api.github.com/users/racodond/following{/other_user}","gists_url":"https://api.github.com/users/racodond/gists{/gist_id}","starred_url":"https://api.github.com/users/racodond/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/racodond/subscriptions","organizations_url":"https://api.github.com/users/racodond/orgs","repos_url":"https://api.github.com/users/racodond/repos","events_url":"https://api.github.com/users/racodond/events{/privacy}","received_events_url":"https://api.github.com/users/racodond/received_events","type":"User","site_admin":false},"body":"… the ability to ignore encrypted values","created_at":"2016-12-11T19:13:02Z","updated_at":"2016-12-11T19:15:02Z","closed_at":null,"merged_at":null,"merge_commit_sha":"9f4d7c6ee7e2c93b67c9c663eeeacb594615776f","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/racodond/sonar-jproperties-plugin/pulls/74/commits","review_comments_url":"https://api.github.com/repos/racodond/sonar-jproperties-plugin/pulls/74/comments","review_comment_url":"https://api.github.com/repos/racodond/sonar-jproperties-plugin/pulls/comments{/number}","comments_url":"https://api.github.com/repos/racodond/sonar-jproperties-plugin/issues/74/comments","statuses_url":"https://api.github.com/repos/racodond/sonar-jproperties-plugin/statuses/5d9c5dd9ce451faf19a32c74fbd06143c5e61413","head":{"label":"racodond:feature/73","ref":"feature/73","sha":"5d9c5dd9ce451faf19a32c74fbd06143c5e61413","user":{"login":"racodond","id":1215713,"avatar_url":"https://avatars.githubusercontent.com/u/1215713?v=3","gravatar_id":"","url":"https://api.github.com/users/racodond","html_url":"https://github.com/racodond","followers_url":"https://api.github.com/users/racodond/followers","following_url":"https://api.github.com/users/racodond/following{/other_user}","gists_url":"https://api.github.com/users/racodond/gists{/gist_id}","starred_url":"https://api.github.com/users/racodond/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/racodond/subscriptions","organizations_url":"https://api.github.com/users/racodond/orgs","repos_url":"https://api.github.com/users/racodond/repos","events_url":"https://api.github.com/users/racodond/events{/privacy}","received_events_url":"https://api.github.com/users/racodond/received_events","type":"User","site_admin":false},"repo":{"id":39195736,"name":"sonar-jproperties-plugin","full_name":"racodond/sonar-jproperties-plugin","owner":{"login":"racodond","id":1215713,"avatar_url":"https://avatars.githubusercontent.com/u/1215713?v=3","gravatar_id":"","url":"https://api.github.com/users/racodond","html_url":"https://github.com/racodond","followers_url":"https://api.github.com/users/racodond/followers","following_url":"https://api.github.com/users/racodond/following{/other_user}","gists_url":"https://api.github.com/users/racodond/gists{/gist_id}","starred_url":"https://api.github.com/users/racodond/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/racodond/subscriptions","organizations_url":"https://api.github.com/users/racodond/orgs","repos_url":"https://api.github.com/users/racodond/repos","events_url":"https://api.github.com/users/racodond/events{/privacy}","received_events_url":"https://api.github.com/users/racodond/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/racodond/sonar-jproperties-plugin","description":"SonarQube Java Properties Plugin","fork":false,"url":"https://api.github.com/repos/racodond/sonar-jproperties-plugin","forks_url":"https://api.github.com/repos/racodond/sonar-jproperties-plugin/forks","keys_url":"https://api.github.com/repos/racodond/sonar-jproperties-plugin/keys{/key_id}","collaborators_url":"https://api.github.com/repos/racodond/sonar-jproperties-plugin/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/racodond/sonar-jproperties-plugin/teams","hooks_url":"https://api.github.com/repos/racodond/sonar-jproperties-plugin/hooks","issue_events_url":"https://api.github.com/repos/racodond/sonar-jproperties-plugin/issues/events{/number}","events_url":"https://api.github.com/repos/racodond/sonar-jproperties-plugin/events","assignees_url":"https://api.github.com/repos/racodond/sonar-jproperties-plugin/assignees{/user}","branches_url":"https://api.github.com/repos/racodond/sonar-jproperties-plugin/branches{/branch}","tags_url":"https://api.github.com/repos/racodond/sonar-jproperties-plugin/tags","blobs_url":"https://api.github.com/repos/racodond/sonar-jproperties-plugin/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/racodond/sonar-jproperties-plugin/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/racodond/sonar-jproperties-plugin/git/refs{/sha}","trees_url":"https://api.github.com/repos/racodond/sonar-jproperties-plugin/git/trees{/sha}","statuses_url":"https://api.github.com/repos/racodond/sonar-jproperties-plugin/statuses/{sha}","languages_url":"https://api.github.com/repos/racodond/sonar-jproperties-plugin/languages","stargazers_url":"https://api.github.com/repos/racodond/sonar-jproperties-plugin/stargazers","contributors_url":"https://api.github.com/repos/racodond/sonar-jproperties-plugin/contributors","subscribers_url":"https://api.github.com/repos/racodond/sonar-jproperties-plugin/subscribers","subscription_url":"https://api.github.com/repos/racodond/sonar-jproperties-plugin/subscription","commits_url":"https://api.github.com/repos/racodond/sonar-jproperties-plugin/commits{/sha}","git_commits_url":"https://api.github.com/repos/racodond/sonar-jproperties-plugin/git/commits{/sha}","comments_url":"https://api.github.com/repos/racodond/sonar-jproperties-plugin/comments{/number}","issue_comment_url":"https://api.github.com/repos/racodond/sonar-jproperties-plugin/issues/comments{/number}","contents_url":"https://api.github.com/repos/racodond/sonar-jproperties-plugin/contents/{+path}","compare_url":"https://api.github.com/repos/racodond/sonar-jproperties-plugin/compare/{base}...{head}","merges_url":"https://api.github.com/repos/racodond/sonar-jproperties-plugin/merges","archive_url":"https://api.github.com/repos/racodond/sonar-jproperties-plugin/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/racodond/sonar-jproperties-plugin/downloads","issues_url":"https://api.github.com/repos/racodond/sonar-jproperties-plugin/issues{/number}","pulls_url":"https://api.github.com/repos/racodond/sonar-jproperties-plugin/pulls{/number}","milestones_url":"https://api.github.com/repos/racodond/sonar-jproperties-plugin/milestones{/number}","notifications_url":"https://api.github.com/repos/racodond/sonar-jproperties-plugin/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/racodond/sonar-jproperties-plugin/labels{/name}","releases_url":"https://api.github.com/repos/racodond/sonar-jproperties-plugin/releases{/id}","deployments_url":"https://api.github.com/repos/racodond/sonar-jproperties-plugin/deployments","created_at":"2015-07-16T12:33:03Z","updated_at":"2016-12-10T01:09:02Z","pushed_at":"2016-12-11T19:13:02Z","git_url":"git://github.com/racodond/sonar-jproperties-plugin.git","ssh_url":"git@github.com:racodond/sonar-jproperties-plugin.git","clone_url":"https://github.com/racodond/sonar-jproperties-plugin.git","svn_url":"https://github.com/racodond/sonar-jproperties-plugin","homepage":"","size":605,"stargazers_count":7,"watchers_count":7,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":5,"mirror_url":null,"open_issues_count":6,"forks":5,"open_issues":6,"watchers":7,"default_branch":"master"}},"base":{"label":"racodond:master","ref":"master","sha":"45332919c250af2a2e328082659556574a7afac7","user":{"login":"racodond","id":1215713,"avatar_url":"https://avatars.githubusercontent.com/u/1215713?v=3","gravatar_id":"","url":"https://api.github.com/users/racodond","html_url":"https://github.com/racodond","followers_url":"https://api.github.com/users/racodond/followers","following_url":"https://api.github.com/users/racodond/following{/other_user}","gists_url":"https://api.github.com/users/racodond/gists{/gist_id}","starred_url":"https://api.github.com/users/racodond/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/racodond/subscriptions","organizations_url":"https://api.github.com/users/racodond/orgs","repos_url":"https://api.github.com/users/racodond/repos","events_url":"https://api.github.com/users/racodond/events{/privacy}","received_events_url":"https://api.github.com/users/racodond/received_events","type":"User","site_admin":false},"repo":{"id":39195736,"name":"sonar-jproperties-plugin","full_name":"racodond/sonar-jproperties-plugin","owner":{"login":"racodond","id":1215713,"avatar_url":"https://avatars.githubusercontent.com/u/1215713?v=3","gravatar_id":"","url":"https://api.github.com/users/racodond","html_url":"https://github.com/racodond","followers_url":"https://api.github.com/users/racodond/followers","following_url":"https://api.github.com/users/racodond/following{/other_user}","gists_url":"https://api.github.com/users/racodond/gists{/gist_id}","starred_url":"https://api.github.com/users/racodond/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/racodond/subscriptions","organizations_url":"https://api.github.com/users/racodond/orgs","repos_url":"https://api.github.com/users/racodond/repos","events_url":"https://api.github.com/users/racodond/events{/privacy}","received_events_url":"https://api.github.com/users/racodond/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/racodond/sonar-jproperties-plugin","description":"SonarQube Java Properties Plugin","fork":false,"url":"https://api.github.com/repos/racodond/sonar-jproperties-plugin","forks_url":"https://api.github.com/repos/racodond/sonar-jproperties-plugin/forks","keys_url":"https://api.github.com/repos/racodond/sonar-jproperties-plugin/keys{/key_id}","collaborators_url":"https://api.github.com/repos/racodond/sonar-jproperties-plugin/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/racodond/sonar-jproperties-plugin/teams","hooks_url":"https://api.github.com/repos/racodond/sonar-jproperties-plugin/hooks","issue_events_url":"https://api.github.com/repos/racodond/sonar-jproperties-plugin/issues/events{/number}","events_url":"https://api.github.com/repos/racodond/sonar-jproperties-plugin/events","assignees_url":"https://api.github.com/repos/racodond/sonar-jproperties-plugin/assignees{/user}","branches_url":"https://api.github.com/repos/racodond/sonar-jproperties-plugin/branches{/branch}","tags_url":"https://api.github.com/repos/racodond/sonar-jproperties-plugin/tags","blobs_url":"https://api.github.com/repos/racodond/sonar-jproperties-plugin/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/racodond/sonar-jproperties-plugin/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/racodond/sonar-jproperties-plugin/git/refs{/sha}","trees_url":"https://api.github.com/repos/racodond/sonar-jproperties-plugin/git/trees{/sha}","statuses_url":"https://api.github.com/repos/racodond/sonar-jproperties-plugin/statuses/{sha}","languages_url":"https://api.github.com/repos/racodond/sonar-jproperties-plugin/languages","stargazers_url":"https://api.github.com/repos/racodond/sonar-jproperties-plugin/stargazers","contributors_url":"https://api.github.com/repos/racodond/sonar-jproperties-plugin/contributors","subscribers_url":"https://api.github.com/repos/racodond/sonar-jproperties-plugin/subscribers","subscription_url":"https://api.github.com/repos/racodond/sonar-jproperties-plugin/subscription","commits_url":"https://api.github.com/repos/racodond/sonar-jproperties-plugin/commits{/sha}","git_commits_url":"https://api.github.com/repos/racodond/sonar-jproperties-plugin/git/commits{/sha}","comments_url":"https://api.github.com/repos/racodond/sonar-jproperties-plugin/comments{/number}","issue_comment_url":"https://api.github.com/repos/racodond/sonar-jproperties-plugin/issues/comments{/number}","contents_url":"https://api.github.com/repos/racodond/sonar-jproperties-plugin/contents/{+path}","compare_url":"https://api.github.com/repos/racodond/sonar-jproperties-plugin/compare/{base}...{head}","merges_url":"https://api.github.com/repos/racodond/sonar-jproperties-plugin/merges","archive_url":"https://api.github.com/repos/racodond/sonar-jproperties-plugin/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/racodond/sonar-jproperties-plugin/downloads","issues_url":"https://api.github.com/repos/racodond/sonar-jproperties-plugin/issues{/number}","pulls_url":"https://api.github.com/repos/racodond/sonar-jproperties-plugin/pulls{/number}","milestones_url":"https://api.github.com/repos/racodond/sonar-jproperties-plugin/milestones{/number}","notifications_url":"https://api.github.com/repos/racodond/sonar-jproperties-plugin/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/racodond/sonar-jproperties-plugin/labels{/name}","releases_url":"https://api.github.com/repos/racodond/sonar-jproperties-plugin/releases{/id}","deployments_url":"https://api.github.com/repos/racodond/sonar-jproperties-plugin/deployments","created_at":"2015-07-16T12:33:03Z","updated_at":"2016-12-10T01:09:02Z","pushed_at":"2016-12-11T19:13:02Z","git_url":"git://github.com/racodond/sonar-jproperties-plugin.git","ssh_url":"git@github.com:racodond/sonar-jproperties-plugin.git","clone_url":"https://github.com/racodond/sonar-jproperties-plugin.git","svn_url":"https://github.com/racodond/sonar-jproperties-plugin","homepage":"","size":605,"stargazers_count":7,"watchers_count":7,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":5,"mirror_url":null,"open_issues_count":6,"forks":5,"open_issues":6,"watchers":7,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/racodond/sonar-jproperties-plugin/pulls/74"},"html":{"href":"https://github.com/racodond/sonar-jproperties-plugin/pull/74"},"issue":{"href":"https://api.github.com/repos/racodond/sonar-jproperties-plugin/issues/74"},"comments":{"href":"https://api.github.com/repos/racodond/sonar-jproperties-plugin/issues/74/comments"},"review_comments":{"href":"https://api.github.com/repos/racodond/sonar-jproperties-plugin/pulls/74/comments"},"review_comment":{"href":"https://api.github.com/repos/racodond/sonar-jproperties-plugin/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/racodond/sonar-jproperties-plugin/pulls/74/commits"},"statuses":{"href":"https://api.github.com/repos/racodond/sonar-jproperties-plugin/statuses/5d9c5dd9ce451faf19a32c74fbd06143c5e61413"}}}}
{"actor":{"display_login":"racodond"}}