{"action":"created","comment":{"url":"https://api.github.com/repos/hmcts/bulk-scan-processor/pulls/comments/245044548","pull_request_review_id":189069749,"id":245044548,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDI0NTA0NDU0OA==","diff_hunk":"@@ -67,6 +67,7 @@\n \n     public static final String DOCUMENTS_ZIP = \"envelope.zip\";\n     public static final String SIGNATURE_SIG = \"signature\";\n+    public static final String INVALID_SIGNATURE_MESSAGE = \"Zip signature failed verification\";\n \n     private static final Logger log = LoggerFactory.getLogger(ZipVerifiers.class);","path":"src/main/java/uk/gov/hmcts/reform/bulkscanprocessor/tasks/processor/ZipVerifiers.java","position":6,"original_position":6,"commit_id":"841060b7831d415a2151f1edc06a0124b4f189b1","original_commit_id":"841060b7831d415a2151f1edc06a0124b4f189b1","user":{"login":"sonarcloud[bot]","id":39514782,"node_id":"MDM6Qm90Mzk1MTQ3ODI=","avatar_url":"https://avatars2.githubusercontent.com/in/12526?v=4","gravatar_id":"","url":"https://api.github.com/users/sonarcloud%5Bbot%5D","html_url":"https://github.com/apps/sonarcloud","followers_url":"https://api.github.com/users/sonarcloud%5Bbot%5D/followers","following_url":"https://api.github.com/users/sonarcloud%5Bbot%5D/following{/other_user}","gists_url":"https://api.github.com/users/sonarcloud%5Bbot%5D/gists{/gist_id}","starred_url":"https://api.github.com/users/sonarcloud%5Bbot%5D/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sonarcloud%5Bbot%5D/subscriptions","organizations_url":"https://api.github.com/users/sonarcloud%5Bbot%5D/orgs","repos_url":"https://api.github.com/users/sonarcloud%5Bbot%5D/repos","events_url":"https://api.github.com/users/sonarcloud%5Bbot%5D/events{/privacy}","received_events_url":"https://api.github.com/users/sonarcloud%5Bbot%5D/received_events","type":"Bot","site_admin":false},"body":"![Code Smell](https://sonarsource.github.io/sonar-github/code_smell.png 'Code Smell') Code Smell: Remove this unused \"log\" private field. ([squid:S1068](https://sonarcloud.io/organizations/hmcts/rules#rule_key=squid%3AS1068))\n\n[See it in SonarCloud](https://sonarcloud.io/project/issues?id=uk.gov.hmcts.reform%3Abulk-scan-processor&pullRequest=393&issues=AWgUbSYYSi5GWQS9iB5z&open=AWgUbSYYSi5GWQS9iB5z)\n\n[ISSUE_KEY]: AWgUbSYYSi5GWQS9iB5z","created_at":"2019-01-03T15:56:57Z","updated_at":"2019-01-03T15:56:57Z","html_url":"https://github.com/hmcts/bulk-scan-processor/pull/393#discussion_r245044548","pull_request_url":"https://api.github.com/repos/hmcts/bulk-scan-processor/pulls/393","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/hmcts/bulk-scan-processor/pulls/comments/245044548"},"html":{"href":"https://github.com/hmcts/bulk-scan-processor/pull/393#discussion_r245044548"},"pull_request":{"href":"https://api.github.com/repos/hmcts/bulk-scan-processor/pulls/393"}}},"pull_request":{"url":"https://api.github.com/repos/hmcts/bulk-scan-processor/pulls/393","id":242032336,"node_id":"MDExOlB1bGxSZXF1ZXN0MjQyMDMyMzM2","html_url":"https://github.com/hmcts/bulk-scan-processor/pull/393","diff_url":"https://github.com/hmcts/bulk-scan-processor/pull/393.diff","patch_url":"https://github.com/hmcts/bulk-scan-processor/pull/393.patch","issue_url":"https://api.github.com/repos/hmcts/bulk-scan-processor/issues/393","number":393,"state":"open","locked":false,"title":"Fix invalid signature (format) handling","user":{"login":"lgonczar","id":1453789,"node_id":"MDQ6VXNlcjE0NTM3ODk=","avatar_url":"https://avatars3.githubusercontent.com/u/1453789?v=4","gravatar_id":"","url":"https://api.github.com/users/lgonczar","html_url":"https://github.com/lgonczar","followers_url":"https://api.github.com/users/lgonczar/followers","following_url":"https://api.github.com/users/lgonczar/following{/other_user}","gists_url":"https://api.github.com/users/lgonczar/gists{/gist_id}","starred_url":"https://api.github.com/users/lgonczar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lgonczar/subscriptions","organizations_url":"https://api.github.com/users/lgonczar/orgs","repos_url":"https://api.github.com/users/lgonczar/repos","events_url":"https://api.github.com/users/lgonczar/events{/privacy}","received_events_url":"https://api.github.com/users/lgonczar/received_events","type":"User","site_admin":false},"body":"### JIRA link (if applicable) ###\r\n\r\nhttps://tools.hmcts.net/jira/browse/BPS-443\r\n\r\n### Change description ###\r\n\r\nFix the handling of envelopes with signatures of invalid format. Currently, if, for example, the signature is too long for the public key, the processing of the envelope ends with a general failure, instead of the envelope being rejected. This PR fixes it.\r\n\r\nAlso, because `verifySignature` doesn't return boolean anymore, but throws an exception instead, `verifyFileNames` was changed the same way, for consistency.\r\n\r\n**Does this PR introduce a breaking change?** (check one with \"x\")\r\n\r\n```\r\n[ ] Yes\r\n[x] No\r\n```\r\n","created_at":"2019-01-03T15:47:13Z","updated_at":"2019-01-03T15:56:57Z","closed_at":null,"merged_at":null,"merge_commit_sha":"18269d7a2e00e76b19267d4f978d0bc20470ec95","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/hmcts/bulk-scan-processor/pulls/393/commits","review_comments_url":"https://api.github.com/repos/hmcts/bulk-scan-processor/pulls/393/comments","review_comment_url":"https://api.github.com/repos/hmcts/bulk-scan-processor/pulls/comments{/number}","comments_url":"https://api.github.com/repos/hmcts/bulk-scan-processor/issues/393/comments","statuses_url":"https://api.github.com/repos/hmcts/bulk-scan-processor/statuses/841060b7831d415a2151f1edc06a0124b4f189b1","head":{"label":"hmcts:fix/invalid-signature-handling","ref":"fix/invalid-signature-handling","sha":"841060b7831d415a2151f1edc06a0124b4f189b1","user":{"login":"hmcts","id":22817111,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIyODE3MTEx","avatar_url":"https://avatars1.githubusercontent.com/u/22817111?v=4","gravatar_id":"","url":"https://api.github.com/users/hmcts","html_url":"https://github.com/hmcts","followers_url":"https://api.github.com/users/hmcts/followers","following_url":"https://api.github.com/users/hmcts/following{/other_user}","gists_url":"https://api.github.com/users/hmcts/gists{/gist_id}","starred_url":"https://api.github.com/users/hmcts/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hmcts/subscriptions","organizations_url":"https://api.github.com/users/hmcts/orgs","repos_url":"https://api.github.com/users/hmcts/repos","events_url":"https://api.github.com/users/hmcts/events{/privacy}","received_events_url":"https://api.github.com/users/hmcts/received_events","type":"Organization","site_admin":false},"repo":{"id":133028120,"node_id":"MDEwOlJlcG9zaXRvcnkxMzMwMjgxMjA=","name":"bulk-scan-processor","full_name":"hmcts/bulk-scan-processor","private":false,"owner":{"login":"hmcts","id":22817111,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIyODE3MTEx","avatar_url":"https://avatars1.githubusercontent.com/u/22817111?v=4","gravatar_id":"","url":"https://api.github.com/users/hmcts","html_url":"https://github.com/hmcts","followers_url":"https://api.github.com/users/hmcts/followers","following_url":"https://api.github.com/users/hmcts/following{/other_user}","gists_url":"https://api.github.com/users/hmcts/gists{/gist_id}","starred_url":"https://api.github.com/users/hmcts/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hmcts/subscriptions","organizations_url":"https://api.github.com/users/hmcts/orgs","repos_url":"https://api.github.com/users/hmcts/repos","events_url":"https://api.github.com/users/hmcts/events{/privacy}","received_events_url":"https://api.github.com/users/hmcts/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/hmcts/bulk-scan-processor","description":null,"fork":false,"url":"https://api.github.com/repos/hmcts/bulk-scan-processor","forks_url":"https://api.github.com/repos/hmcts/bulk-scan-processor/forks","keys_url":"https://api.github.com/repos/hmcts/bulk-scan-processor/keys{/key_id}","collaborators_url":"https://api.github.com/repos/hmcts/bulk-scan-processor/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/hmcts/bulk-scan-processor/teams","hooks_url":"https://api.github.com/repos/hmcts/bulk-scan-processor/hooks","issue_events_url":"https://api.github.com/repos/hmcts/bulk-scan-processor/issues/events{/number}","events_url":"https://api.github.com/repos/hmcts/bulk-scan-processor/events","assignees_url":"https://api.github.com/repos/hmcts/bulk-scan-processor/assignees{/user}","branches_url":"https://api.github.com/repos/hmcts/bulk-scan-processor/branches{/branch}","tags_url":"https://api.github.com/repos/hmcts/bulk-scan-processor/tags","blobs_url":"https://api.github.com/repos/hmcts/bulk-scan-processor/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/hmcts/bulk-scan-processor/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/hmcts/bulk-scan-processor/git/refs{/sha}","trees_url":"https://api.github.com/repos/hmcts/bulk-scan-processor/git/trees{/sha}","statuses_url":"https://api.github.com/repos/hmcts/bulk-scan-processor/statuses/{sha}","languages_url":"https://api.github.com/repos/hmcts/bulk-scan-processor/languages","stargazers_url":"https://api.github.com/repos/hmcts/bulk-scan-processor/stargazers","contributors_url":"https://api.github.com/repos/hmcts/bulk-scan-processor/contributors","subscribers_url":"https://api.github.com/repos/hmcts/bulk-scan-processor/subscribers","subscription_url":"https://api.github.com/repos/hmcts/bulk-scan-processor/subscription","commits_url":"https://api.github.com/repos/hmcts/bulk-scan-processor/commits{/sha}","git_commits_url":"https://api.github.com/repos/hmcts/bulk-scan-processor/git/commits{/sha}","comments_url":"https://api.github.com/repos/hmcts/bulk-scan-processor/comments{/number}","issue_comment_url":"https://api.github.com/repos/hmcts/bulk-scan-processor/issues/comments{/number}","contents_url":"https://api.github.com/repos/hmcts/bulk-scan-processor/contents/{+path}","compare_url":"https://api.github.com/repos/hmcts/bulk-scan-processor/compare/{base}...{head}","merges_url":"https://api.github.com/repos/hmcts/bulk-scan-processor/merges","archive_url":"https://api.github.com/repos/hmcts/bulk-scan-processor/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/hmcts/bulk-scan-processor/downloads","issues_url":"https://api.github.com/repos/hmcts/bulk-scan-processor/issues{/number}","pulls_url":"https://api.github.com/repos/hmcts/bulk-scan-processor/pulls{/number}","milestones_url":"https://api.github.com/repos/hmcts/bulk-scan-processor/milestones{/number}","notifications_url":"https://api.github.com/repos/hmcts/bulk-scan-processor/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/hmcts/bulk-scan-processor/labels{/name}","releases_url":"https://api.github.com/repos/hmcts/bulk-scan-processor/releases{/id}","deployments_url":"https://api.github.com/repos/hmcts/bulk-scan-processor/deployments","created_at":"2018-05-11T10:51:58Z","updated_at":"2019-01-03T13:31:05Z","pushed_at":"2019-01-03T15:47:44Z","git_url":"git://github.com/hmcts/bulk-scan-processor.git","ssh_url":"git@github.com:hmcts/bulk-scan-processor.git","clone_url":"https://github.com/hmcts/bulk-scan-processor.git","svn_url":"https://github.com/hmcts/bulk-scan-processor","homepage":null,"size":3085,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":9,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":0,"open_issues":9,"watchers":0,"default_branch":"master"}},"base":{"label":"hmcts:master","ref":"master","sha":"30ec65ca9106b4f63e5e8ffe4a03eb532d7600ad","user":{"login":"hmcts","id":22817111,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIyODE3MTEx","avatar_url":"https://avatars1.githubusercontent.com/u/22817111?v=4","gravatar_id":"","url":"https://api.github.com/users/hmcts","html_url":"https://github.com/hmcts","followers_url":"https://api.github.com/users/hmcts/followers","following_url":"https://api.github.com/users/hmcts/following{/other_user}","gists_url":"https://api.github.com/users/hmcts/gists{/gist_id}","starred_url":"https://api.github.com/users/hmcts/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hmcts/subscriptions","organizations_url":"https://api.github.com/users/hmcts/orgs","repos_url":"https://api.github.com/users/hmcts/repos","events_url":"https://api.github.com/users/hmcts/events{/privacy}","received_events_url":"https://api.github.com/users/hmcts/received_events","type":"Organization","site_admin":false},"repo":{"id":133028120,"node_id":"MDEwOlJlcG9zaXRvcnkxMzMwMjgxMjA=","name":"bulk-scan-processor","full_name":"hmcts/bulk-scan-processor","private":false,"owner":{"login":"hmcts","id":22817111,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIyODE3MTEx","avatar_url":"https://avatars1.githubusercontent.com/u/22817111?v=4","gravatar_id":"","url":"https://api.github.com/users/hmcts","html_url":"https://github.com/hmcts","followers_url":"https://api.github.com/users/hmcts/followers","following_url":"https://api.github.com/users/hmcts/following{/other_user}","gists_url":"https://api.github.com/users/hmcts/gists{/gist_id}","starred_url":"https://api.github.com/users/hmcts/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hmcts/subscriptions","organizations_url":"https://api.github.com/users/hmcts/orgs","repos_url":"https://api.github.com/users/hmcts/repos","events_url":"https://api.github.com/users/hmcts/events{/privacy}","received_events_url":"https://api.github.com/users/hmcts/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/hmcts/bulk-scan-processor","description":null,"fork":false,"url":"https://api.github.com/repos/hmcts/bulk-scan-processor","forks_url":"https://api.github.com/repos/hmcts/bulk-scan-processor/forks","keys_url":"https://api.github.com/repos/hmcts/bulk-scan-processor/keys{/key_id}","collaborators_url":"https://api.github.com/repos/hmcts/bulk-scan-processor/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/hmcts/bulk-scan-processor/teams","hooks_url":"https://api.github.com/repos/hmcts/bulk-scan-processor/hooks","issue_events_url":"https://api.github.com/repos/hmcts/bulk-scan-processor/issues/events{/number}","events_url":"https://api.github.com/repos/hmcts/bulk-scan-processor/events","assignees_url":"https://api.github.com/repos/hmcts/bulk-scan-processor/assignees{/user}","branches_url":"https://api.github.com/repos/hmcts/bulk-scan-processor/branches{/branch}","tags_url":"https://api.github.com/repos/hmcts/bulk-scan-processor/tags","blobs_url":"https://api.github.com/repos/hmcts/bulk-scan-processor/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/hmcts/bulk-scan-processor/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/hmcts/bulk-scan-processor/git/refs{/sha}","trees_url":"https://api.github.com/repos/hmcts/bulk-scan-processor/git/trees{/sha}","statuses_url":"https://api.github.com/repos/hmcts/bulk-scan-processor/statuses/{sha}","languages_url":"https://api.github.com/repos/hmcts/bulk-scan-processor/languages","stargazers_url":"https://api.github.com/repos/hmcts/bulk-scan-processor/stargazers","contributors_url":"https://api.github.com/repos/hmcts/bulk-scan-processor/contributors","subscribers_url":"https://api.github.com/repos/hmcts/bulk-scan-processor/subscribers","subscription_url":"https://api.github.com/repos/hmcts/bulk-scan-processor/subscription","commits_url":"https://api.github.com/repos/hmcts/bulk-scan-processor/commits{/sha}","git_commits_url":"https://api.github.com/repos/hmcts/bulk-scan-processor/git/commits{/sha}","comments_url":"https://api.github.com/repos/hmcts/bulk-scan-processor/comments{/number}","issue_comment_url":"https://api.github.com/repos/hmcts/bulk-scan-processor/issues/comments{/number}","contents_url":"https://api.github.com/repos/hmcts/bulk-scan-processor/contents/{+path}","compare_url":"https://api.github.com/repos/hmcts/bulk-scan-processor/compare/{base}...{head}","merges_url":"https://api.github.com/repos/hmcts/bulk-scan-processor/merges","archive_url":"https://api.github.com/repos/hmcts/bulk-scan-processor/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/hmcts/bulk-scan-processor/downloads","issues_url":"https://api.github.com/repos/hmcts/bulk-scan-processor/issues{/number}","pulls_url":"https://api.github.com/repos/hmcts/bulk-scan-processor/pulls{/number}","milestones_url":"https://api.github.com/repos/hmcts/bulk-scan-processor/milestones{/number}","notifications_url":"https://api.github.com/repos/hmcts/bulk-scan-processor/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/hmcts/bulk-scan-processor/labels{/name}","releases_url":"https://api.github.com/repos/hmcts/bulk-scan-processor/releases{/id}","deployments_url":"https://api.github.com/repos/hmcts/bulk-scan-processor/deployments","created_at":"2018-05-11T10:51:58Z","updated_at":"2019-01-03T13:31:05Z","pushed_at":"2019-01-03T15:47:44Z","git_url":"git://github.com/hmcts/bulk-scan-processor.git","ssh_url":"git@github.com:hmcts/bulk-scan-processor.git","clone_url":"https://github.com/hmcts/bulk-scan-processor.git","svn_url":"https://github.com/hmcts/bulk-scan-processor","homepage":null,"size":3085,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":9,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":0,"open_issues":9,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/hmcts/bulk-scan-processor/pulls/393"},"html":{"href":"https://github.com/hmcts/bulk-scan-processor/pull/393"},"issue":{"href":"https://api.github.com/repos/hmcts/bulk-scan-processor/issues/393"},"comments":{"href":"https://api.github.com/repos/hmcts/bulk-scan-processor/issues/393/comments"},"review_comments":{"href":"https://api.github.com/repos/hmcts/bulk-scan-processor/pulls/393/comments"},"review_comment":{"href":"https://api.github.com/repos/hmcts/bulk-scan-processor/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/hmcts/bulk-scan-processor/pulls/393/commits"},"statuses":{"href":"https://api.github.com/repos/hmcts/bulk-scan-processor/statuses/841060b7831d415a2151f1edc06a0124b4f189b1"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"sonarcloud"}}