{"action":"created","comment":{"url":"https://api.github.com/repos/SonarSource/sonar-java/pulls/comments/188278335","pull_request_review_id":120222379,"id":188278335,"diff_hunk":"@@ -0,0 +1,124 @@\n+import java.security.KeyPairGenerator;\n+import java.security.NoSuchAlgorithmException;\n+import java.security.SecureRandom;\n+import javax.crypto.KeyGenerator;\n+\n+class A {\n+\n+  public KeyGenerator keyG;\n+  public KeyPairGenerator keyPairG = KeyPairGenerator.getInstance(\"RSA\");;\n+  private static final KeyGenerator keyG2 = KeyGenerator.getInstance(\"Blowfish\");\n+\n+  public void foo1() throws NoSuchAlgorithmException {\n+    KeyGenerator keyGen = KeyGenerator.getInstance(\"Blowfish\");\n+    keyGen.init(64);  // Noncompliant [[sc=5;ec=20]] {{Use a key length of at least 128 bits.}}\n+  }\n+\n+  public void foo2() throws NoSuchAlgorithmException {\n+    KeyGenerator keyGen = KeyGenerator.getInstance(\"Blowfish\");\n+    int x = 64;\n+    keyGen.init(x); // FN","path":"java-checks/src/test/files/checks/security/CryptographicKeySizeCheck.java","position":20,"original_position":20,"commit_id":"582886d79d72155a5c0b4261231fdf34c9451b1e","original_commit_id":"582886d79d72155a5c0b4261231fdf34c9451b1e","user":{"login":"m-g-sonar","id":10588758,"avatar_url":"https://avatars2.githubusercontent.com/u/10588758?v=4","gravatar_id":"","url":"https://api.github.com/users/m-g-sonar","html_url":"https://github.com/m-g-sonar","followers_url":"https://api.github.com/users/m-g-sonar/followers","following_url":"https://api.github.com/users/m-g-sonar/following{/other_user}","gists_url":"https://api.github.com/users/m-g-sonar/gists{/gist_id}","starred_url":"https://api.github.com/users/m-g-sonar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/m-g-sonar/subscriptions","organizations_url":"https://api.github.com/users/m-g-sonar/orgs","repos_url":"https://api.github.com/users/m-g-sonar/repos","events_url":"https://api.github.com/users/m-g-sonar/events{/privacy}","received_events_url":"https://api.github.com/users/m-g-sonar/received_events","type":"User","site_admin":false},"body":"Good point. Will make it explicit when solved that this is expected. And if no issue is raised when fixing the ticket, may raise some questions as well.","created_at":"2018-05-15T13:06:19Z","updated_at":"2018-05-15T13:06:20Z","html_url":"https://github.com/SonarSource/sonar-java/pull/2017#discussion_r188278335","pull_request_url":"https://api.github.com/repos/SonarSource/sonar-java/pulls/2017","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/SonarSource/sonar-java/pulls/comments/188278335"},"html":{"href":"https://github.com/SonarSource/sonar-java/pull/2017#discussion_r188278335"},"pull_request":{"href":"https://api.github.com/repos/SonarSource/sonar-java/pulls/2017"}},"in_reply_to_id":188268446},"pull_request":{"url":"https://api.github.com/repos/SonarSource/sonar-java/pulls/2017","id":187798732,"html_url":"https://github.com/SonarSource/sonar-java/pull/2017","diff_url":"https://github.com/SonarSource/sonar-java/pull/2017.diff","patch_url":"https://github.com/SonarSource/sonar-java/pull/2017.patch","issue_url":"https://api.github.com/repos/SonarSource/sonar-java/issues/2017","number":2017,"state":"open","locked":false,"title":"SONARJAVA-2676 Rule S4426: Cryptographic keys should not be too short","user":{"login":"stylianos-agapiou-sonarsource","id":36889190,"avatar_url":"https://avatars0.githubusercontent.com/u/36889190?v=4","gravatar_id":"","url":"https://api.github.com/users/stylianos-agapiou-sonarsource","html_url":"https://github.com/stylianos-agapiou-sonarsource","followers_url":"https://api.github.com/users/stylianos-agapiou-sonarsource/followers","following_url":"https://api.github.com/users/stylianos-agapiou-sonarsource/following{/other_user}","gists_url":"https://api.github.com/users/stylianos-agapiou-sonarsource/gists{/gist_id}","starred_url":"https://api.github.com/users/stylianos-agapiou-sonarsource/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stylianos-agapiou-sonarsource/subscriptions","organizations_url":"https://api.github.com/users/stylianos-agapiou-sonarsource/orgs","repos_url":"https://api.github.com/users/stylianos-agapiou-sonarsource/repos","events_url":"https://api.github.com/users/stylianos-agapiou-sonarsource/events{/privacy}","received_events_url":"https://api.github.com/users/stylianos-agapiou-sonarsource/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-05-14T11:36:55Z","updated_at":"2018-05-15T13:06:20Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c909b1222115210f0546ebdf27ea0f409fd08e69","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/SonarSource/sonar-java/pulls/2017/commits","review_comments_url":"https://api.github.com/repos/SonarSource/sonar-java/pulls/2017/comments","review_comment_url":"https://api.github.com/repos/SonarSource/sonar-java/pulls/comments{/number}","comments_url":"https://api.github.com/repos/SonarSource/sonar-java/issues/2017/comments","statuses_url":"https://api.github.com/repos/SonarSource/sonar-java/statuses/582886d79d72155a5c0b4261231fdf34c9451b1e","head":{"label":"SonarSource:SONARJAVA-2676","ref":"SONARJAVA-2676","sha":"582886d79d72155a5c0b4261231fdf34c9451b1e","user":{"login":"SonarSource","id":545988,"avatar_url":"https://avatars0.githubusercontent.com/u/545988?v=4","gravatar_id":"","url":"https://api.github.com/users/SonarSource","html_url":"https://github.com/SonarSource","followers_url":"https://api.github.com/users/SonarSource/followers","following_url":"https://api.github.com/users/SonarSource/following{/other_user}","gists_url":"https://api.github.com/users/SonarSource/gists{/gist_id}","starred_url":"https://api.github.com/users/SonarSource/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SonarSource/subscriptions","organizations_url":"https://api.github.com/users/SonarSource/orgs","repos_url":"https://api.github.com/users/SonarSource/repos","events_url":"https://api.github.com/users/SonarSource/events{/privacy}","received_events_url":"https://api.github.com/users/SonarSource/received_events","type":"Organization","site_admin":false},"repo":{"id":5674787,"name":"sonar-java","full_name":"SonarSource/sonar-java","owner":{"login":"SonarSource","id":545988,"avatar_url":"https://avatars0.githubusercontent.com/u/545988?v=4","gravatar_id":"","url":"https://api.github.com/users/SonarSource","html_url":"https://github.com/SonarSource","followers_url":"https://api.github.com/users/SonarSource/followers","following_url":"https://api.github.com/users/SonarSource/following{/other_user}","gists_url":"https://api.github.com/users/SonarSource/gists{/gist_id}","starred_url":"https://api.github.com/users/SonarSource/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SonarSource/subscriptions","organizations_url":"https://api.github.com/users/SonarSource/orgs","repos_url":"https://api.github.com/users/SonarSource/repos","events_url":"https://api.github.com/users/SonarSource/events{/privacy}","received_events_url":"https://api.github.com/users/SonarSource/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/SonarSource/sonar-java","description":":coffee: SonarJava : Java static analyzer for SonarQube & SonarLint","fork":false,"url":"https://api.github.com/repos/SonarSource/sonar-java","forks_url":"https://api.github.com/repos/SonarSource/sonar-java/forks","keys_url":"https://api.github.com/repos/SonarSource/sonar-java/keys{/key_id}","collaborators_url":"https://api.github.com/repos/SonarSource/sonar-java/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/SonarSource/sonar-java/teams","hooks_url":"https://api.github.com/repos/SonarSource/sonar-java/hooks","issue_events_url":"https://api.github.com/repos/SonarSource/sonar-java/issues/events{/number}","events_url":"https://api.github.com/repos/SonarSource/sonar-java/events","assignees_url":"https://api.github.com/repos/SonarSource/sonar-java/assignees{/user}","branches_url":"https://api.github.com/repos/SonarSource/sonar-java/branches{/branch}","tags_url":"https://api.github.com/repos/SonarSource/sonar-java/tags","blobs_url":"https://api.github.com/repos/SonarSource/sonar-java/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/SonarSource/sonar-java/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/SonarSource/sonar-java/git/refs{/sha}","trees_url":"https://api.github.com/repos/SonarSource/sonar-java/git/trees{/sha}","statuses_url":"https://api.github.com/repos/SonarSource/sonar-java/statuses/{sha}","languages_url":"https://api.github.com/repos/SonarSource/sonar-java/languages","stargazers_url":"https://api.github.com/repos/SonarSource/sonar-java/stargazers","contributors_url":"https://api.github.com/repos/SonarSource/sonar-java/contributors","subscribers_url":"https://api.github.com/repos/SonarSource/sonar-java/subscribers","subscription_url":"https://api.github.com/repos/SonarSource/sonar-java/subscription","commits_url":"https://api.github.com/repos/SonarSource/sonar-java/commits{/sha}","git_commits_url":"https://api.github.com/repos/SonarSource/sonar-java/git/commits{/sha}","comments_url":"https://api.github.com/repos/SonarSource/sonar-java/comments{/number}","issue_comment_url":"https://api.github.com/repos/SonarSource/sonar-java/issues/comments{/number}","contents_url":"https://api.github.com/repos/SonarSource/sonar-java/contents/{+path}","compare_url":"https://api.github.com/repos/SonarSource/sonar-java/compare/{base}...{head}","merges_url":"https://api.github.com/repos/SonarSource/sonar-java/merges","archive_url":"https://api.github.com/repos/SonarSource/sonar-java/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/SonarSource/sonar-java/downloads","issues_url":"https://api.github.com/repos/SonarSource/sonar-java/issues{/number}","pulls_url":"https://api.github.com/repos/SonarSource/sonar-java/pulls{/number}","milestones_url":"https://api.github.com/repos/SonarSource/sonar-java/milestones{/number}","notifications_url":"https://api.github.com/repos/SonarSource/sonar-java/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/SonarSource/sonar-java/labels{/name}","releases_url":"https://api.github.com/repos/SonarSource/sonar-java/releases{/id}","deployments_url":"https://api.github.com/repos/SonarSource/sonar-java/deployments","created_at":"2012-09-04T15:53:13Z","updated_at":"2018-05-15T09:37:31Z","pushed_at":"2018-05-15T12:09:20Z","git_url":"git://github.com/SonarSource/sonar-java.git","ssh_url":"git@github.com:SonarSource/sonar-java.git","clone_url":"https://github.com/SonarSource/sonar-java.git","svn_url":"https://github.com/SonarSource/sonar-java","homepage":"","size":38084,"stargazers_count":318,"watchers_count":318,"language":"Java","has_issues":false,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":240,"mirror_url":null,"archived":false,"open_issues_count":6,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":240,"open_issues":6,"watchers":318,"default_branch":"master"}},"base":{"label":"SonarSource:master","ref":"master","sha":"0e3cccb1d0d7a9c7e7813e286d1d1388d7a33595","user":{"login":"SonarSource","id":545988,"avatar_url":"https://avatars0.githubusercontent.com/u/545988?v=4","gravatar_id":"","url":"https://api.github.com/users/SonarSource","html_url":"https://github.com/SonarSource","followers_url":"https://api.github.com/users/SonarSource/followers","following_url":"https://api.github.com/users/SonarSource/following{/other_user}","gists_url":"https://api.github.com/users/SonarSource/gists{/gist_id}","starred_url":"https://api.github.com/users/SonarSource/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SonarSource/subscriptions","organizations_url":"https://api.github.com/users/SonarSource/orgs","repos_url":"https://api.github.com/users/SonarSource/repos","events_url":"https://api.github.com/users/SonarSource/events{/privacy}","received_events_url":"https://api.github.com/users/SonarSource/received_events","type":"Organization","site_admin":false},"repo":{"id":5674787,"name":"sonar-java","full_name":"SonarSource/sonar-java","owner":{"login":"SonarSource","id":545988,"avatar_url":"https://avatars0.githubusercontent.com/u/545988?v=4","gravatar_id":"","url":"https://api.github.com/users/SonarSource","html_url":"https://github.com/SonarSource","followers_url":"https://api.github.com/users/SonarSource/followers","following_url":"https://api.github.com/users/SonarSource/following{/other_user}","gists_url":"https://api.github.com/users/SonarSource/gists{/gist_id}","starred_url":"https://api.github.com/users/SonarSource/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SonarSource/subscriptions","organizations_url":"https://api.github.com/users/SonarSource/orgs","repos_url":"https://api.github.com/users/SonarSource/repos","events_url":"https://api.github.com/users/SonarSource/events{/privacy}","received_events_url":"https://api.github.com/users/SonarSource/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/SonarSource/sonar-java","description":":coffee: SonarJava : Java static analyzer for SonarQube & SonarLint","fork":false,"url":"https://api.github.com/repos/SonarSource/sonar-java","forks_url":"https://api.github.com/repos/SonarSource/sonar-java/forks","keys_url":"https://api.github.com/repos/SonarSource/sonar-java/keys{/key_id}","collaborators_url":"https://api.github.com/repos/SonarSource/sonar-java/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/SonarSource/sonar-java/teams","hooks_url":"https://api.github.com/repos/SonarSource/sonar-java/hooks","issue_events_url":"https://api.github.com/repos/SonarSource/sonar-java/issues/events{/number}","events_url":"https://api.github.com/repos/SonarSource/sonar-java/events","assignees_url":"https://api.github.com/repos/SonarSource/sonar-java/assignees{/user}","branches_url":"https://api.github.com/repos/SonarSource/sonar-java/branches{/branch}","tags_url":"https://api.github.com/repos/SonarSource/sonar-java/tags","blobs_url":"https://api.github.com/repos/SonarSource/sonar-java/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/SonarSource/sonar-java/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/SonarSource/sonar-java/git/refs{/sha}","trees_url":"https://api.github.com/repos/SonarSource/sonar-java/git/trees{/sha}","statuses_url":"https://api.github.com/repos/SonarSource/sonar-java/statuses/{sha}","languages_url":"https://api.github.com/repos/SonarSource/sonar-java/languages","stargazers_url":"https://api.github.com/repos/SonarSource/sonar-java/stargazers","contributors_url":"https://api.github.com/repos/SonarSource/sonar-java/contributors","subscribers_url":"https://api.github.com/repos/SonarSource/sonar-java/subscribers","subscription_url":"https://api.github.com/repos/SonarSource/sonar-java/subscription","commits_url":"https://api.github.com/repos/SonarSource/sonar-java/commits{/sha}","git_commits_url":"https://api.github.com/repos/SonarSource/sonar-java/git/commits{/sha}","comments_url":"https://api.github.com/repos/SonarSource/sonar-java/comments{/number}","issue_comment_url":"https://api.github.com/repos/SonarSource/sonar-java/issues/comments{/number}","contents_url":"https://api.github.com/repos/SonarSource/sonar-java/contents/{+path}","compare_url":"https://api.github.com/repos/SonarSource/sonar-java/compare/{base}...{head}","merges_url":"https://api.github.com/repos/SonarSource/sonar-java/merges","archive_url":"https://api.github.com/repos/SonarSource/sonar-java/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/SonarSource/sonar-java/downloads","issues_url":"https://api.github.com/repos/SonarSource/sonar-java/issues{/number}","pulls_url":"https://api.github.com/repos/SonarSource/sonar-java/pulls{/number}","milestones_url":"https://api.github.com/repos/SonarSource/sonar-java/milestones{/number}","notifications_url":"https://api.github.com/repos/SonarSource/sonar-java/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/SonarSource/sonar-java/labels{/name}","releases_url":"https://api.github.com/repos/SonarSource/sonar-java/releases{/id}","deployments_url":"https://api.github.com/repos/SonarSource/sonar-java/deployments","created_at":"2012-09-04T15:53:13Z","updated_at":"2018-05-15T09:37:31Z","pushed_at":"2018-05-15T12:09:20Z","git_url":"git://github.com/SonarSource/sonar-java.git","ssh_url":"git@github.com:SonarSource/sonar-java.git","clone_url":"https://github.com/SonarSource/sonar-java.git","svn_url":"https://github.com/SonarSource/sonar-java","homepage":"","size":38084,"stargazers_count":318,"watchers_count":318,"language":"Java","has_issues":false,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":240,"mirror_url":null,"archived":false,"open_issues_count":6,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":240,"open_issues":6,"watchers":318,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/SonarSource/sonar-java/pulls/2017"},"html":{"href":"https://github.com/SonarSource/sonar-java/pull/2017"},"issue":{"href":"https://api.github.com/repos/SonarSource/sonar-java/issues/2017"},"comments":{"href":"https://api.github.com/repos/SonarSource/sonar-java/issues/2017/comments"},"review_comments":{"href":"https://api.github.com/repos/SonarSource/sonar-java/pulls/2017/comments"},"review_comment":{"href":"https://api.github.com/repos/SonarSource/sonar-java/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/SonarSource/sonar-java/pulls/2017/commits"},"statuses":{"href":"https://api.github.com/repos/SonarSource/sonar-java/statuses/582886d79d72155a5c0b4261231fdf34c9451b1e"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"m-g-sonar"}}